Claude Code skill for building with @chenglou/pretext — a pure JS library for multiline text measurement and layout without DOM reflows.
Clone into your Claude Code skills directory:
cd ~/.claude/skills
git clone git@github.com:alpeshvas/pretext-skill.git pretextActivates automatically when Claude detects you're working with @chenglou/pretext — importing it, rendering canvas text, or mentioning "pretext" / "text layout without DOM".
Provides Claude with knowledge of:
- Two-phase
prepare()+layout()architecture - Canvas text rendering patterns with character positioning
- Variable-width reflow with
layoutNextLine - HiDPI setup and font-matching gotchas
- Full API reference with types