pretext SKILL.md skillA
pretext from yaniv-golan/pretext-skill is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add yaniv-golan/pretext-skill/pretext@v0.3.0Pins v0.3.0 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- yaniv-golan/pretext-skill
- Path
pretext/skills/pretext/SKILL.md- Versions recorded
- 5
- Latest version
- v0.3.0, committed Nov 5, 2026
- First version recorded
- May 15, 2026
- Size
- 15,367 bytes
- Repository stars
- 14
- License
- MIT
Help developers use @chenglou/pretext 1.0+, a TypeScript library that measures and lays out multiline text without DOM reflow. Use for pretext, @chenglou/pretext, /rich-inline, layoutNextLine, layoutNextLineRange, upgrading pretext from 0.0.x to 1.0, or text height, line count, shrink-wrap, auto-fit font size, line clamp with ellipsis, text around obstacles, and inline chips, mentions or images computed in JS. Also for its errors: "font must be a font string Canvas takes…
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Pretext Integration Guide You are helping a developer use **@chenglou/pretext**, a TypeScript library by Cheng Lou that predicts the browser's line breaks and heights from canvas measurements, using ports of each browser's line breaker. `prepare()` segments the text and measures it once with `CanvasRenderingContext2D.measureText`; `layout()` is then arithmetic at any width, with no DOM reads. It is ESM: `@chenglou/pretext` is the core, and `@chenglou/pretext/rich-inline` handles mixed-font inline text. ## Check the Version First Read the project's `package.json` (or run `npm ls @chenglou/pretext`) before writing any code. This skill covers 1.0.0 and later. Below 1.0.0, read [migration.md](references/migration.md) before writing code: a caret range on a 0.0.x version never reaches 1.0 by itself, and several signatures changed. Don't write signatures from memory; take them from the references. ## When Pretext Is the Right Tool - **Know text height before rendering**: virtual lists, masonry, cards, accordions. - **Auto-fit font size** to N lines, which CSS can't do. - **Truncate to N lines with an ellipsis** when you need the clamped strings, as for Canvas or SVG. …
Read the whole file at its exact version.
How to install
mdr add yaniv-golan/pretext-skill/pretext@sha256:c530a3a412f19e40The line at the top of this page pins the label v0.3.0, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_g3m5q7clcxujafax)
0 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 5 versions of this file, between May 15, 2026 and Nov 5, 2026, about one every 44 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| v0.3.0 latest | 2026-11-05 | 1634182 | 15,367 B | A | view · diff |
| v0.2.2 | 2026-11-05 | 077043c | 15,367 B | A | view · diff |
| v0.2.2 | 2026-11-05 | 1285bb0 | 15,132 B | A | view · diff |
| v0.2.2 | 2026-07-14 | f1bea96 | 19,971 B | A | view · diff |
| v0.2.1 | 2026-05-15 | 44fa2ee | 19,971 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (15367 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
yaniv-golan/pretext-skill · 14 stars · license MIT · pushed 2026-11-05 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_g3m5q7clcxujafax GET https://markdownregistry.com/api/v1/resolve?ref=yaniv-golan/pretext-skill/pretext GET https://markdownregistry.com/api/v1/blob/c530a3a412f19e404d08efd8ab05b02d4d0639e47b04e3e98050a9b015bbd8f0
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.