god-tokens
Skill0 starsChanged 2 months agoMITView on GitHub
Design tokens and design-system plumbing - W3C DTCG token JSON, primitive vs semantic vs component tokens, CSS custom properties, Tailwind v4 @theme, dark/brand theming, DESIGN.md files for coding agents, Style Dictionary and Figma variables mapping. Use when creating a design system, theming an app, exporting tokens, writing DESIGN.md, or syncing design and code.
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- god-accessibilitySkill
- god-anti-slopSkill
- god-brandingSkill
- god-colorSkill
- god-datavizSkill
- god-imagegenSkill
- god-layoutSkill
- god-mobileSkill
- god-motionSkill
- god-of-designSkill
- god-outputSkill
- god-presentationsSkill
- god-printSkill
- god-reviewSkill
- god-social-mediaSkill
- god-stylesSkill
- god-typographySkill
- god-ui-uxSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
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
- Very specific: line 87
Put a DESIGN.md in the project root so every agent builds on-style.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
God Tokens
Three tiers
- Primitive (raw values):
color.blue.600 = oklch(0.55 0.2 255),space.4 = 16px. - Semantic (roles):
color.accent = {color.blue.600},color.text.muted,space.section. Components consume these. - Component (optional):
button.primary.bg = {color.accent}.
Theme switching (dark, brand B, high contrast) remaps semantic tokens only.
DTCG JSON (W3C Design Tokens Community Group format)
{
"color": {
"$type": "color",
"cobalt": { "600": { "$value": "#1F3A93" } },
"ink": { "900": { "$value": "#1E2235" } },
"paper": { "50": { "$value": "#FAF6EE" } },
"accent": {
"$value": "{color.cobalt.600}",
"$description": "Primary interactive colour (İznik cobalt)"
},
"text": { "$value": "{color.ink.900}" },
"bg": { "$value": "{color.paper.50}" }
},
"font": {
"display": { "$type": "fontFamily", "$value": ["Cormorant Garamond", "Georgia", "serif"] },
"body": { "$type": "fontFamily", "$value": ["Albert Sans", "system-ui", "sans-serif"] }
},
"space": {
"$type": "dimension",
"1": { "$value": "4px" }, "2": { "$value": "8px" },
"4": { "$value": "16px" }, "8": { "$value": "32px" }
},
"radius": { "$type": "dimension", "md": { "$value": "8px" }, "lg": { "$value": "16px" } },
"duration": {
"$type": "duration", "fast": { "$value": "150ms" }, "base": { "$value": "250ms" }
}
}(DTCG 2025 also allows structured colour and dimension objects. Plain strings are the most widely supported by tools today.)
CSS variables + Tailwind v4
@import "tailwindcss";
@theme {
--color-bg: #FAF6EE;
--color-surface: #F1E8D8;
--color-text: #1E2235;
--color-text-muted: #5B607A;
--color-accent: #1F3A93;
--color-accent-contrast: #FFFFFF;
--font-display: "Cormorant Garamond", Georgia, serif;
--font-body: "Albert Sans", system-ui, sans-serif;
--radius-md: 8px;
--radius-lg: 16px;
--ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}
@media (prefers-color-scheme: dark) {
:root {
--color-bg: #12131A; --color-surface: #1B1D27;
--color-text: #ECEAF2; --color-text-muted: #A5A8BC;
--color-accent: #8FA8FF; --color-accent-contrast: #0B0C12;
}
}This generates utilities like bg-bg, text-text-muted, bg-accent, font-display and rounded-lg.
Tailwind v3 equivalent: theme.extend.colors.accent = 'var(--color-accent)' in tailwind.config.js.
DESIGN.md (for coding agents)
Put a DESIGN.md in the project root so every agent builds on-style. Use the template in references/DESIGN.template.md: YAML front matter tokens + prose rationale (the google-labs-code/design.md format). Keep it under ~300 lines. Include Do / Don't and component rules.
Mapping to tools
- Figma Variables: collections Primitives / Semantic, modes Light / Dark. Export with the Figma REST API or plugins (Tokens Studio) into DTCG JSON.
- Style Dictionary v4+ reads DTCG and outputs CSS, SCSS, iOS Swift, Android XML and Compose.
- Naming:
category.role.variant.state(e.g.color.text.muted,color.button.primary.bg.hover). Use kebab-case in CSS:--color-button-primary-bg-hover.
Checklist
- No raw hex in components; only semantic tokens.
- Every text/background semantic pair passes contrast in every theme.
- Spacing, radius, shadow and motion scales are tokenised.
- Tokens are documented with
$description. - One source of truth (JSON) generates all platform outputs.
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.

