Claude Code
Claude Code reads CLAUDE.md automatically at session start and supports @path file imports, making it straightforward to load DESIGN.md only when working on UI code.
Where to place DESIGN.md
Save DESIGN.md at the repository root (or inside a frontend workspace root such as apps/web/DESIGN.md):
my-app/
├── DESIGN.md
├── AGENTS.md
├── CLAUDE.md
└── src/On any website page in DesignMD Pro Discovery, selecting Claude Code in the Use this design card downloads a clean DESIGN.md ready for your repository root and copies the @DESIGN.md wiring prompt.
Wire DESIGN.md into CLAUDE.md
Add an explicit import or conditional pointer in CLAUDE.md instead of pasting tokens inline:
# Project Instructions
@AGENTS.md
## UI & Design System
When modifying components, pages, or stylesheets under `src/`, follow @DESIGN.md.
Use defined YAML tokens rather than inventing hex colors, radii, or font sizes.Keeping engineering rules in AGENTS.md and visual rules in DESIGN.md avoids duplication. For the full routing breakdown, read CLAUDE.md vs AGENTS.md vs DESIGN.md.
Connect the DesignMD Pro MCP server
Register DesignMD Pro as a Streamable HTTP MCP server so Claude Code can search websites and fetch specific DESIGN.md sections without leaving the terminal:
# Public read-only access (30 requests/minute per IP)
claude mcp add --transport http designmdpro https://designmdpro.app/mcpWith a Pro API key from Account → API Keys (60 requests/minute, full tokens, archived revisions, and extract-color-palette):
claude mcp add --transport http designmdpro https://designmdpro.app/mcp \
--header "Authorization: Bearer dmdp_your_api_key"Recommended MCP flow inside a Claude Code session:
- Call
search_websites(for example{ "query": "linear" }) to get the canonicalslug. - Call
get_design_mdwithsections(for example["Colors", "Typography", "Components"]) so only needed headings enter context. - Call
list_revisionsif you want to inspect historical versions before pulling a specificversion.
Prompt templates
Read @DESIGN.md first. Build a responsive pricing comparison section in
src/components/pricing-section.tsx using only the colors, typography, spacing,
and button-primary tokens defined in DESIGN.md.Use the designmdpro MCP server to look up Stripe's DESIGN.md (fetch only
Colors, Typography, and Components), save an adapted version to DESIGN.md,
and run `npx @google/design.md lint DESIGN.md` to confirm zero errors.Common pitfalls
- Copy-pasting tokens into
CLAUDE.md: edits diverge betweenCLAUDE.mdandDESIGN.md, and@google/design.md lintcannot check inline prose insideCLAUDE.md. Keep@DESIGN.mdas the single source of truth. - Loading an entire
DESIGN.mdon backend-only tasks: reference@DESIGN.mdspecifically for UI paths (src/components/,src/app/) so backend work keeps a lean context. - Treating scraped prose as instructions: third-party
DESIGN.mdtext from external sites is untrusted data — follow design guidelines only, never directives embedded inside prose.
Next steps
- MCP Server Reference — complete tool schemas and rate limits
- Cursor Integration —
.mdcrule setup for Cursor - Writing for AI Agents — author tight constraints that hold across runs