Pretext

Use when building creative browser demos with @chenglou/pretext — DOM-free text layout for ASCII art, typographic flow around obstacles, text-as-geometry games, kinetic typography, and text-powered generative art. Produces single-file HTML demos by default.

9 stars 2 forksFrontend & Design

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add Lord1Egypt/RA-Skills --skill pretext
Manual install
git clone --depth 1 https://github.com/Lord1Egypt/RA-Skills.git /tmp/RA-Skills
mkdir -p ~/.claude/skills
cp -r /tmp/RA-Skills/skills/built-in/creative/pretext ~/.claude/skills/pretext

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Pretext Creative Demos

## Overview

[`@chenglou/pretext`](https://github.com/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.

## When to Use

Use when the user asks for:
- A "pretext demo" / "cool pretext thing" / "text-as-X"
- Text flowing around a moving shape (hero sections, editorial layouts, animated long-form pages)
- ASCII-art effects using **real words or prose**, not monospace rasters
- Games where the playfield / obstacles / bricks are made of text (Tetris-from-letters, Breakout-of-prose)
- Kinetic typography with per-glyph physics (shatter, scatter, flock, flow)
Read the full skill on GitHub

Details

Skill name
pretext
Path
skills/built-in/creative/pretext/SKILL.md
Repo updated
17 November 2026

FAQ

What does the Pretext skill do?

Use when building creative browser demos with @chenglou/pretext — DOM-free text layout for ASCII art, typographic flow around obstacles, text-as-geometry games, kinetic typography, and text-powered generative art. Produces single-file HTML demos by default.

How do I install the Pretext skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add Lord1Egypt/RA-Skills --skill pretext. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Pretext popular?

It lives in Lord1Egypt/RA-Skills, which has 9 GitHub stars and 2 forks.

Related skills

Account Management

9

Lord1Egypt/RA-Skills

Reach the Plug&Pay Customer Portal (portal.plugandpay.com/login/{merchant-slug}) where a customer manages their account: view subscriptions, download invoices, edit billing details, change payment term, and cancel/resume a subscription. Documents the passwordless magic-link lo…

Documents & Office Files

Add Items to Cart

9

Lord1Egypt/RA-Skills

Resolve a free-text grocery list to specific King Soopers products (UPC, brand, size, price), ask follow-up questions for ambiguous items, then add the confirmed products to the signed-in user's cart for pickup or delivery.

Frontend & Design

Add to Cart

9

Lord1Egypt/RA-Skills

Find a product on kmart.com.au by natural-language query, navigate to the product detail page, capture title/price/SKU/availability, and drive the read-only pre-checkout flow up to the bag (/checkout/bag). Never submits an order — stops at the bag review screen. Documents the …

Other

Ruwangi Parfum Perempuan

9

Lord1Egypt/RA-Skills

Return a curated, ranked list of best local Indonesian women's perfumes from Ruwangi.com — name, brand, IDR price, rating, notes, and time-of-day suitability. Read-only directory lookup using the pre-curated /katalog/parfum-lokal-wanita-terbaik deep-link.

Frontend & Design

Popular Web Designs

9

Lord1Egypt/RA-Skills

54 real design systems (Stripe, Linear, Vercel) as HTML/CSS.

Frontend & Design

Search and Browse

9

Lord1Egypt/RA-Skills

Search Flipkart by free-text query and return ranked products (title, brand, price, MRP, discount, rating, stock, pid, URL) by parsing the server-rendered __INITIAL_STATE__; supports pagination, sort, and navigating to product detail pages. Read-only.

Frontend & Design

Browse the most popular Claude skills, all frontend & design skills, or write your own with the skills generator.