Define a design token architecture
Designs a three-tier design token architecture (primitive, semantic, component) with naming conventions, theming rules and a sample token file. Use when starting or restructuring a design system.
Token systems break in familiar ways: components reference raw values like blue-500 directly, so a dark theme means editing every component; names describe the value (color-light-grey) instead of the role, so they lie the moment the value changes; and hundreds of one-off component tokens appear that nobody can maintain. A sound architecture separates what a value is (primitive) from what it is for (semantic), adds component tokens only where a component genuinely needs its own knob, and makes theming a matter of remapping the semantic layer.
Design the token architecture.
Only if [PLATFORMS] is given: Platforms: . Themes: . If no platforms were given, assume web plus a design tool, and say so.
- Principles: 3 to 5 rules for the system, including "components never reference primitives".
- Naming: define the grammar, for example
{category}.{concept}.{variant}.{state}for semantic tokens (color.text.secondary,color.bg.danger.hover) and{category}.{hue or scale}.{step}for primitives (color.blue.600,space.4). Give the allowed words for each segment, the casing, and how the names map to each platform (CSS custom properties, Swift, Kotlin or XML). - Primitive tokens: colour ramps derived from the brand inputs (10 to 12 steps per hue, built in a perceptual space such as OKLCH so steps look even; list the target lightness per step and mark hand-converted hex values as approximate, to be regenerated by a colour tool), neutrals, spacing scale (a 4 px base is common), radii, border widths, type families, sizes, weights and line heights, shadows or elevation, and motion durations and easings. Give values.
- Semantic tokens: the role layer, grouped by category: backgrounds and surfaces, text, borders, interactive (default, hover, pressed, focus, disabled), status (success, warning, danger, info), and elevation. Show the value for each theme as a reference to a primitive.
- Component tokens: only where a component needs to diverge from the semantic layer or be tuned independently (for example
button.primary.bg), with the rule for when one may be added. - Token file sample: a JSON excerpt in the W3C Design Tokens Community Group format (
$value,$type, aliases as{color.blue.600}), covering one primitive group, a few semantic tokens with per-theme values, and one component token. Show how themes are expressed (separate files or sets per theme). - Theming rules: how each theme in remaps the semantic layer; for dark themes, use lighter surfaces for higher elevation instead of shadows, avoid pure black and pure white body text, and re-check contrast. State that every text-on-background semantic pair must meet 4.5:1 (3:1 for large text and UI) in every theme, and list the pairs to verify.
- Platform delivery: how the source becomes platform outputs with a token build tool, and which tokens each platform needs.
- Governance: how tokens are proposed, deprecated (alias to the successor before removal) and versioned.
- If brand inputs are too thin to derive colours (no colour at all), ask for them, or propose placeholder hues clearly marked "placeholder".
- Do not claim contrast ratios you have not computed. Mark pairs "to verify" unless you show the calculation.
- Keep the semantic layer small enough to learn: aim for tens of semantic colour tokens, not hundreds.
- Names describe purpose, never appearance, at the semantic and component tiers.
- Separate what you verified from what you inferred. Mark inferences as such.
- When you do not know, say "I don't know" once and state what would settle it.
Markdown with the contract's sections in order. Use tables for the primitive, semantic (one column per theme) and component tiers, and a fenced json block for the token file sample.
1 required value still a placeholder; the assistant will ask for it.
details
- kind
- Prompt: a task you run by name to get one finished thing back
- domain
- Design
- category
- Design systems
- level
- Expert
- made for
- Product / UX / UI designer, Frontend engineer
- risk
- read-only
- version
- v1.0.0 · incubating
- reviewed
- 2026-10-02
- works in
- Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Antigravity, OpenCode, Windsurf, Zed, Continue, AGENTS.md, ChatGPT, claude.ai
use in
npx @hermes-hq/hodios install define-design-tokens --target claude-codenpx skills add hermes-hq/hodios-dist --skill define-design-tokens -a claude-codeclaude plugin marketplace add hermes-hq/hodios-distclaude plugin install hodios-design@hodiosThe plugin brings every entry in this domain at once.
pairs well with
All of Design systemsWrite a design-system component spec
Writes a design-system component spec covering anatomy, variants, states, behaviour, tokens, content rules, dos and don'ts, and accessibility. Use when adding or documenting a component.
write-component-specCreate an accessible colour palette
Creates a brand colour palette with roles (primary, accents, neutrals, status), tonal scales and computed text-contrast results for every pairing. Use when building a brand or product colour system.
create-color-paletteAudit design consistency across screens
Inventories spacing, type, colour, radii and component variants across screens, finds near-duplicates and plans their consolidation. Use before building or cleaning up a design system.
audit-design-consistencyProduct designer
Product designer who frames the problem before the pixels, explores several options, designs every state and defends decisions with user evidence. Use as a design partner or reviewer.
product-designerDefine an icon system
Defines an icon system with grid and keylines, stroke and corner rules, sizes, naming, metaphors, accessibility and contribution rules. Use when a design system creates or tidies up its icons.
define-iconographyDesign a dark theme
Designs a dark theme from an existing light palette, covering surface elevation, semantic colour mapping, contrast checks, images, charts and token changes. Use when a design system adds dark mode.
design-dark-mode