facebook pixel
Skip to content

skillUI/UX Skills2 min read

design.md

Our take
The ultimate guide to giving AI agents an eye for design.

Comprehensive investigation and tools to build your business's visual source of truth.

On this page8 parts
  1. 01What is DESIGN.md?
  2. 02Anatomy of a DESIGN.md File
  3. 03Why It Works
  4. 04Key Repositories
  5. 05Basic Template
  6. 06Advanced Template (Semantic Tokens)
  7. 07Best Practices
  8. 08Pair It With figma-to-code

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

Basic Template

code
---
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)

code
---
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 Philosophy
Our 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.

Private Workshop

Want to bring AI into your Frontend workflow?

We help product teams adopt AI-powered development practices, from agent workflows to custom skills and tooling, on whichever coding agent they already run.

What happens next
  1. 01

    Tell us what you are building.

    Your stack, the AI tools you use, where you are stuck.

  2. 02

    We book a 15-minute call.

    We look at how your team works with agents today.

  3. 03

    We shape the workshop.

    Private and hands-on, on your own codebase.

0/2000

Your info stays with us. That's it.