pretext-text-measurement精准文本测量与布局引擎(基于开源 Pretext)。无需触碰 DOM,纯算术计算文本像素高度,支持中文、CJK、emoji 等多语言。多用于前端虚拟滚动、AI 生成 UI 布局预计算、Canvas 渲染等场景。当用户需要计算文字在指定宽度下的高度、判断换行行数、或精确布局文本时调用此 Skill。
Install via ClawdBot CLI:
clawdbot install markcookie/pretext-text-measurementGrade Fair — based on market validation, documentation quality, package completeness, maintenance status, and authenticity signals.
Calls external URL not in known-safe list
https://github.com/chenglou/pretextAudited Apr 16, 2026 · audit v1.0
Generated Jul 17, 2026
Pre-calculate chat message or feed item heights to implement smooth virtual scrolling without DOM measurement. Supports any font including Chinese, CJK, and emoji, enabling performant mobile-like message lists.
Predict text dimensions for auto-generated UI components such as accordion panels, chat bubbles, or masonry grids. Enables deterministic layout without layout thrashing, ideal for server-side rendering or AI-driven UI composition.
Measure text precisely for Canvas rendering, including particle text animations or drawing text line-by-line. Provides per-line metrics and coordinates for advanced visual effects with zero DOM overhead.
Compute line breaks and page heights for multi-language ebooks or documents before rendering. Supports Chinese, Japanese, Korean, and mixed-script content, ensuring accurate pagination.
Real-time estimation of block heights in rich text editors or content management systems. Helps maintain consistent scroll behavior and layout stability even with inline mentions or code blocks.
Offer a paid performance monitoring service that integrates Pretext to detect and report layout shift issues caused by unknown text sizes. Charge per monthly active requests or per seat.
Provide consulting and custom script development for clients needing advanced text layout, such as specialized chat apps or animation studios. One-time project fees plus optional maintenance.
Wrap Pretext in a cloud API with a free tier (e.g., 1,000 measurements/day) and paid plans (e.g., $49/month for 100k measurements + priority support).
💬 Integration Tip
Add require('./scripts/measure') in any Node.js script to get height synchronous; cache results per unique (text, font, width) to avoid recomputation.
Scored Jul 17, 2026
A language list retrieval skill based on the "Bee Website Builder" Open API. It is used to obtain the list of enabled site languages and provide the dependen...
A language list retrieval skill based on the "Bee Website Builder" Open API. It is used to obtain the list of enabled site languages and provide the dependen...
从智慧芽(PatSnap)专利数据库获取专利标题和摘要的翻译版本。当用户要求专利摘要翻译、专利标题翻译、翻译后的专利摘要、其他语言的专利内容、中文/英文/日文的专利摘要,或需要通过专利ID或公开号查询特定专利的摘要、标题、patent abstract translation, patent title tran...
Use when the user has an SRT (or transcript text) in one language and wants it translated to another, with punctuation-bounded re-segmentation so cues end at...
让古人开口、让古诗词活起来的经典语文阅读专项SKILL。 当学生说"帮我理解这首古诗"、"文言文读不懂"、"扮演苏轼/李白/杜甫"、 "这首词的背景是什么"、"帮我背古诗"、"诗词游戏"、"文言文翻译"、 "古文作者的心情是什么"时,建议激活此SKILL。 核心方法:古人第一人称角色扮演(文言文复活)+ 古诗词三...
Intelligent Ramadan times skill that auto-detects location, provides accurate iftar/sahur times in user's language, and supports 100+ cities worldwide. Suppo...