token-architecture
Skill249 starsChanged 6 months agoMITView on GitHub
Use when building or restructuring design token systems — global tokens, semantic tokens, component tokens, naming conventions, theming, and multi-platform token distribution
In this repository36 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- accessible-contentSkill
- adaptive-interfacesSkill
- cognitive-accessibilitySkill
- design-debateSkill
- design-debt-trackerSkill
- design-discoverySkill
- design-expressSkill
- design-handoffSkill
- design-librarySkill
- design-mdSkill
- design-memorySkill
- designpowers-critiqueSkill
- design-retrospectiveSkill
- design-reviewSkill
- design-stateSkill
- design-strategySkill
- design-system-alignmentSkill
- design-tasteSkill
- figma-bridgeSkill
- heuristic-evaluationSkill
- inclusive-personasSkill
- inspiration-scoutingSkill
- interaction-designSkill
- motion-choreographySkill
- research-planningSkill
- responsive-patternsSkill
- synthetic-user-testingSkill
- taste-feedbackSkill
- taste-reportSkill
- ui-compositionSkill
- usability-testingSkill
- using-designpowersSkill
- verification-before-shippingSkill
- voice-and-toneSkill
- writing-design-plansSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is 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.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
When starting a new design system
- Very specific: line 13
When design-system-alignment identifies inconsistency
- Distinctive: line 14
When adding theming (dark mode, brand variants)
- Distinctive: line 15
When shipping across web, iOS, and Android
- Distinctive: line 63
Always define foreground/background pairs together and verify AA contrast
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
Token Architecture
Design tokens are the single source of truth for visual decisions. They bridge design intent and code. This skill structures how tokens are named, layered, and distributed.
When to Use
- When starting a new design system
- When
design-system-alignmentidentifies inconsistency - When adding theming (dark mode, brand variants)
- When shipping across web, iOS, and Android
The Three-Layer Model
Layer 1: Global Tokens (the palette)
Raw values. Named by what they are, not what they do.
--color-green-500: #2D6B4F;
--space-4: 16px;
--radius-md: 12px;These never appear in component CSS.
Layer 2: Semantic Tokens (the meaning)
Map global tokens to roles. Named by what they do.
--color-surface: var(--color-green-100);
--color-text-primary: var(--color-green-900);
--color-accent: var(--color-green-500);Theming happens here — dark mode swaps semantic mappings, not global values.
Layer 3: Component Tokens (the specifics)
Map semantic tokens to component contexts. Optional but valuable at scale.
--button-bg: var(--color-accent);
--card-bg: var(--color-surface);Naming Convention
--{category}-{property}-{variant}-{state}
Categories: color, space, font, radius, shadow, motion. Never use hex values in names or ambiguous abbreviations.
Theming
Dark mode is a semantic token remap:
[data-theme="dark"] {
--color-surface: var(--color-grey-900);
--color-text-primary: var(--color-grey-100);
}Global tokens stay. Semantic tokens swap. Component tokens inherit.
Accessibility
- Always define foreground/background pairs together and verify AA contrast
- Motion tokens must include
--motion-duration-none: 0msfor reduced-motion
What You Deliver
- Token file (CSS custom properties, JSON, or both) with all three layers
- Naming convention document
- Theme variants if applicable
Integration
- Informed by:
design-lead,ui-composition - Feeds into:
design-builder,design-system-alignment
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.

