DESIGN.md: Google's Spec for AI-Agent Design Systems
so i've been fighting with ai coding agents for a while now trying to get them to generate uis that actually match my design system. telling claude "use the brand colors" is useless when it has no idea what those are. screenshots help but still get weird approximations.
came across google labs' design.md spec this week and gave it a shot. it's basically a single markdown file where you define your design tokens as yaml front matter and explain the reasoning in prose, so agents get both the hex values and the context for them.
three things that actually worked well:
the linter caught wcag contrast issues i'd been ignoring for months. running npx @google/design.md lint flagged a color pair i use everywhere that was 3.8:1 instead of 4.5:1. nice to catch that before shipping.
the tailwind export is genuinely useful - one command and it dumped a complete theme.extend config with every token mapped correctly. no more manually syncing figma tokens to tailwind config files.
token references with {colors.primary} syntax let me change a single value and have it propagate everywhere, which is what you'd expect but most design token setups somehow make painful.
one real gotcha: the windows powershell issue is annoying. npx design.md tries to open the file in your default markdown editor because of the .md extension. you have to use the designmd alias or wrap it differently. not a dealbreaker but caught me off guard.
full writeup here if you want more detail: https://andrew.ooo/posts/google-labs-design-md-ai-agent-design-spec-review/
curious what everyone else is using to give their agents design context - are you doing something custom, using astryx, or just hoping for the best?
About this post
- Posted
- Archived
- Score
- 3 · 72% up
- Kind
- Text
- ID
- 1uioboo
6 comments
Did you check https://getdesign.md/?
Deleted before we saved it.
Deleted before we saved it.
I have a couple of ui design skills from mcp market which I’ve found useful in planning non generic/vibecodey/sloppy frontends. Some work better than others!
https://mcpmarket.com/search?type=skills&q=Frontend
Hi u/andrew-ooo thanks for the post and great blog post.
My team and I created https://designmd.me/
It allows you to extract the design system behind any website — you get a a structured DESIGN.md, a live HTML preview, and a one-click Figma import.
We've had over 74,000 generations to date! Check it out and let us know what you think. We just revamped the output. Some of our competitors charge upwards of $39 for one generation. You can buy a $3 credit pack from us (on sale right now) which gets you around 12 Design.md generations!
Tokens were never the hard part. A DESIGN.md tells the agent what your colors are and nothing about what components you already have, so it writes a brand new button that happens to be the right blue.
Two things helped me more than the spec file. Point the agent at two or three real components in the repo and tell it to copy those, instead of describing the system in prose. Concrete examples beat specs with these models by a lot. And get a screenshot of the render back into the loop before it keeps editing, otherwise it's writing markup blind.
Contrast linting is where the spec actually wins. That 3.8:1 catch is the kind of bug prose can't fix, so I'd keep design.md around for the linter and the tailwind export regardless.
I build Superdesign so discount me accordingly, it's the same problem from the other end, you look at the UI before any code exists. The repo examples trick works with whatever you're already running though.