tokens
Skill441 starsChanged 3 months agoMITView on GitHub
Audit or establish the project's 3-layer token spine. Invoke when the user asks for tokens on their UI, or mentions 'tokens' alongside design / UI / frontend work.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- Luclegay/claude-memory-kittheir own version, first seen Nov 16, 2026
- aibtcdev/skillstheir own version, first seen Nov 10, 2026
- sukirman1901/frontend-experttheir own version, first seen Sep 10, 2026
- dkadts/landing-kit-buildingtheir own version, first seen Aug 19, 2026
- apinizer/agentnizer-cookbooktheir own version, first seen Jul 21, 2026
- nitekeeper/ateliertheir own version, first seen Jun 26, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- aibtcdev/skills★ 11same name
- sukirman1901/frontend-expert★ 9same name
- apinizer/agentnizer-cookbook★ 2same name
- dkadts/landing-kit-building★ 2same name
- PeterCang/claude-tokens-plugin★ 1same name
- 15yotsuka/claude-skills★ 0same name
- Luclegay/claude-memory-kit★ 0same name
- nitekeeper/atelier★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository36 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/ui-craft/references/agents.mdAGENTS.md
- adaptSkill
- animateSkill
- auditSkill
- bolderSkill
- briefSkill
- clarifySkill
- colorizeSkill
- craftSkill
- critiqueSkill
- delightSkill
- distillSkill
- extractSkill
- finalizeSkill
- hardenSkill
- heuristicSkill
- polishSkill
- quieterSkill
- redesignSkill
- rememberSkill
- sddesignSkill
- shapeSkill
- startSkill
- typesetSkill
- ui-craft-dense-dashboardSkill
- ui-craft-editorialSkill
- ui-craft-minimalSkill
- ui-craftSkill
- unhappySkill
- friction-logSkill
- friction-logSkill
- ui-craft-dense-dashboardSkill
- ui-craft-editorialSkill
- ui-craft-minimalSkill
- ui-craftSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Read references/tokens.md before proceeding.
- Distinctive: line 74
Use OKLCH for color unless the project uses sRGB across the board — in that case flag the gap, propose OKLCH, but don't auto-convert.
- Distinctive: line 88
If the project has an existing token file, propose additions as patches — show what would change in a diff block:
- Distinctive: line 107
Don't impose Tailwind on a vanilla CSS project.
- Distinctive: line 108
Don't impose OKLCH if the project uses sRGB consistently — flag it, suggest migration, don't force it.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- HARNESS MIRROR — do not edit here. Canonical source: skills/ or commands/. After editing source, copy into cli/assets/<harness>/ and repo-root harness mirrors. -->Context: this sub-skill is one lens of the broader ui-craft skill. If the ui-craft skill is also installed, read its SKILL.md first for Discovery + Anti-Slop + Craft Test, then apply the specific lens below.
Read references/tokens.md before proceeding. The 3-layer contract (primitive → semantic → component) and the intentional-dark test are defined there.
Step 1: Detect existing tokens
Scan for token definitions in the project:
- CSS variables in
:root,[data-theme],[data-mode], or theme wrapper selectors - Tailwind config (
tailwind.config.js/ts) undertheme.extendortheme - CSS-in-JS theme objects (
theme.ts,*.styles.ts,styled.d.ts,ThemeProvider) design-tokens.jsonortokens.json(Style Dictionary / Theo)globals.css,variables.css,tokens.css
Build an inventory: which of the 7 categories exist (color / spacing / type / radii / shadows / motion / z-index), which layers are present (primitive / semantic / component), and whether both light and dark are defined.
Step 2: Route based on $ARGUMENTS and inventory
- "audit" → run audit only (Step 3). No proposals.
- "establish" → skip audit, go to Step 4.
- "color" / "spacing" / "type" / "radii" / "shadows" / "motion" / "z-index" → focus the audit and any proposal on that one category.
- empty → if tokens exist: audit. If nothing found: establish.
Step 3: Audit (tokens exist)
Evaluate against the contract in references/tokens.md. Output a severity-ranked gap list — don't propose code yet.
Check:
- 3-layer coverage — are primitive, semantic, and component layers all present? Missing semantics is the most common gap: primitives exist but nothing switches for dark mode and no surface stack is defined.
- 7-category coverage — any of (color / spacing / type / radii / shadows / motion / z-index) missing? Flag each absent category.
- Intentional dark mode — run the intentional-dark test: does dark mode do more than invert
--text-primary? Is--surface-canvasa tinted near-black (not#000)? Is accent chroma reduced 10-15%? Are shadows replaced with border rings? - Naming discipline — are primitives named for values (
--gray-500) not roles (--button-bg)? Are semantics named for roles (--text-primary) not values (--gray-900-text)? - No arbitrary values — inline colors, spacing, or z-index values that bypass the token system.
Output format:
| Severity | Category | Finding |
| Critical | Dark mode | --surface-canvas is #000 — runs the intentional-dark test |
| High | Semantics | No surface stack — components use raw primitives |
| Medium | Shadows | Single-layer shadows — ambient layer missing |
| Low | Z-index | Arbitrary values (z-index: 999) in 3 components |
Show what's missing. Do not propose code during audit unless the user asks.
Step 3b — Converge mode (explicit opt-in)
Load skills/ui-craft/references/loops.md preset token-consistency (budget = the default loop budget defined in loops.md). Emit the pre-flight cost notice. After fixing the top off-system value (raw hex color, arbitrary radius, or magic spacing), re-scan until zero off-system values or budget exhausted.
Step 4: Establish (no tokens found)
Propose a minimal spine inline. Cover all 7 categories. Always include both light and dark blocks — both intentional.
Minimal spine order:
- Primitives — neutral ramp (gray-50 to gray-950), one accent ramp, semantic color bases, spacing scale, type scale, radii, shadows, motion, z-index.
- Semantics — surface stack (5 levels), text roles, border roles, accent roles, status roles (success / warning / error / info).
- Component tokens — defer unless a specific component is already being built.
Use OKLCH for color unless the project uses sRGB across the board — in that case flag the gap, propose OKLCH, but don't auto-convert.
Before writing to a file, ask which file to write to. Detect from project structure and suggest one:
- Tailwind project →
globals.css(CSS variables inside:root) - CSS-in-JS →
theme.ts(exported theme object) - Vanilla CSS →
tokens.css(standalone variables file) - Cross-platform / multi-consumer →
design-tokens.json(Style Dictionary format)
Confirm with the user before writing.
Step 5: Never overwrite
If the project has an existing token file, propose additions as patches — show what would change in a diff block:
:root {
+ /* ── Semantic surface stack (new) ── */
+ --surface-canvas: var(--gray-50);
+ --surface-raised: var(--gray-100);
+ --surface-overlay: #fff;
+ --surface-sunken: var(--gray-200);
+ --surface-inverse: var(--gray-900);
}Let the user apply. Don't write directly unless they approve.
Constraints
- Don't impose Tailwind on a vanilla CSS project. Match the project's existing syntax.
- Don't impose OKLCH if the project uses sRGB consistently — flag it, suggest migration, don't force it.
- Respect existing naming conventions — if the project uses
--color-primaryover--accent-500, extend that pattern rather than introducing a parallel naming scheme.
Next step: /craft — build on the spine you just established (rung 1).
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.

