Claude Code design system: set one up in 20 minutes (template)
How to give Claude Code a design system it actually follows: tokens file, component rules, a design skill and a CLAUDE.md pointer. Copy-paste template included.
TL;DR
- Claude Code doesn't have a design system unless you give it one. Without one, every new component is a fresh guess, and the guesses drift toward the same generic look.
- A design system for Claude Code is four files: a tokens file (colors, type, spacing), a components folder (the few building blocks it must reuse), a design rules file (what to do and what never to do), and a pointer in CLAUDE.md so it reads them every session.
- The template below takes about 20 minutes to fill in. The hard part isn't the files, it's choosing the palette, type and layouts. Rules can't make that decision for you.
- If you'd rather start from a finished one, the Design System Pack is 11 designed sections plus the prompts that make Claude Code follow them.
Why Claude Code needs a design system
Ask Claude Code for a pricing section on Monday and a features section on Thursday and you'll get two good-looking blocks that don't belong to the same site. Different greys, different corner radii, different heading sizes. Each request starts from the model's defaults, and the defaults are the same eight patterns every AI site shares.
A design system fixes both problems at once. It replaces the defaults with your decisions, and it makes those decisions the same every time.
The trick with Claude Code is where you put it. A design system living in your head or in a Figma file doesn't exist to Claude. It has to be in the repo, in files Claude reads before it writes UI.
The four files
your-project/
├── CLAUDE.md ← points to the design system
├── design/
│ ├── tokens.css ← colors, type, spacing, radius
│ ├── RULES.md ← do's and don'ts, in plain words
│ └── examples/ ← 1–2 screenshots of the look you want
└── src/components/ui/ ← the only building blocks Claude may use
1. tokens.css: the values
Tokens are the numbers. Put every color, font, size and spacing value in one place, as CSS variables (or in your Tailwind theme). Keep the list short. A small system is easier for Claude to follow and harder to break.
:root {
/* color: 1 background, 1 text, 1 muted, 1 accent. That's it. */
--color-bg: #f6f7f9;
--color-fg: #15181e;
--color-muted: #5b6270;
--color-line: #e2e5ea;
--color-accent: #1f6f5c;
/* type */
--font-display: "Geist", system-ui, sans-serif;
--font-body: "Inter", system-ui, sans-serif;
--text-display: 64px;
--text-h2: 40px;
--text-body: 17px;
--weight-display: 500;
/* space and shape */
--space-section: 160px;
--space-block: 48px;
--radius: 10px;
}
If you use Tailwind, mirror these in your theme so bg-bg, text-fg and text-accent exist, and Claude has no reason to reach for bg-violet-600.
2. components/ui: the building blocks
Pick the five or six components every page is made of (button, card, section, heading, badge, input) and build them once, using only tokens. Then tell Claude it may compose pages from these and nothing else.
This matters more than the tokens. A model that has to write a button from scratch will write the training-data button. A model that has a <Button variant="primary"> to import will use it.
3. RULES.md: decisions in plain words
Tokens say what values exist. Rules say how to use them. Write them as short commands, and name the patterns you don't want, because "don't do X" works best when X is specific.
# Design rules
## Always
- Use only values from design/tokens.css. No raw hex, px or font names in components.
- Build pages from src/components/ui. Don't create new button or card styles.
- One accent color, used for at most 3 things per page.
- Display headings: var(--font-display), weight 500, never bolder.
- Section spacing: var(--space-section) top and bottom.
## Never
- Multi-stop gradients (especially violet → indigo).
- Three equal feature cards in a row.
- Check icons inside tinted circles.
- Gradient or emoji buttons ("Get started ✨").
- Fake social proof: DiceBear avatars, five-star rows, invented logos.
## When unsure
Pick the simpler option and ask me.
4. CLAUDE.md: the pointer
Claude Code reads CLAUDE.md at the start of every session. Don't paste the whole design system into it. Point to it:
## Design system
Before writing or changing any UI, read design/RULES.md and design/tokens.css,
and look at the screenshots in design/examples/. Build only from src/components/ui.
After a UI change, list any rule you couldn't follow and why.
That last line is useful. It makes drift visible instead of silent. (More on writing CLAUDE.md for frontend work.)
Make it a skill (optional)
If you work across several projects, turn the rules into a Claude Code skill: a folder in .claude/skills/ containing a SKILL.md with a short name and description at the top. Claude loads a skill when the task matches its description, so a skill described as "use for any UI, styling or frontend design work" will come in exactly when you need it and stay out of the way otherwise.
A skill is the right home for rules. Your tokens and components still belong in each project, because they're the specific decisions for that product.
Test it
Ask Claude Code for a section it hasn't built yet: "Add a pricing section with three plans." Then check:
- Did it import your components, or write new ones?
- Are there any raw hex values or Tailwind color classes (
bg-blue-500) in the diff? - Screenshot the result and ask Claude to compare it against
RULES.mdand list violations.
If it fails, tighten the rule it broke. Most systems need two or three rounds before they hold.
The part a template can't do
Everything above makes Claude consistent. It doesn't make it good. A consistent system built on a weak palette and a generic type pairing gives you a site that's consistently generic.
Choosing the palette, type, spacing and section layouts is design work, and it's where most of the "doesn't look AI-generated" effect comes from. That's the part the pack does for you.
Pack
The Design System Pack is a finished design system in the shape Claude Code needs: 11 designed React sections (navbar, hero, social proof, how it works, use cases, benefits, testimonials, pricing, FAQ, final CTA, footer), a rules prompt for each one with a preflight checklist, and two master prompts. One builds a new site; the other renovates an existing one section by section and keeps every word of your copy.
$19 one-time, unlimited projects, 14-day refund. Works in Claude Code, Cursor, Lovable, Bolt and v0.
Related: make Claude Code UI not look AI-generated · score your site with the AI slop checklist