◎Home
← All posts

Everything Claude Code Needs for Design: Tokens, a DESIGN.md Contract, and a Gate

2026-11-01 · zhoujingkang · Founder

Ask what makes a Claude Code setup complete and you will get a shopping list: CLAUDE.md rules, a folder of skills, a few MCP servers. Search trends back this up — "everything claude code" style config-hunting queries have exploded this year, and one of them grew over 2,000%. But look at what agents actually ship and a gap opens: the setup covers how the agent works, not what the work should look like. This article is the design half of that list — the tokens, the contract file, and the verification gate that turn "it runs" into "it looks like one product."

What does a complete Claude Code design setup include?

Four layers, each answering a different question. Rules (CLAUDE.md or AGENTS.md at the repo root) tell the agent how to behave in this codebase — conventions, commands, guardrails. Skills teach it a repeatable procedure it can load on demand. MCP servers give it live tools it can call — search, databases, verification. And a design contract — a DESIGN.md or token file — tells it what the product should look like before a single line of UI is written.

Most setups have the first three and skip the fourth, or treat it as a vibe: "make it look good." The omission is measurable. In one developer's public experiment, the same six-screen app was built eleven times with Claude Code and every element's computed style was read back by script: a one-paragraph brief preserved only 43–50 of 79 deliberate design decisions. The decisions were never made — so the agent made them, differently, every time.

Why AI-built UIs drift without a design contract

The same experiment found two shadcn-based builds that both drifted into the default-theme look: shadcn's default palette has no success or warning role, so the agent improvised — scattering 34 and 24 raw Tailwind color classes respectively across the two builds. Change the theme later and every one of those hardcoded classes breaks silently. The component library did not prevent the drift; the missing semantic roles invited it.

The subtler finding: builds that started from a written look-and-feel still had 21 values that drifted off their own declared scale. A decision file without a checker slows the drift; it does not stop it. As one widely-upvoted comment put it, "even 'decided first' doesn't hold by itself if nothing checks it." That is why the stack needs a gate, not just a guideline.

CLAUDE.md vs AGENTS.md vs DESIGN.md: which file does what

CLAUDE.md is Claude Code's project memory: your commands, your conventions, your do-nots. AGENTS.md is the cross-tool equivalent — the same idea in a format other agents (Codex, Cursor) also read. Both are about process. DESIGN.md, an open format from Google Labs that AI coding tools have adopted, is about product: a YAML front matter of machine-readable design tokens plus a Markdown body explaining when and why each token exists.

They compose rather than compete. Keep process rules in CLAUDE.md, portability rules in AGENTS.md, and put every visual decision — every color with a role, not a hex dump — in DESIGN.md. The failure mode to avoid is duplicating design decisions into prose files: the moment a value lives in two places, one of them is stale.

What a DESIGN.md contract should contain

A contract is only as strong as its measurability. The minimum bar: every color carries a semantic role (background, surface, text, primary, success, warning, danger, and their on-colors — the states shadcn's default palette lacks), in both light and dark variants, with a contrast verdict recorded per text/background pair. A file that lists 8 identity tokens but no measured pairs is a palette, not a contract.

Generated beats borrowed here. Static design-system libraries — and there is now a popular one shipping 198 scraped brand systems for Claude Design — give you someone else's colors with no verification layer; their own importer refuses to guess roles for imported colors, because colors without roles are just a list. Deriving the system from your one brand color, with every pair measured under WCAG and APCA, is what makes the contract yours — and it drops straight into the same ecosystem, since their importer consumes DESIGN.md as-is.

The gate: verify, don't eyeball

A contract without enforcement degrades at the speed of the agent's next improvisation. The gate has two forms. Offline: a lint step that scans the repo for raw hex values and off-scale tokens and fails CI when it finds them — the color equivalent of a type checker. Live: an MCP tool that measures any foreground/background pair on demand, so the agent can check a suspicious pairing before it commits to it.

This is where the setup list comes full circle: the MCP server is not just another integration, it is the enforcement layer for the file. Rules say what to do, the contract says what good looks like, the gate says whether this specific value qualifies. Ship all three and the eleven-builds experiment stops being a cautionary tale and becomes a checklist.

Continue with a tool

References

FAQ

What does "everything Claude Code" mean?

It is shorthand for the full configuration stack around a Claude Code setup — CLAUDE.md rules, skills, MCP servers, and supporting files. Design is the layer most setups miss: a DESIGN.md token contract plus a verification gate.

Do I need a DESIGN.md if I already have a CLAUDE.md?

Yes, if your agent writes UI. CLAUDE.md handles process; design decisions belong in a machine-readable token file the agent reads at write time. Duplicating colors into prose rules guarantees one copy goes stale.

Can I just use a preset design system instead?

Presets give every project the same answer — and scraped brand systems ship with no contrast verification and no roles for your states. Deriving from your own brand color with measured WCAG/APCA verdicts gives you a system that is both yours and compliant.

How do I verify my agent actually follows the design system?

Add a gate: run a token lint in CI that fails on raw hex and off-scale values, and connect the ColorwayKit MCP server so any foreground/background pair can be measured on demand before it ships.

Try it on your own brand color

Paste one hex into the Brand Theme Engine and get a full light & dark web theme — semantic tokens, contrast-checked, export-ready.

Open the Brand Theme Engine →