skillUI/UX Skills2 min read
design.md
The ultimate guide to giving AI agents an eye for design.
Comprehensive investigation and tools to build your business's visual source of truth.
What is DESIGN.md?
DESIGN.md is a plain-text markdown file placed in the root of a project repository. It serves as a "visual source of truth" for AI coding assistants. While traditional design systems are meant for human consumption, a DESIGN.md file is structured specifically for LLMs — it provides the colors, typography, spacing, component rules, and overall "vibe" needed to generate consistent, brand-aligned UI code.
Anatomy of a DESIGN.md File
- YAML front matter— machine-readable design tokens (hex codes, font scales, border radii)
- Markdown prose— human- and AI-readable rationale, guidelines, and explicit "Do's and Don'ts"
Why It Works
- Prevents UI drift — every component generated adheres to the same visual language
- Rapid iteration — visual preferences change in one place
- Version control — design decisions live alongside the code
Key Repositories
- google-labs-code/design.md (opens in a new tab) — the official format spec, documentation, and a linter
- VoltAgent/awesome-design-md (opens in a new tab) — curated
DESIGN.mdfiles inspired by top-tier brands
Basic Template
---brand: name: "Enpitech" vibe: "Modern, technical, precise"colors: primary: "#8E2DE2" background: "#090715" surface: "#110D26"typography: font_sans: "'Inter', sans-serif" font_mono: "'Fira Code', monospace"---# Design Rules- **DO** use flexbox for layouts.- **DO** use sentence case for buttons.- **DON'T** use drop shadows, use 1px borders instead.Advanced Template (Semantic Tokens)
---brand: name: "Enpitech" vibe: "Modern, technical, precise, and approachable"tokens: colors: primary: DEFAULT: "#8E2DE2" foreground: "#FFFFFF" background: "#090715" surface: DEFAULT: "#110D26" border: "rgba(255,255,255,0.1)" typography: sans: "'Inter', sans-serif" mono: "'Fira Code', monospace" spacing: container: "max-w-6xl" card_p: "24px" motion: default: "200ms ease-out"---# Design System PhilosophyOur interfaces should feel invisible. We prioritize clarity over decoration.## Component Rules### Cards- Always use `colors.surface.DEFAULT` for background.- Inner padding should strictly adhere to `spacing.card_p`.### Interactive Elements- Hover states must apply `motion.default` transition.- **DON'T** use rounded corners greater than `12px`.- **DON'T** introduce colors outside the token palette.Best Practices
- Be explicit with "DON'Ts"— AI models respond better to negative constraints. "DON'T use drop shadows on buttons" beats "make the buttons look nice"
- Keep it concise— bullet points and direct instructions, not flowery prose
- Test and iterate— prompt the agent to build a component, review the output, add rules to prevent specific mistakes
Pair It With figma-to-code
Pair your DESIGN.md with figma-to-code for pixel-perfect UI. Without DESIGN.md, that skill generates generic CSS or hardcoded hex values; with it, raw Figma colors and spacing values map directly to your design system tokens.
More in UI/UX Skills
- 3 min readkarpathy-guidelinesA single file that makes your coding agent think before it codes — distilled from Andrej Karpathy's observations on LLM pitfalls.Read
- 1 min readweb-design-guidelinesVercel's UI rulebook, applied as a lint pass on your code.Read
- 1 min readcanvas-designTreats visual design as fine art — develops an aesthetic philosophy before pushing pixels.Read
