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.

Install it, pinned
mdr add yaniv-golan/pretext-skill/pretext@v0.3.0

Pins 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

The exact contents, by fingerprint
mdr add yaniv-golan/pretext-skill/pretext@sha256:c530a3a412f19e40

The 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.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_g3m5q7clcxujafax.svg)](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.

versioncommittedcommitsizeaudit
v0.3.0 latest2026-11-05 1634182 15,367 BA view · diff
v0.2.22026-11-05 077043c 15,367 BA view · diff
v0.2.22026-11-05 1285bb0 15,132 BA view · diff
v0.2.22026-07-14 f1bea96 19,971 BA view · diff
v0.2.12026-05-15 44fa2ee 19,971 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • 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

GitHub

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.

Other files named pretext

pretext SKILL.md skill
mateaix/mateclaw · mateclaw-server/src/main/resources/skills/pretext/SKILL.md · Use when building creative browser demos with @chenglou/pretext — DOM-free
v1.0.0 · audit B · 1,185 stars
pretext SKILL.md skill
tdimino/claude-code-minoan · skills/design-media/pretext/SKILL.md · Create text effects impossible with CSS alone — kinetic typography, flowing text around animated obstacles, calligrams…
git:20260416.4e43d41 · audit B · 41 stars

Browse by kind, by grade A, or by owner.