DESIGN.md — AI-readable design system files
DESIGN.md is an open format introduced by Google Stitch (the design.md spec —
https://stitch.withgoogle.com/docs/design-md/). It's a single Markdown file, dropped in a
project's root next to README.md, that an AI coding agent reads to generate or restyle UI
consistently with a brand. It works because it pairs two layers in one file:
"Tokens give agents exact values. Prose tells them why those values exist and how to apply
them." — design.md spec
- YAML front matter — machine-readable design tokens (colors, typography, spacing, shape,
components) an agent can reference exactly.
- Markdown body — human-readable rationale, organized into a canonical section order, that
tells the agent why those values exist and how to apply them in context.
This is the format used by Stitch, and it's Claude/Cursor-compatible: the workflow is "drop
DESIGN.md in the repo root → tell the agent Use the @DESIGN.md file and style my app."
A community collection of 70+ real-world examples (Linear, Stripe, Apple, Figma, Cursor, Tesla,
etc.) lives at https://github.com/voltagent/awesome-design-md — each entry pairs a DESIGN.md
with preview.html/preview-dark.html visual catalogs. Use these as calibration references for
tone, token granularity, and section depth.
When to use this skill
- User asks to create/write a
DESIGN.md for a project, brand, or product.
- User wants to reverse-engineer a brand's visual identity (from a PDF deck, screenshots, a
live site, Figma file, or brand guidelines) into a portable, agent-readable spec.
- User wants an AI coding tool to apply a consistent design system when generating or
restyling UI —
DESIGN.md is the artifact that makes that possible without Figma exports,
JSON token files, or special tooling.
- User references "Stitch", "design.md", "AI design system file", or asks to document a brand
"the way Google does it."
The format
YAML front matter (token layer)
version: alpha # or a semver-style string
name: <string> # e.g. "Acme-design-analysis"
description: "<string>" # 3-6 sentence brand summary — see Overview guidance below
colors:
<token-name>: "<CSS color: hex | rgb | oklch | named>"
typography:
<token-name>:
fontFamily: <string>
fontSize: <px|rem>
fontWeight: <number>
lineHeight: <number>
letterSpacing: <px|em>
fontFeature: <string> # optional
fontVariation: <string> # optional
rounded:
<scale-level>: <px | "organic"> # "organic" is valid for hand-drawn/blob shape systems
spacing:
<scale-level>: <px | number>
components:
<component-name>:
backgroundColor: "{colors.<token>}" # bracket notation = token reference
textColor: "{colors.<token>}"
typography: "{typography.<token>}"
rounded: "{rounded.<token>}"
padding: <value>
size / height / width: <value>
Token references use bracket notation — {colors.primary}, {typography.body} — both
inside components: and inline in the Markdown prose, so the agent can trace every described
value back to its canonical definition.
Component variants (hover, active, pressed, focused, selected) are separate top-level entries
with related names (button-primary, button-primary-hover, button-primary-pressed), not
nested state objects.
Markdown body (rationale layer) — canonical section order
All sections are technically optional, but real-world examples consistently include these, in
this order:
- Overview — Brand & style summary, "Key Characteristics" bullet list. This is the single
most load-bearing section: a dense paragraph plus 5-8 bullets that an agent can hold in mind
while generating anything, even before consulting token details.
- Colors — Grouped by role (Brand & Accent / Surface / Text / Semantic — not just a flat
swatch list), each entry naming the token, its hex, and where it's used.
- Typography — Font family rationale (including open-source substitutes for proprietary
typefaces), then a hierarchy table (token / size / weight / line-height / letter-spacing /
use), then "Principles" — the rules that generate the hierarchy, not just its values.
- Layout — Spacing system (base unit + scale), grid/container/composition patterns,
whitespace philosophy.
- Elevation & Depth — A table of elevation levels and their treatment (shadow / surface lift
/ border), plus notes on decorative depth (gradients, photography, screenshots).
- Shapes — Border-radius scale as a table, plus photography/illustration geometry notes.
For brands with organic/hand-drawn ornament systems (blobs, brushstrokes), document them here
as their own subsection with explicit "keep it irregular/asymmetric" guidance.
- Components — Grouped by family (Buttons, Cards, Inputs, Navigation, etc.), each entry
naming its token, describing every state, and citing token references.
- Do's and Don'ts — The guardrail section. This is where negative space gets defined —
what the brand explicitly avoids (second accent colors, dark mode, generic icon libraries,
shadows, etc.). Often the highest-value section for preventing agent drift.
- Responsive Behavior — Breakpoint table, touch-target minimums, collapsing strategy,
image/photography behavior across viewports.
- Iteration Guide (optional but valuable) — A numbered checklist for using the file:
"focus on one component at a time," "run the linter after edits," "treat [accent color] as
scarce." Frames the file as a working tool, not a static spec.
- Known Gaps (optional but valuable — especially for reverse-engineered files) — Explicit
list of what's not documented (no dark mode, proprietary fonts, missing states, values that
are estimates pending verification). Prevents the agent from inventing answers to unasked
questions.
CLI tooling (per the spec)
npx @google/design.md lint DESIGN.md # validate structural correctness
npx @google/design.md diff old.md new.md # compare versions, detect regressions
npx @google/design.md export --target=tailwind-v4 # convert to Tailwind/DTCG formats
npx @google/design.md spec # print the formal specification
How to write one (process)
- Gather source material — brand deck/PDF, live site, screenshots, Figma file, or brand
guidelines. Read/view all of it before writing a single token; the Overview section depends on
having seen the whole system.
- Name the single chromatic identity (or the deliberate multi-accent system, if that's the
brand). Most strong brands run on one accent color plus neutrals — name it first, then build
the neutral ladder around it.
- Build the color palette by role, not by hue: brand/accent, surface/canvas, text/ink,
semantic. Estimate hex values conservatively from what you can see; always flag estimates
in the description and in "Known Gaps" rather than presenting guesses as confirmed values.
- Build the typography hierarchy as a table — work top-down from the largest display size to
captions, and always note what the real typeface is (even if proprietary) plus an
open-source substitute an agent can actually use.
- Name the shape/spacing scale — derive a base unit (commonly 4px or 8px) and build the
scale as multiples of it.
- Write Components last, after the token vocabulary exists — every component entry should
resolve entirely to
{token references}, never to raw values.
- Write Do's and Don'ts from what you didn't see — the absence of dark mode, the absence
of a second accent, the absence of drop shadows, are all real signal. State them as rules.
- Always include "Known Gaps" when the file is reverse-engineered (vs. exported from a real
design system) — name what's estimated, what's missing, and what needs founder/designer
confirmation before the tokens are locked for production.
Calibration references
Pull a comparable brand from https://github.com/voltagent/awesome-design-md before writing —
matching tone matters as much as matching structure:
- Linear (
design-md/linear.app/DESIGN.md) — dark, single-accent, software-craft tone; great
reference for surface-ladder elevation systems and restrained semantic color.
- Cursor (
design-md/cursor/DESIGN.md) — warm-cream editorial canvas with one orange accent
plus a scoped pastel sub-palette for in-product states; good reference for "single brand
voltage + contained secondary palette" patterns and for documenting proprietary/custom fonts
with open-source substitutes.
Clone the repo locally to browse more (git clone --depth 1 https://github.com/voltagent/awesome-design-md) — 70+ examples span SaaS, consumer, fashion,
and enterprise brands.
Output
Write the file as DESIGN.md in the project root (capitalized, exactly — agents and tools look
for that exact filename next to README.md). If reverse-engineering from non-canonical sources
(PDF, screenshots, a live site you can't inspect pixel values on), say so explicitly in the
description front-matter field and in "Known Gaps" — never present visual estimates as
confirmed brand values.
See Also
brand-identity — runs the interview that decides what the brand should be for a new
project; hands off here for the actual DESIGN.md file format and spec.
taste-skill — builds NEW UI from a brief; reads this file's tokens first when they exist,
then handles execution discipline (anti-AI-tells, dials) on top.
taste-redesign — for elevating a UI that already has a DESIGN.md/identity, rather than
defining one from scratch.
frontend-slides — reads this file's tokens for presentations too, instead of its own
built-in presets, when a project already has an identity.
1---2name: design-md3description: Write, read, and apply DESIGN.md files — Google Stitch's open AI-readable design-system format (YAML design tokens + Markdown rationale). Use when asked to "create a design.md", "extract a design system from [brand/PDF/site/screenshots]", "document this brand for AI tools", or when reverse-engineering a brand's visual identity into reusable tokens for an AI coding agent to apply consistently.4---56# DESIGN.md — AI-readable design system files78`DESIGN.md` is an open format introduced by **Google Stitch** (the design.md spec —9https://stitch.withgoogle.com/docs/design-md/). It's a single Markdown file, dropped in a10project's root next to `README.md`, that an AI coding agent reads to generate or restyle UI11consistently with a brand. It works because it pairs two layers in one file:1213> "Tokens give agents exact values. Prose tells them why those values exist and how to apply14> them." — design.md spec1516- **YAML front matter** — machine-readable design tokens (colors, typography, spacing, shape,17 components) an agent can reference exactly.18- **Markdown body** — human-readable rationale, organized into a canonical section order, that19 tells the agent *why* those values exist and *how* to apply them in context.2021This is the format used by Stitch, and it's Claude/Cursor-compatible: the workflow is "drop22`DESIGN.md` in the repo root → tell the agent `Use the @DESIGN.md file and style my app`."2324A community collection of 70+ real-world examples (Linear, Stripe, Apple, Figma, Cursor, Tesla,25etc.) lives at https://github.com/voltagent/awesome-design-md — each entry pairs a `DESIGN.md`26with `preview.html`/`preview-dark.html` visual catalogs. Use these as calibration references for27tone, token granularity, and section depth.2829## When to use this skill3031- User asks to **create/write a `DESIGN.md`** for a project, brand, or product.32- User wants to **reverse-engineer a brand's visual identity** (from a PDF deck, screenshots, a33 live site, Figma file, or brand guidelines) into a portable, agent-readable spec.34- User wants an AI coding tool to **apply a consistent design system** when generating or35 restyling UI — `DESIGN.md` is the artifact that makes that possible without Figma exports,36 JSON token files, or special tooling.37- User references "Stitch", "design.md", "AI design system file", or asks to document a brand38 "the way Google does it."3940## The format4142### YAML front matter (token layer)4344```yaml45version: alpha # or a semver-style string46name: <string> # e.g. "Acme-design-analysis"47description: "<string>" # 3-6 sentence brand summary — see Overview guidance below4849colors:50 <token-name>: "<CSS color: hex | rgb | oklch | named>"5152typography:53 <token-name>:54 fontFamily: <string>55 fontSize: <px|rem>56 fontWeight: <number>57 lineHeight: <number>58 letterSpacing: <px|em>59 fontFeature: <string> # optional60 fontVariation: <string> # optional6162rounded:63 <scale-level>: <px | "organic"> # "organic" is valid for hand-drawn/blob shape systems6465spacing:66 <scale-level>: <px | number>6768components:69 <component-name>:70 backgroundColor: "{colors.<token>}" # bracket notation = token reference71 textColor: "{colors.<token>}"72 typography: "{typography.<token>}"73 rounded: "{rounded.<token>}"74 padding: <value>75 size / height / width: <value>76```7778Token references use **bracket notation** — `{colors.primary}`, `{typography.body}` — both79inside `components:` and inline in the Markdown prose, so the agent can trace every described80value back to its canonical definition.8182Component variants (hover, active, pressed, focused, selected) are **separate top-level entries**83with related names (`button-primary`, `button-primary-hover`, `button-primary-pressed`), not84nested state objects.8586### Markdown body (rationale layer) — canonical section order8788All sections are technically optional, but real-world examples consistently include these, in89this order:90911. **Overview** — Brand & style summary, "Key Characteristics" bullet list. This is the single92 most load-bearing section: a dense paragraph plus 5-8 bullets that an agent can hold in mind93 while generating *anything*, even before consulting token details.942. **Colors** — Grouped by *role* (Brand & Accent / Surface / Text / Semantic — not just a flat95 swatch list), each entry naming the token, its hex, and **where it's used**.963. **Typography** — Font family rationale (including open-source substitutes for proprietary97 typefaces), then a hierarchy table (token / size / weight / line-height / letter-spacing /98 use), then "Principles" — the *rules* that generate the hierarchy, not just its values.994. **Layout** — Spacing system (base unit + scale), grid/container/composition patterns,100 whitespace philosophy.1015. **Elevation & Depth** — A table of elevation levels and their treatment (shadow / surface lift102 / border), plus notes on decorative depth (gradients, photography, screenshots).1036. **Shapes** — Border-radius scale as a table, plus photography/illustration geometry notes.104 For brands with organic/hand-drawn ornament systems (blobs, brushstrokes), document them here105 as their own subsection with explicit "keep it irregular/asymmetric" guidance.1067. **Components** — Grouped by family (Buttons, Cards, Inputs, Navigation, etc.), each entry107 naming its token, describing every state, and citing token references.1088. **Do's and Don'ts** — The guardrail section. This is where *negative space* gets defined —109 what the brand explicitly avoids (second accent colors, dark mode, generic icon libraries,110 shadows, etc.). Often the highest-value section for preventing agent drift.1119. **Responsive Behavior** — Breakpoint table, touch-target minimums, collapsing strategy,112 image/photography behavior across viewports.11310. **Iteration Guide** *(optional but valuable)* — A numbered checklist for *using* the file:114 "focus on one component at a time," "run the linter after edits," "treat [accent color] as115 scarce." Frames the file as a working tool, not a static spec.11611. **Known Gaps** *(optional but valuable — especially for reverse-engineered files)* — Explicit117 list of what's *not* documented (no dark mode, proprietary fonts, missing states, values that118 are estimates pending verification). Prevents the agent from inventing answers to unasked119 questions.120121### CLI tooling (per the spec)122123```bash124npx @google/design.md lint DESIGN.md # validate structural correctness125npx @google/design.md diff old.md new.md # compare versions, detect regressions126npx @google/design.md export --target=tailwind-v4 # convert to Tailwind/DTCG formats127npx @google/design.md spec # print the formal specification128```129130## How to write one (process)1311321. **Gather source material** — brand deck/PDF, live site, screenshots, Figma file, or brand133 guidelines. Read/view all of it before writing a single token; the Overview section depends on134 having seen the whole system.1352. **Name the single chromatic identity** (or the deliberate multi-accent system, if that's the136 brand). Most strong brands run on *one* accent color plus neutrals — name it first, then build137 the neutral ladder around it.1383. **Build the color palette by role**, not by hue: brand/accent, surface/canvas, text/ink,139 semantic. Estimate hex values conservatively from what you can see; **always flag estimates**140 in the description and in "Known Gaps" rather than presenting guesses as confirmed values.1414. **Build the typography hierarchy as a table** — work top-down from the largest display size to142 captions, and always note what the *real* typeface is (even if proprietary) plus an143 open-source substitute an agent can actually use.1445. **Name the shape/spacing scale** — derive a base unit (commonly 4px or 8px) and build the145 scale as multiples of it.1466. **Write Components last**, after the token vocabulary exists — every component entry should147 resolve entirely to `{token references}`, never to raw values.1487. **Write Do's and Don'ts from what you *didn't* see** — the absence of dark mode, the absence149 of a second accent, the absence of drop shadows, are all real signal. State them as rules.1508. **Always include "Known Gaps"** when the file is reverse-engineered (vs. exported from a real151 design system) — name what's estimated, what's missing, and what needs founder/designer152 confirmation before the tokens are locked for production.153154## Calibration references155156Pull a comparable brand from https://github.com/voltagent/awesome-design-md before writing —157matching tone matters as much as matching structure:158159- **Linear** (`design-md/linear.app/DESIGN.md`) — dark, single-accent, software-craft tone; great160 reference for surface-ladder elevation systems and restrained semantic color.161- **Cursor** (`design-md/cursor/DESIGN.md`) — warm-cream editorial canvas with one orange accent162 plus a scoped pastel sub-palette for in-product states; good reference for "single brand163 voltage + contained secondary palette" patterns and for documenting proprietary/custom fonts164 with open-source substitutes.165166Clone the repo locally to browse more (`git clone --depth 1167https://github.com/voltagent/awesome-design-md`) — 70+ examples span SaaS, consumer, fashion,168and enterprise brands.169170## Output171172Write the file as `DESIGN.md` in the project root (capitalized, exactly — agents and tools look173for that exact filename next to `README.md`). If reverse-engineering from non-canonical sources174(PDF, screenshots, a live site you can't inspect pixel values on), say so explicitly in the175`description` front-matter field and in "Known Gaps" — never present visual estimates as176confirmed brand values.177178## See Also179180- `brand-identity` — runs the interview that decides *what* the brand should be for a new181 project; hands off here for the actual `DESIGN.md` file format and spec.182- `taste-skill` — builds NEW UI from a brief; reads this file's tokens first when they exist,183 then handles execution discipline (anti-AI-tells, dials) on top.184- `taste-redesign` — for elevating a UI that already has a `DESIGN.md`/identity, rather than185 defining one from scratch.186- `frontend-slides` — reads this file's tokens for presentations too, instead of its own187 built-in presets, when a project already has an identity.