Design tokens prompt
A design tokens prompt turns your DESIGN.md into a tokens file in the Design Tokens Community Group format. The same colours, type and spacing then feed code, design tools and AI builders without anyone retyping a value.
- Stage
- Design, step 10 of 40
- Use it
- Once DESIGN.md has stopped changing every day, and before a developer or a second tool joins the project.
- You need
- A settled DESIGN.md
- You get
- A design.tokens.json file with raw values and role tokens that point to them.
The prompt
Convert DESIGN.md into a design tokens file in the
Design Tokens Community Group format, version 2025.10.
Use $value and $type on every token.
Groups: color, font, spacing, radius, size.
Name tokens by role, not by value: color.text.primary, not color.black.
Add $description to any token whose use isn't obvious.
Use references such as {color.grey.900} instead of repeating values.
Return one valid JSON file named design.tokens.json.JSON version, for teams and automations
Fill each value under "inputs", keep the rest. It follows the prompt schema. When to use JSON.
{
"$schema": "https://websitesdesigner.com/insights/prompts/prompt.schema.json",
"id": "design-tokens",
"name": "Design tokens prompt",
"stage": "design",
"step": 10,
"of": 40,
"version": "2026-11-19",
"url": "https://websitesdesigner.com/insights/prompts/design-tokens/",
"inputs": {},
"instructions": [
"Convert DESIGN.md into a design tokens file in the Design Tokens Community Group format, version 2025.10.",
"Use $value and $type on every token.",
"Groups: color, font, spacing, radius, size.",
"Name tokens by role, not by value: color.text.primary, not color.black.",
"Add $description to any token whose use isn't obvious.",
"Use references such as {color.grey.900} instead of repeating values.",
"Return one valid JSON file named design.tokens.json."
],
"output": "A design.tokens.json file with raw values and role tokens that point to them.",
"checks": [
"It parses as JSON.",
"Every token has $value and $type.",
"Role tokens use references, not copied values."
]
}Example output
{
"color": {
"grey": {
"900": { "$type": "color", "$value": { "colorSpace": "srgb", "components": [0.067, 0.067, 0.067], "hex": "#111111" } },
"000": { "$type": "color", "$value": { "colorSpace": "srgb", "components": [1, 1, 1], "hex": "#ffffff" } }
},
"text": {
"primary": { "$type": "color", "$value": "{color.grey.900}", "$description": "Body text and headings" }
}
},
"spacing": {
"4": { "$type": "dimension", "$value": { "value": 16, "unit": "px" } }
}
}What good output looks like
- It parses as JSON.
- Every token has $value and $type.
- Role tokens use references, not copied values.
What experts miss
- Name tokens by role, not by value. A token called color.blue breaks the day the brand turns green. color.action.primary survives.
- Keep two tiers. Raw values such as color.grey.900, and roles that point to them such as color.text.primary. A dark mode then changes only the roles.
- It's a community standard, not a W3C Recommendation. The format is stable and tools are adopting it, but check that yours read version 2025.10 before you depend on it.2
Why it works
The Design Tokens Community Group published the first stable version of its format, 2025.10, on 28 October 2025.1 It gives design tools and code one shared JSON format for design decisions. A tokens file turns your rules into data that tools can read, instead of prose they have to interpret.
How to adapt it
- Add a dark theme as a second set of role tokens.
- Ask for a CSS custom properties file generated from the tokens.
Mistakes to avoid
- Tokens for one-off values. If it's used once, it isn't a token.
- Hand-editing values in code after the tokens exist.
Go deeper
Start from the DESIGN.md prompt. The design system and spacing scale entries explain what the tokens hold. This prompt is part of the design stage. It follows the AI website design prompts guide and the six steps in how to use AI to design a website.