r/DesignSystems • • 6d 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 links
  • color.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.)

23 Upvotes

13 comments sorted by

2

u/zaskar 6d ago

I’m working on this, give me a month for the full deal. Rafters.studio

3

u/Harshit_Ahluwalia 6d ago

Nice, just had a look. Encoding the judgment (do/never rules, when to use what) rather than just token values is exactly the gap I was describing. Is the idea that agents query the system over MCP at generation time, instead of carrying it all as instructions?

1

u/zaskar 6d ago

Told in skill it’s not shadcn, tokens are decided, components are complete, composting in json and veneer compiles on save. Mcp teaches right, it does not yell about wrong. Rafters check also lints. Lang server for humans.

I’m not done with type yet, it will be as rich as our colors api, motion is 80%, the token registry has a massive cascade bug and the studio, where judgement is created, its vaporware right now.

Beside that, almost there!

I’m really down the road on adding real attention metrics as well, something old in this industry but never formalized. It is now. I need to write the rfc one day

1

u/Vivid-Way 5d ago

so why don’t you show even a single screenshot comparison, on your website, of your design skills working?

2

u/Harshit_Ahluwalia 6d ago

For anyone who wants something working before then: Nick Babich (editor in chief of UX Planet) is running a live session this Sunday where you build a design system Skill, a heuristic review Skill and a research Skill in Claude, with no coding needed. Code HARSH30 is applied through this link: https://luma.com/buildwith-389t?coupon=HARSH30&utm_source=reddit&utm_campaign=designsystems

2

u/Vivid-Way 5d ago

your advertisement looks like generic AI. for a workshop that’s about not making generic UI.

and why would someone pay $270 to listen to someone talk about design skills…

1

u/Sad_Shop4 5d ago

valid point

1

u/Simply-Curious_ 6d ago

CRD my guy.

0

u/Harshit_Ahluwalia 3d ago

We are running a black friday sale for this event: https://luma.com/buildwith-389t?coupon=BF50&utm_source=Reddit

Use code BF50 valid only for next 5 hours.