Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Builds single-file browser demos with @chenglou/pretext for DOM-free text layout, ASCII art, and text-based generative art.
Use this skill ↓36% 76%+40 ptsof test cases passed
Passed 19 of 25 test cases with the skill, and 9 of 25 without it.
I am laying out paragraph text that contains inline atomic pill tags with break: 'never' in a canvas application. The pill backgrounds are overflowing their text boundaries. What parameter is required to reserve padding?
Supplies the extraWidth parameter to account for horizontal pill padding.
3 of 3 safety checks passed
@chenglou/pretext is a 15KB zero-dependency TypeScript library by Cheng Lou (React core, ReasonML, Midjourney) for DOM-free multiline text measurement and layout. It does one thing: given (text, font, width), return the line breaks, per-line widths, per-grapheme positions, and total height — all via canvas measurement, no reflow.
That sounds like plumbing. It is not. Because it is fast and geometric, it is a creative primitive: you can reflow paragraphs around a moving sprite at 60fps, build games whose level geometry is made of real words, drive ASCII logos through prose, shatter text into particles with exact per-grapheme starting positions, or pack shrink-wrapped multiline UI without any getBoundingClientRect thrash.
This skill exists so Hermes can make cool demos with it — the kind people post to X. See pretext.cool and chenglou.me/pretext for the community demo corpus.
Use when the user asks for:
Don't use for:
ascii-art / ascii-video skills)p5jsThis is visual art rendered in a browser. Pretext returns numbers; you draw the thing.
hello-orb-flow.html template is the starting point. Every delivered demo must add intentional color, motion, composition, and one visual detail the user didn't ask for but will appreciate.lorem ipsum.Published skills whose descriptions closely match this one, with their benchmark result.
Next to this one in the catalogue, plus popular skills in the same category.