design-system-check
Skill1 starsChanged 3 months agoMITView on GitHub
How to make a UI change against docs/wiki/design-system.md — read the token roles first, reference roles instead of raw values, and verify the page's assertions before the case is done. Given to the developer by /project:init on projects with a UI surface, through roles.developer.extraSkills in .agents/config.json. Trigger on "UI change", "component", "styling", "CSS", "add a button", "design system", "design tokens", "colour", "typography", "spacing", "contrast", "accessibility", "dark mode", "responsive".
In this repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- adversarial-reviewSkill
- clean-architectureSkill
- decision-recordingSkill
- feature-branchingSkill
- finding-dispositionSkill
- git-recoverySkill
- gotcha-recordingSkill
- human-checkpointSkill
- plan-reviewSkill
- plan-writingSkill
- pr-createSkill
- spec-writingSkill
- tdd-loopSkill
- update-toolkitSkill
- wiki-updateSkill
- worker-dispatchSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
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
- Very specific: line 19
Reference roles, never values: Write accent, not its hex.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Checking a UI Change Against the Design System
docs/wiki/design-system.md asserts; the project's token file holds the values. That split survives only if every UI change verifies it. This is the project-level procedure above any stack — framework specifics belong in their own skill once the stack is real.
Precondition
A change to visual output with no docs/wiki/design-system.md → stop and report: either this is not a UI project (reread the task) or the page has to exist before any UI is built. Never invent tokens to get unblocked — an unanswerable value is an open_questions entry or a question for the human.
Procedure
- Read before writing: Design intention — the tiebreaker for every subjective call, even on a change that looks mechanical — Token binding, the token section you will touch, State & feedback patterns and the Accessibility contract. Then the Component inventory: a listed component means extending it (open its entity page); an unlisted one is specced as an entity with Behavior cases first — building past the inventory is how a codebase ends up with four buttons.
- Reference roles, never values. Write
accent, not its hex. Every raw value you write is one of:- a token reference you forgot → use it;
- a missing token → add the role, with its purpose, to
design-system.mdand the value to the token file, in the same change; - a deliberate one-off → listed under the page's
## Boundarieswith its reason. No reason, not deliberate.
- Sweep what you changed. Search the files you touched this case for raw values —
#[0-9a-fA-F]{3,8}\b|rgba?\(|[0-9]+px|[0-9]+ms— and classify each hit under step 2. It over-reports by design (1pxborders, media queries, third-party overrides); a clean result on a change that altered visual output means you searched the wrong files. Then, only for what the change touched:- a colour pairing → measure the contrast ratio and fill the
Measuredcolumn. Never estimate it: a guessed ratio launders a guess into a spec later work trusts — leave it<TBD>instead; - an interactive element → visible focus, hit target at least the stated minimum, reachable and operable by keyboard;
- an animation →
prefers-reduced-motionbehaves as the page states; - a new state (loading, empty, error, success, disabled) → the canonical treatment, not a second one.
- a colour pairing → measure the contrast ratio and fill the
- Update the page in the same change: the component's inventory row and status, any new role, step or breakpoint, the measured ratios, and
updated. A token added to code without the page is drift nothing will catch later.
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.

