Prompts 27 November 2026 · 11 min read · Lookjar team
What is a DESIGN.md file? Format, example, how to write one
DESIGN.md tells AI coding tools how your product looks. The format, an example, and what 384 real files on GitHub hold: 39% use YAML tokens.
A DESIGN.md is a plain text file, kept at the root of a project, that tells an AI coding tool how the product should look. It holds two things: exact values (colours, type, corner radius, spacing) and short rules written in sentences. The format comes from Google Stitch, which published it as an open draft specification on 21 April 2026, at version "alpha". In that spec the values sit in YAML (front matter at the top, or code blocks inside sections) and the rules in Markdown sections, whose order is fixed. Most tools will not open the file on their own. You tell them to. On 29 November 2026 we read 384 DESIGN.md files on GitHub that describe a look: 39% put their tokens in YAML as the spec asks, the median file names 15 colours, and 28% name Inter as a font.
What is a DESIGN.md file for?
An AI coding tool writes interface code from what it has seen most often. Without guidance it falls back on the same defaults on every project: a familiar icon set, soft rounded cards, a framework colour palette. A DESIGN.md gives it something more specific to hold on to before it writes a single component.
It plays the same role for the look of a product that an instruction file such as AGENTS.md or CLAUDE.md plays for the code: once the tool is told to read it, it should win over the tool's habits. The spec states the aim: the same design choices should carry across design sessions and across agents and tools.
Where the DESIGN.md format comes from
Google Stitch, a design tool from Google Labs, used the format to export and import a project's design rules. On 21 April 2026 Google published it as an open draft spec, so other tools can read and write it too. The spec lives in the google-labs-code/design.md repository on GitHub and is marked version: alpha, which means its keys and sections can still change.
Other platforms have adopted the file with their own rules. Shopify's theme documentation, for example, treats DESIGN.md as free-form Markdown next to AGENTS.md, with a 50 KB limit, and its CLI carries the file through theme pull, theme push and theme package. So following the spec keeps a file portable between tools that support it, but not every tool requires it.
What goes in a DESIGN.md file?
The spec has two layers.
The front matter, between two --- lines at the top, holds the tokens as YAML. The top-level keys it lists are version, name, description, colors, typography, rounded, spacing, motion and components, plus omitted to declare sections you left out on purpose. A token can point to another with a path in braces, such as {colors.primary}, so a component reuses a value instead of copying it.
The body explains the reasoning in Markdown sections. They can be skipped, but those you keep must come in this order:
| Order | Section | What to write there |
|---|---|---|
| 1 | Overview | the one idea the product's look follows |
| 2 | Colors | what each colour is for, and what never gets the accent |
| 3 | Typography | families, weights by role, sizes |
| 4 | Layout | content width, grid, space between sections |
| 5 | Elevation & Depth | whether anything floats, and how |
| 6 | Shapes | corner radius of cards, buttons and fields |
| 7 | Motion | what moves, how long, and what never moves |
| 8 | Voice & Content Strategy | tone of labels and messages |
| 9 | Components | buttons, cards, inputs, with their tokens |
| 10 | Do's and Don'ts | the short list the tool checks itself against |
Unknown headings are kept rather than rejected, and a heading used twice is an error. Colours can also be grouped, for example under light and dark, and the spec describes a linter that flags broken references, duplicate tokens and missing sections.
One name clash to know about: some spec-driven coding tools write a design.md next to requirements.md and tasks.md to describe the technical design of a feature. That file is about architecture. The clash is common: of 972 DESIGN.md files we opened at the root of GitHub repositories, 588 (60%) held no colours or type at all, and most of those were technical design documents. The DESIGN.md in this guide is the visual one.
What does a DESIGN.md example look like?
Here is a short one for a fictional bank app. The values are exact and few, and every rule could be checked on a screenshot.
The file, saved as
DESIGN.mdat the root of the project:--- version: alpha name: Sample Bank colors: primary: "#0A6E5A" on-primary: "#FFFFFF" surface: "#FFFFFF" on-surface: "#0B1B2B" neutral: "#5B6878" typography: headline-lg: fontFamily: Inter Tight fontSize: 40px fontWeight: 700 lineHeight: 1.05 body-md: fontFamily: Inter Tight fontSize: 16px fontWeight: 400 lineHeight: 1.6 rounded: sm: 4px spacing: section: 96px gutter: 24px components: button-primary: backgroundColor: "{colors.primary}" textColor: "{colors.on-primary}" rounded: "{rounded.sm}" --- ## Overview Sample Bank looks like a bank statement: dense, aligned, calm. Numbers lead. ## Colors One accent, primary #0A6E5A, for the main action and links only. Never on headings. ## Typography One family. 400 for text, 700 for headings. Figures use tabular numbers. ## Elevation & Depth Nothing floats. No blurred shadows. ## Shapes 4px on cards and buttons. ## Do's and Don'ts - Do align every amount on the decimal point. - Don't add icons in coloured circles, glass panels or a gradient.What is missing: no "modern", no "clean", no "delightful". Those words give a model nothing to copy, so it fills the gap with its defaults.
What do real DESIGN.md files contain?
We searched GitHub for files named DESIGN.md at the root of a repository, on 29 November 2026. Code search returns at most 1,000 results, which gave 983 repositories and 972 files we could read. 384 of them describe a look, with at least two colours and a colour or type section. The figures below are about those 384.
| What we looked for | Files | Share |
|---|---|---|
| A Colors section | 305 | 79% |
| A Typography section | 298 | 78% |
| A Components section | 281 | 73% |
| A Layout section | 260 | 68% |
| An Elevation section | 186 | 48% |
| An Overview section | 166 | 43% |
| A Do's and Don'ts section | 154 | 40% |
| Tokens in YAML, as the spec asks | 148 | 39% |
| A Shapes section | 150 | 39% |
| A Motion section | 99 | 26% |
version: alpha, the spec's version line | 32 | 8% |
| A Voice section | 20 | 5% |
Four things stand out.
Most files are written by hand, not to the spec. Only 39% hold their tokens in YAML, and 8% declare the spec's version. The others list values in Markdown tables or sentences, which a model can still read but a linter cannot check.
Files keep about half the sections. The median file has 5 of the 10, and only one file in 384 had all of them. Among the 301 files with three sections or more, 164 (54%) keep them in the spec's order.
Colour lists run long. The median file names 15 different hex colours, and one in six names 30 or more. A file that long hands the tool a palette, and "one accent" gets lost.
The defaults come back inside the file. 28% name Inter, 16% JetBrains Mono and 9% Geist. 24% contain at least one exact Tailwind default, such as
#0f172aor#3b82f6. A DESIGN.md that writes the framework's colours down makes them official.
The median file weighs 12 KB, and 14 files (4%) go past the 50 KB limit Shopify sets for theme files.
What to leave out of a DESIGN.md
- Adjectives without values. Replace "premium" with the colour, the weight and the spacing that make it feel that way.
- Another brand's assets. If you start from a product you admire, take its restraint and its proportions, never its logo, photos, illustrations or copy.
- Everything at once. A file the tool reads before every task should stay short. Long component catalogues belong in the code.
- Values you did not check. A colour guessed from memory is worse than none, because the tool will apply it everywhere.
- A long palette. Name the few colours with a role, such as background, text, line and one accent. The median file we read had 15.
How do you write a DESIGN.md from a real product?
You need measured values, not impressions. Open the product in a browser, inspect a heading, the body text, a card and a button, and note the computed values: family, size, weight, line height, text colour, background, radius, shadow, the gap between sections. getComputedStyle in the browser console returns all of them.
Then write two lists. One is what you observed on the reference. The other is what you choose for your own project, starting with your own accent colour and your own font if you have one. Never let a choice pass as an observation.
That measuring is the slow part, so we started it for you. Every brand page in the library has a DESIGN.md button. The colours come from the pixels of the brand's captures. Type, shapes and spacing come from screens we described block by block, and where a value was not read the file uses a plain default (a 16px body, for instance), so check those against the product. When a brand has no described screen yet, the file says so and gives the colours only. It is free to copy or download, and it opens with a clear rule: describe the look, never hand over the brand.
One honest limit: our file is a simpler free-form DESIGN.md, in the spirit of Shopify's. Its front matter uses its own keys (colors, typography, shape, spacing) and it does not yet follow every key and section name of the Google spec. If your tool expects the spec, rename the keys as in the example above before you use it.
How do you make your AI tool use the DESIGN.md?
Most tools will not open the file unless told to. Two ways work:
Reference it from the tool's instruction file, so every session sees it: a line such as "Read DESIGN.md before any interface work and follow it over your own defaults" in AGENTS.md, CLAUDE.md or your Cursor rules.
Name it in the prompt for a one-off task: "Using DESIGN.md, rebuild this screen with my content."
Then check the result. Ask the tool to list every colour, radius and shadow it used and to match each one to a token. Anything without a token is a default that slipped back in. Our guide to making UI not look AI generated covers that check, and our measurement of 65 AI built sites shows which defaults come back most often.
Questions people ask
What is a DESIGN.md file?
A plain text file at the root of a project that tells AI coding tools how the product looks: exact tokens for colour, type, shape and spacing, and short written rules. The open spec puts tokens in YAML front matter and rules in ordered Markdown sections.
Who made the DESIGN.md format?
Google Stitch, from Google Labs. Google published it as an open draft specification on 21 April 2026, at version "alpha", in the google-labs-code/design.md repository on GitHub.
Do Claude Code and Cursor read DESIGN.md automatically?
Do not count on it. Add a line to the tool's instruction file (AGENTS.md, CLAUDE.md or your Cursor rules) telling it to read DESIGN.md before any interface work, or name the file in your prompt.
What is the difference between DESIGN.md and AGENTS.md?
AGENTS.md tells a coding tool how to work on the code: commands, structure, conventions. DESIGN.md tells it how the product should look. They sit side by side at the root of the project.
How long should a DESIGN.md be?
Short enough to be read before every task. The median file we read on GitHub weighs 12 KB and names 15 colours. Shopify's theme documentation sets a 50 KB limit.
Do most DESIGN.md files follow the spec?
Not yet. Of 384 visual DESIGN.md files we read on GitHub, 39% put their tokens in YAML and 8% declare the spec's version line. The median file keeps 5 of the 10 sections.
Where can I get a DESIGN.md for a real brand?
Each brand page on Lookjar offers a free DESIGN.md to start from, its colours taken from the brand's captures. It is a simpler free-form file, not yet in the spec's exact keys. Use it as a starting point, then replace the accent and the font with your own.
Sources
- Lookjar reading of 972 DESIGN.md files at the root of GitHub repositories, from the first 1,000 results of GitHub code search, 29 November 2026: 384 visual files, sections, YAML tokens, colours, fonts (internal, file mesures-design-md-github.json)
- Google, "Stitch's DESIGN.md format is now open-source so you can use it across platforms", 21 April 2026
- DESIGN.md specification (version alpha): front matter keys, section order, token references
- Shopify, DESIGN.md for themes: free-form file next to AGENTS.md, 50 KB limit, CLI support
- MDN, getComputedStyle(): reading the values a browser actually applies



