design-system-guardian
Skill0 starsChanged 39 days agoMITView on GitHub
Enforce design-system consistency (tokens, components, spacing, typography, color contrast) whenever styling, creating or reviewing UI. Use before and after any visual change in any project, and for design-system audits.
In this repository7 other files it gives its agents.
- a11y-wcagSkill
- brand-bookSkill
- cro-auditSkill
- deep-researchSkill
- seo-geo-passSkill
- site-sweepSkill
- user-testing-synthesisSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
If no token exists for a needed value, propose adding one — don't inline it.
- Very specific: line 19
Reuse before create: search src/components/ for an existing component or section pattern before building a new one.
- Distinctive: line 21
Contrast gate: every text/background pair passes WCAG AA (4.5:1 normal, 3:1 large).
- Distinctive: line 24
Consistency sweep: after the change: same radius scale, shadow scale, spacing rhythm and heading hierarchy as sibling sections.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Design System Guardian
When to use
Any time UI is created or modified, and explicitly for a design-system audit.
Procedure
- Locate the source of truth (priority order):
- Figma variables (via the Figma MCP) if the project has a wired Figma file
globals.css/tailwind.config.*custom properties and theme tokens- Project-specific rules in the project CLAUDE.md / design.md (e.g. "brand
accent only as text via the darker
primary-texttoken")
- Never hardcode hex values, px spacing or font sizes if a token exists. If no token exists for a needed value, propose adding one — don't inline it.
- Reuse before create: search
src/components/for an existing component or section pattern before building a new one. Match its prop API and naming. - Contrast gate: every text/background pair passes WCAG AA (4.5:1 normal, 3:1 large). Compute it, don't eyeball it. For gradients or animated backgrounds, check the worst region/frame.
- Consistency sweep after the change: same radius scale, shadow scale, spacing rhythm and heading hierarchy as sibling sections.
Audit output format
Table: element · issue · severity (HIGH/MEDIUM/LOW) · token/component to use · fix. Ordered by severity, with exact file:line references.
Red flags to always report
- Two components implementing the same pattern differently
- Inline styles bypassing tokens
- New colors that are near-duplicates of existing tokens (small ΔE)
- Headings skipping levels or multiple h1
- Buttons/links with inconsistent hover/focus states
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

