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
.claude/rules/DESIGN.mdWhat 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.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/DESIGN.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/DESIGN.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/DESIGN.mdManually: put the files in place
.clinerules/DESIGN.mdStep 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.