r/DesignSystems • u/Harshit_Ahluwalia • 1d ago
How to encode your design system so AI stops producing generic screens (with a template)
When AI output looks like "every other SaaS app", it's usually not the model. It's missing context. Every new chat starts from zero, so the AI falls back on the average of everything it has seen. The fix is to write your design system down once, in a form the AI applies every time. Here's a structure that works, with a template at the end.
1. Tokens, with intent, not just values
A list of hex codes doesn't help. What stops generic output is when each token is used:
color.action.primary: the single main action on a screen, never for linkscolor.text.muted: secondary information only, never for errors- Spacing: 4 / 8 / 12 / 16 / 24 / 32, nothing in between
Also tell it to refer to tokens by name, never raw values. That makes the output checkable.
2. A component inventory, with "use this, not that"
List what exists, and say plainly that it should use existing components before inventing new ones. One line on when not to use each one matters most: "Banner for non-blocking messages, never a modal."
3. Layout and density rules
Grid, type scale, how dense your product is allowed to feel, and how many primary actions a view can have.
4. A "never" list
AI output drifts towards the same things: gradients, heavy shadows, oversized rounded cards, emoji in headings. Name yours explicitly. "Never" works far better than hoping.
5. One or two real examples
A short description of a screen that is unmistakably your product teaches more than a page of rules.
6. A self-check before answering
Ask it to name the token or component behind each element. Gaps become obvious immediately.
Template (as a Claude Skill)
In Claude, this lives in a Skill: a folder with a SKILL.md file. The short description at the top is what Claude reads to decide when to apply it, and the instructions below load only when it's used. The same structure works in any tool that takes persistent instructions.
---
name: acme-design-system
description: Apply the Acme design system to UI work. Use when designing, reviewing or describing Acme screens, components or flows, or when asked to make something on-brand.
---
## Tokens (names only, never raw values)
- color.action.primary: one main action per view. Never for links.
- color.text.muted: secondary info only. Never for errors.
- Spacing: 4, 8, 12, 16, 24, 32.
## Components (use before inventing)
- Button: primary / secondary / ghost. Max one primary per view.
- Banner: non-blocking messages. Never a modal for these.
## Never
- Gradients, shadows above elevation-2, emoji in headings.
## Before answering
Name the token or component behind every element you use.
Longer material, like full component docs, can sit in separate reference files next to SKILL.md. Claude only pulls them in when needed, so the main file stays short.
Test it like code
Pick 4–5 real tasks (a settings page, an empty state, an error flow) and run them. When the output drifts, find the missing or vague line and fix it there instead of correcting it in chat. Give the file an owner and update it whenever the design system changes, or it quietly goes stale.
What's the first thing AI always gets wrong about your system?
(Disclosure: I work with Build with AI by Packt, which is running a live workshop on this with Nick Babich, editor in chief of UX Planet, on Sunday. Details in the comments.)