The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the DesignScan listing page.
URL → design tokens → DESIGN.md. Point it at any website and get a
spec-compliant DESIGN.md file
(YAML tokens + prose) that AI coding agents can read to match that site's look.
Every run can also emit a self-contained HTML proof sheet (--preview) that
renders the extracted tokens — color roles, type specimens, spacing/radius
scales, components — so you can eyeball the result before trusting it:
A DESIGN.md is always consumed by an AI coding agent (Cursor, Claude Code, …).
So rather than run our own LLM to resolve semantic intent, every file ends with a
Notes for your coding agent section: deterministic, per-extraction
instructions computed from the actual tokens — heading hierarchy vs. a muted
text color, sub-AA body contrast, brand-font fallback, the primary-button
contract, shape/spacing rhythm. The reasoning stays on our side (no API key); the
application happens for free inside the agent you already use.
It measurably changes the output. Below: the same stripe.DESIGN.md cloned by an
agent that ignored the notes (left) vs one that followed them (right) —
identical tokens, layout, and copy:

A growing, curated library of real-brand specs lives in examples/ —
each one a DESIGN.md, an HTML preview, and the raw token JSON, indexed in
examples/README.md (visual gallery: index.html).
Rebuild it from the committed JSON with pnpm seed rebuild (no network), or add
brands with pnpm seed add <url> — degenerate / bot-challenged pages are skipped
automatically so the corpus only holds trustworthy specs.
| Path | What |
|---|---|
packages/extractor | The extraction + generation engine (Playwright → tokens → DESIGN.md). |
packages/designscan | The short npm name — a thin CLI shim over the engine (npx designscan <url>). |
examples/ | The brand corpus — DESIGN.md + HTML preview + token JSON per brand, with a gallery index. |
The engine ships as the publishable @designscan/extractor
package — a designscan CLI and a typed library — with
designscan as its short npx alias.
This is a pnpm workspace (corepack enable to get pnpm).
| Script | Does |
|---|---|
pnpm extract <url> [--format json|md|w3c|css] [--theme light|dark|both] [--preview] [--strict] [--timeout ms] [--out f] | Extract tokens in your format: profile JSON, DESIGN.md (--md shorthand), W3C Design Tokens, or CSS custom properties (--theme both = light + dark in one file; --preview = HTML proof sheet beside it; --strict = non-zero exit on a degenerate result) |
pnpm seed rebuild / pnpm seed add <url…> | Build the brand corpus under examples/ (md + preview + gallery; add extracts live) |
pnpm build | Compile the publishable package (tsc → dist) |
pnpm typecheck | Type-check all packages |
pnpm test | Run the test suite (vitest) |
pnpm check | Biome — format + lint (use pnpm format to auto-fix) |
pnpm lint:designmd | Validate examples/*.DESIGN.md against the official spec |
All of these run on every push/PR via GitHub Actions.
The engine is consumable as a library through its public API
(packages/extractor/src/index.ts).
DESIGN.md, lint-clean)--preview → self-contained token proof sheet, light/dark toggle)DESIGN.md now ships a Notes for your
coding agent section: deterministic, per-extraction instructions (contrast,
heading hierarchy, font fallback) so the consuming agent applies the tokens
with intent — no LLM on our side. (Optional LLM-refined prose still future.)pnpm seed, curated corpus + gallery) done; npx … add / checkout nextSee packages/extractor/README.md for the full
roadmap and engine details.