design-token-init
Skill1 starsChanged 7 months agoMITView on GitHub
Scaffold a new design token system interactively, or bootstrap one from an existing codebase with `--from-codebase`. Guides the user through brand color, spacing base, type scale, and dark mode choices, then runs `quieto-tokens init` to generate a complete DTCG token system with multi-platform outputs (CSS, Figma, iOS, Android). Use when the user wants to create or bootstrap a new token system.
- Installs packages
In this repository6 other files it gives its agents.
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 4 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Before running anything, verify the CLI is available:
- Very specific: line 18
If this fails, tell the user to install the package first (npm install @quieto/tokens).
- Distinctive: line 24
Ask the user what they need.
- Distinctive: line 33
If the user already stated preferences (e.g.
- Very specific: line 63
Use --dry-run first if the user wants to preview without writing files:
- Distinctive: line 77
After init completes, check what was generated:
- Very specific: line 94
Run /design-token-audit to verify the system health
- Very specific: line 95
Use /design-token-category-add to add shadow, border, or animation tokens
- Very specific: line 96
Use /design-token-component to generate component-level tokens
- Very specific: line 97
Run /design-token-migrate to scan existing CSS for hardcoded values to replace
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Design Token Init
You are helping the user scaffold a new design token system using @quieto/tokens.
Prerequisites
Before running anything, verify the CLI is available:
npx quieto-tokens --versionIf this fails, tell the user to install the package first (npm install @quieto/tokens).
Workflow
1. Gather intent
Ask the user what they need. The key inputs are:
- Brand color: a hex color (e.g.
#4F46E5). This seeds the primary color ramp. - Spacing base:
4or8(pixel unit). Determines the spacing scale. - Type scale:
compact,balanced, orspacious. Controls font-size progression. - Dark mode: whether to generate both light and dark themes.
- Advanced mode: whether to customize individual tokens per category (additional hues, custom spacing steps, typography overrides).
- Output platforms: CSS is always included. Optionally: Figma JSON, iOS Swift, Android (XML or Compose).
If the user already stated preferences (e.g. "set up tokens with brand color #E11D48"), extract what you can and confirm the rest with sensible defaults.
Bootstrapping from an existing codebase: If the user already has stylesheets and wants to seed the system from them rather than answering prompts, use --from-codebase. It analyzes existing CSS/SCSS/Sass/Less/Styl, proposes a token system, and shows a preview before anything is written. Scans the current directory by default, or pass --from-codebase=<path> to scan elsewhere.
This works on already-tokenized codebases too: var(--x) references are resolved through custom-property definitions and counted as usage, so a token referenced many times outweighs single-use literals in the inference, and a dark :root/html/body background turns on light + dark theme generation even without prefers-color-scheme styles. If the CLI warns Existing token system detected, explain that init rebuilds a system from scratch — if the user actually wants to modify an existing Quieto system, point them to /design-token-update or /design-token-category-add instead.
2. Run the CLI
Execute the init command:
npx quieto-tokens initOr with advanced mode:
npx quieto-tokens init --advancedOr bootstrap from existing stylesheets instead of prompting:
npx quieto-tokens init --from-codebasenpx quieto-tokens init --from-codebase=src/stylesUse --dry-run first if the user wants to preview without writing files:
npx quieto-tokens init --dry-runThe CLI is interactive (uses @clack/prompts), so it will prompt for each input. Since the CLI requires interactive terminal input, tell the user to run this command themselves using ! prefix:
! npx quieto-tokens init3. Verify output
After init completes, check what was generated:
ls tokens/
ls build/
cat quieto.config.jsonSummarize the generated token system for the user:
- Number of tokens per tier (primitive, semantic, component)
- Categories included (color, spacing, typography)
- Output platforms configured
- Whether dark mode was generated
4. Next steps
Suggest logical follow-ups:
- Run
/design-token-auditto verify the system health - Use
/design-token-category-addto add shadow, border, or animation tokens - Use
/design-token-componentto generate component-level tokens - Run
/design-token-migrateto scan existing CSS for hardcoded values to replace
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

