design-apply
Skill1 starsChanged 43 days agoMITView on GitHub
Updates a codebase to use the design tokens from design-ratify, in four batches ordered from safest to riskiest: exact matches, near matches, Tailwind colors to named roles, then everything else. Commits each batch separately. Use as phase 4 of design-system, after design-ratify.
In this repository9 other files it gives its agents.
- apply-transitionsSkill
- beautifySkill
- choose-iconsSkill
- design-enforceSkill
- design-extractSkill
- design-grillSkill
- design-ratifySkill
- design-systemSkill
- empty-statesSkill
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
When a value has no matching token, stop and note it.
- Distinctive: line 20
Keep a list as you go. At the end of the phase, show it to the user as questions.
- Distinctive: line 30
Before making the changes, tell the user how many there are and the biggest single change.
- Very specific: line 57
Run the linter and report what's left, grouped by rule.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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 Apply
Replace values in the code that aren't tokens with the matching token. Work in four batches and commit each one separately, so if something looks wrong you can tell which batch caused it.
Before you start
test -f DESIGN.md || echo "MISSING"Never make up a value
When a value has no matching token, stop and note it. Don't use the closest token, and don't add a new one.
Keep a list as you go. At the end of the phase, show it to the user as questions. Each value is either a gap in the system or a value that shouldn't exist, and the user decides which.
Batch 1: exact matches
Values that already equal a token but are written out by hand, like p-[16px] to p-4. Nothing looks different. Apply these across the whole repo.
Batch 2: near matches
Values within half a spacing step of a token, like pb-[15px] to pb-4.
Before making the changes, tell the user how many there are and the biggest single change. For example: "47 changes, the biggest is 15px to 16px."
Batch 3: Tailwind colors to named roles
For example, text-neutral-700 to text-muted-foreground.
This needs judgment, not find-and-replace. The same gray can be body text in one component and a disabled button in another, and those need different roles.
Go one component at a time: read it, decide the right role for each color, and update the whole file.
Batch 4: everything else
Values with no obvious token. Handle each one on its own. Don't batch them.
For each batch
git checkout -b design-apply-batch-N
# make the edits
npm run build # or the project's own check command
git diff --statTell the user what changed, which direction each change went (bigger or smaller, lighter or darker), and the biggest single difference. Wait for them to review before starting the next batch.
Finish
Run the linter and report what's left, grouped by rule. It isn't installed until phase 5, so if npm run design-lint doesn't exist yet, run node <design-enforce skill folder>/assets/design-lint.mjs. For each remaining finding, say whether it's a deliberate exception or a gap in the system.
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.

