Skip to main content
rule CX Codex

design — Claude Code rule: what it does, how to install

Defines visual identity tokens and styling rationale following Google Stitch. Keeps coding agents aligned with design tokens when building user interfaces.

no license ★ 406 updated 2026-06-25

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/rules/DESIGN.md
Open on GitHub

What design does

The rule structures UI guidelines into a single DESIGN.md file using the Google Stitch specification. Its front matter holds machine-readable YAML tokens covering color palettes, typography levels, border radii, and an 8px spacing scale. Agents inspect these normative values directly when assembling components such as buttons, cards, and input fields.

The Markdown body explains the design rationale, detailing tone, semantic status colors, and layout rules. It builds on the canonical eight sections from Stitch and supports ATLAS additions for responsiveness and accessibility. To maintain visual consistency, all placeholder tokens in the file must be populated with project-specific hex codes and measurements.

What it helps with

  • Keep design tokens and palette definitions in a single file
  • Enforce typography scales and 8px spacing across generated UI
  • Prevent arbitrary styling choices during component generation
  • Standardize layout structure using the Google Stitch format

Example prompts for the agent

  • Build a user profile card following the tokens defined in DESIGN.md.
  • Generate button and input field components using the theme colors.
  • Adjust the layout rhythm to match the spacing scale from the rule.

How to install design

Manually: put the files in place

.claude/rules/DESIGN.md

The paths frontmatter field limits the files

Step by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use

Questions about design

How to install the design rule in Claude Code?

Place the rule file at .claude/rules/DESIGN.md in your project repository.

What is the structure of DESIGN.md?

It combines a YAML front matter containing machine-readable design tokens with Markdown guidance detailing visual hierarchy and component rules.

How are token values populated in the file?

You can replace placeholders manually or generate initial values through the /swe-atlas:create-design-md command.

Similar IDE rules

All IDE rules for Design →

From the same set26

The whole set →
visual The visual command turns a discussion into a self-contained HTML document with diagrams, wireframes and matrices the agent implements from in plan mode. CX Codex +1 ★ 406repo stars oneshotapp oneshotapp builds a functioning app from a brief idea in Claude Code without human intervention. It logs architecture choices and verifies implementation slices on the fly. CX Codex +1 ★ 406repo stars analyzer analyzer examines blind skill comparisons to explain the winner’s advantage and suggest changes to the losing skill. Run it after the comparator finishes. CX Codex ★ 406repo stars free-will free-will makes the agent stop at a costly fork, lay out real options, test each against evidence and pick one on purpose. CX Codex +1 ★ 406repo stars prototype Turn an early idea into a clickable, multi-screen React prototype through an interview. Use it to test a concept before committing to production work. CX Codex +1 ★ 406repo stars create-design-md create-design-md — a command that produces a DESIGN.md file with the project's visual identity: interviews the user, renders three HTML design variants for browser comparison, locks in the chosen direction in Stitch format. CX Codex +1 ★ 406repo stars super-product-owner super-product-owner turns vague product ideas into a one-page brief, an interactive prototype, and concrete acceptance criteria. It narrows project scope before any production code gets written. CX Codex +1 ★ 406repo stars super-ui-ux-design The super-ui-ux-design skill guides UI design and critique through UX principles and visual design concepts. Use it when working on websites, apps, or individual components. CX Codex +1 ★ 406repo stars

Project sponsors

Companies that keep this analytics open