Turn your design system into a reference-first Claude skill

Turn your tokens and brand notes into a Claude skill: a short SKILL.md that orients, one tokens file that holds every value, and component files that load on demand.

Prompt intermediate Tested Opus 5.5 · Nov 2026May be dated

The prompt

Run it in Claude Code from the repo that holds your tokens, or in a chat with your token file and brand notes attached. In the brand notes, list any component families your apps use beyond the core set (tables, dialogs, tabs…). In Claude Code, put file paths in the placeholders and add "Write the files to .claude/skills/<brand>-design/." at the end. In a chat, save the files it returns to that folder, or zip the folder and upload it in Claude's skill settings.

Fill in the blanks4 placeholders · empty ones stay as {{…}}

Example

The download is a worked example for Copperline, an invented brand. It was written to this prompt's structure from the inputs below, not generated by the prompt. The output here is the prompt's own reply to the same inputs.

Input (the prompt's placeholders):

  • brand: Copperline
  • brand_notes: "Scheduling tool for small field-service crews. Practical, calm, warm-industrial. Copper is the only accent, slate supports it, cool grey surfaces. Not glossy, not playful, light first. Big numbers matter: counts, totals, times."
  • tokens_source: "primary #a4441c (copper), secondary #3d5263 (slate), tertiary #2b6a6e (teal), error #b3261e. Page #f7f8f9, cards #ffffff, text #171a1d. Fonts: Bricolage Grotesque (headings), Source Sans 3 (UI), IBM Plex Mono (data). Radii: 4px controls, 8px cards. 4-point spacing."
  • stack: plain HTML and CSS, no build step

Output (trimmed: parts of SKILL.md and of the tokens.md :root block, then three of the reply's 74 contrast rows, its verdict and the first open question):

## What each colour is for

- **Copper (primary):** the only accent. The main action, links, text buttons, the focus ring, the focused field border, text selection.
…
- **Teal (tertiary):** done and confirmed status only (`tertiary-container`). Never buttons, links, highlights or decoration. The notes say copper is the only accent but the tokens include teal, so teal stays off anything that reads as an accent until the team decides (open question 1).
…

## When to load which file

| Task | Load |
|---|---|
| Any frontend task (always, first) | `references/tokens.md` |
…
| Dashboard, KPI or stat tiles, app navigation | + `components-core.md`, Dashboard shell |
…
| Dialog, menu, snackbar | No file yet: principles 2, 4, 6 and 7 plus the decision table |
…

## Quick decision table

| Need | Use |
|---|---|
…
| Hovered card | `surface-container` + `elevation-level2` |
…
| Big figures | `figure-large` (one hero per view), `figure-medium` (stat tiles), `figure-small` (inside cards) |
…
:root {
  …
  --md-sys-color-primary: #a4441c;
  --md-sys-color-on-primary: #ffffff;                  /* derived: P100 */
  --md-sys-color-primary-container: #ffdbcf;           /* derived: P90 */
  --md-sys-color-on-primary-container: #802a02;        /* derived: P30 */
  …
  --md-sys-color-surface: #f7f8f9;                     /* brand: page */
  --md-sys-color-on-surface: #171a1d;                  /* brand: text */
  --md-sys-color-on-surface-variant: #40484b;          /* derived: NV30 */
  --md-sys-color-surface-container-lowest: #ffffff;    /* derived: N100 */
  --md-sys-color-surface-container-low: #ffffff;       /* brand: cards */
  --md-sys-color-surface-container: #eceeef;           /* derived: N94 */
  …
}
Pair Theme Colours Ratio Needs Result
on-primary / primary light #ffffff on #a4441c 6.14:1 4.5:1 pass
outline / surface-container-high light #70787c on #e6e8ea 3.66:1 3:1 pass
inverse-primary / inverse-surface dark #a4441c on #e1e3e4 4.77:1 4.5:1 pass

Every pair passes in both themes, so no derived value needed adjusting and no brand value fails. …

  1. Teal is a second accent. The notes say "copper is the only accent"; the tokens add teal (#2b6a6e) as tertiary.
    • The skill restricts teal to done and confirmed status (tertiary-container) and bans it from actions and highlights.
    • Is teal meant as an accent, as a status colour, or should it be dropped?

SKILL.md sends each task to a file, or to the principles where no file exists yet, and its decision table names tokens, not values. Every derived colour in tokens.md names the tonal-palette tone it came from, all 74 contrast ratios recompute to the same figures, and the clash over teal came back as a question rather than a silent choice.

Why it works

  • Orientation always, detail on demand. SKILL.md sits in context for every UI task, so it stays short and carries only what every task needs: identity, principles, decision table, checklist. tokens.md loads with every UI task too, and the long component files load only when the "when to load which file" table names them. A fixed core file plus one file per family the team names keeps out components nobody builds. Context stays small, and Claude doesn't have to guess which file matters.
  • Roles, not values, with literals in one file. Components can only say var(--md-sys-color-primary), and SKILL.md's principles and decision table name tokens without their values, so dark mode is an edit to tokens.md alone, and a rebrand changes tokens.md plus the SKILL.md lines that name the brand's colours and fonts. Claude can't drift to its default palette or fonts. Banning literal rgba() colours and limiting raw pixels to borders closes the two leaks that most often break dark mode and spacing. Material 3 role names and one naming scheme reuse what the model already knows about primary-container or surface-container-high, and give a Tailwind theme or a second brand fixed names to map onto.
  • "What this is NOT" and a decision table turn taste into lookups. Left alone, Claude fills gaps with its house style: Inter, gradients, purple accents, soft shadows everywhere. Naming the wrong looks and fonts blocks them, and need → token rows answer the questions it would otherwise improvise. The checklist spells out the checks that are easiest to skip (the token block in a standalone file, every control state, 360px, labels on icon-only buttons), so Claude verifies them rather than just reading the rules.
  • Derived values computed, flagged and re-checked. Real token sources have gaps. Claude may fill them, but from the M3 tonal palette, so runs agree on the tones. Every invented value is marked and listed, every contrast ratio is computed rather than guessed, and a clash between the notes and the tokens comes back as a question instead of a silent choice. Hand-written design-system skills often contradict themselves (the table says 6px buttons, the CSS says pill); the final cross-check, which includes every state of every component, stops the skill from teaching two answers.

Variations

  • Tailwind or a component library. Ask tokens.md to map the theme to the same CSS variables. In Tailwind v4 that is @theme inline { --color-primary: var(--md-sys-color-primary); --radius-sm: var(--md-sys-shape-corner-small); } in your CSS; in v3 it is theme.extend in tailwind.config.js (colors: { primary: 'var(--md-sys-color-primary)' }). Utility classes and raw CSS stay in sync, and dark mode still switches through the attribute.
  • Several brands. Share the component files and give each brand its own tokens.md and Identity section. With the role names fixed, nothing else changes.
  • Audit an existing skill. Replace the first paragraph with "Audit this design-system skill against the rules below and list every violation with file and section". It finds hard-coded colours, off-scale values and table-versus-CSS mismatches.
  • Lint it. Add a CI step that fails when grep -nP '#[0-9a-fA-F]{3,8}\b|\b(rgba?|hsla?)\(|(?<![\d.])(?![12]px\b)\d+(\.\d+)?px\b' components-*.md | grep -v '@media' prints anything. It lets through 1px and 2px borders and the literal breakpoints, and catches stray hex, rgb() and hsl() colours and pixel sizes, so the token rule survives human edits.
  • Forking the download. It is named design-system-skill to match this page; rename the folder and name, and add your team's own trigger phrases to the description.
  • Generalised from a brand design skill.

Install as a skill

This entry comes with a SKILL.md and 2 reference files. Claude loads it whenever a request matches its description.

  • Claude Code: unzip into .claude/skills/ in your project, or ~/.claude/skills/ for every project.
  • Claude apps: upload the .zip under Customize → Skills → + → Create skill → Upload a skill. Skills need code execution, which is under Settings → Capabilities.