extract-design-system

Installation
SKILL.md

Extract design system

This skill turns a codebase into an artifact made from Claude's built-in Design System type. The artifact holds a README.md brand book, tokens.json, a README.md and preview.html per component over one prefixed components/bundle.css, assets/, fonts/ and a cover. The code is the source of truth for every value. The type's own reference files are the source of truth for every file shape.

<skill-dir> is the directory holding this file. <ds> is a fresh folder in the session scratchpad (or mktemp -d); every system file goes to <ds>/project/<path>. The repository is read-only: never edit, commit, install or build it unasked.

Quick start

K=<skill-dir>/scripts
node $K/scan.mjs <repo> --out <ds>/inventory.json             # sources, themes, fonts, marks, components by use, Tailwind steps in use
node $K/css-to-tokens.mjs <repo>/app/globals.css --src <repo> \
  --resolve <repo>/node_modules/tailwindcss/theme.css \
  --name "Acme" --out <ds>/project/tokens.json --report <ds>/tokens-report.json
node $K/check.mjs <ds>                                         # what the page would drop, contrast per theme, previews, cover, index
node $K/check.mjs <ds> --map                                   # once clean: the publish calls, index last

Workflow

Installs
1
Repository
alon710/configs
GitHub Stars
2
First Seen
5 days ago