tl;dr
A rule that keeps AI tools building UI from your design tokens and nothing else.
Add it to the rules file of any repo with a design system, and the AI builds from your tokens and asks you before it adds a new value.
Why
I want control over the output. I don’t want stray styles flying around the codebase.
So I give it a guardrail, a rule it reads before writing any code. Without one, agents make styles up on the spot or hard-code everything. With it, colours, spacing and sizes all come from the system. When something really does need a custom style, the agent asks me first, and if I agree we add a token.
The drop: Tokens-only Guardrail
One line for a system prompt or CLAUDE.md
When writing UI, use the design system's tokens for every colour, spacing, size, radius, shadow and font. Never write a raw value (hex, px, rem) if a token exists. If no token fits, stop and tell me which value you need instead of inventing one.