design-extract
Skill1 starsChanged 43 days agoMITView on GitHub
Lists every spacing, type, color, radius, shadow and motion value a codebase uses and how often, finds near-duplicates and one-off values, and counts how many existing values each candidate scale would fit. Produces .design/drift.json. Use as phase 1 of design-system, or when the user asks how inconsistent their UI is.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- memi-design/design-skillstheir own version, first seen Nov 8, 2026
- t0ddharris/compound-marketingtheir own version, first seen Oct 8, 2026
- shreyas-makes/agent-skillstheir own version, first seen Jul 15, 2026
- wangbin3162/agents-skillstheir own version, first seen Jul 3, 2026
- lawrencewzen/design-extracttheir own version, first seen Jun 6, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- memi-design/design-skills★ 7same name
- shreyas-makes/agent-skills★ 2same name
- wangbin3162/agents-skills★ 2same name
- t0ddharris/compound-marketing★ 1same name
- lawrencewzen/design-extract★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- apply-transitionsSkill
- beautifySkill
- choose-iconsSkill
- design-applySkill
- design-enforceSkill
- design-grillSkill
- design-ratifySkill
- design-systemSkill
- empty-statesSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
1
Distinctive
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 25
Run each search and keep the counts.
- Very specific: line 94
Do not recommend a scale. That is design-grill's job.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Design Extract
Count the values the code uses today. Do not recommend anything.
The next phase, design-grill, uses these counts to back up its recommendations. "This scale fits 24 of your 31 spacing values" is a reason the user can check.
Step 1: Detect the stack
cat package.json 2>/dev/null | grep -E '"(tailwindcss|svelte|react|vue|next)"'
ls tailwind.config.* app/globals.css src/app.css src/**/*.css 2>/dev/null | headRecord the framework, the Tailwind major version (v3 uses tailwind.config.js, v4 uses @theme in a CSS file), whether a components.json file exists (it means the project uses shadcn/ui), and the file extension components use.
The commands below assume a src folder and Svelte or React files. Adjust the folder and --include patterns to match the project.
Step 2: Count the values
Run each search and keep the counts.
One-off values. In Tailwind these are values written in square brackets, like p-[13px], instead of a step from the scale:
grep -rhoE '\b(p|px|py|pt|pb|pl|pr|m|mx|my|mt|mb|ml|mr|gap|w|h|top|left|right|bottom|text|rounded|z)-\[[^]]+\]' \
src --include="*.svelte" --include="*.tsx" --include="*.jsx" --include="*.vue" | sort | uniq -c | sort -rnSpacing:
grep -rhoE '\b(p|px|py|pt|pb|pl|pr|m|mx|my|mt|mb|ml|mr|gap|space-[xy])-[0-9.]+\b' src --include="*.svelte" --include="*.tsx" | sort | uniq -c | sort -rnFont sizes, weights and line heights:
grep -rhoE '\btext-(xs|sm|base|lg|xl|[2-9]xl)\b' src --include="*.svelte" --include="*.tsx" | sort | uniq -c | sort -rn
grep -rhoE '\bfont-(thin|light|normal|medium|semibold|bold|extrabold|black)\b' src --include="*.svelte" --include="*.tsx" | sort | uniq -c | sort -rn
grep -rhoE '\bleading-[a-z0-9.]+\b' src --include="*.svelte" --include="*.tsx" | sort | uniq -c | sort -rnColor, in three groups: Tailwind palette colors used directly (like text-neutral-700), hex codes, and named color roles (like text-primary):
grep -rhoE '\b(bg|text|border|ring|from|to|via)-(slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-[0-9]{2,3}\b' src --include="*.svelte" --include="*.tsx" | sort | uniq -c | sort -rn
grep -rhoE '#[0-9a-fA-F]{3,8}\b' src --include="*.svelte" --include="*.tsx" --include="*.css" | sort | uniq -c | sort -rn
grep -rhoE '\b(bg|text|border)-(background|foreground|primary|secondary|muted|accent|card|popover|destructive)\b' src --include="*.svelte" --include="*.tsx" | sort | uniq -c | sort -rnCorner radius, shadows and motion:
grep -rhoE '\brounded(-[a-z0-9]+)?\b' src --include="*.svelte" --include="*.tsx" | sort | uniq -c | sort -rn
grep -rhoE '\bshadow(-[a-z0-9]+)?\b' src --include="*.svelte" --include="*.tsx" | sort | uniq -c | sort -rn
grep -rhoE '\b(transition|duration|ease|animate)-[a-z0-9-]+\b' src --include="*.svelte" --include="*.tsx" | sort | uniq -c | sort -rnStep 3: Sort the values
For each category (spacing, type, color and so on), sort the values into four groups:
- Near-duplicates: values within 15% of each other doing the same job, like
px-3andpx-3.5on two buttons side by side. - Long tail: values used only once or twice.
- Working set: the few values that make up most of the usage.
- Orphans: one-off bracket values that aren't close to any step on any scale.
Then, for each scale the project might adopt, count how many of the current values would fit it: move onto one of its steps with a visible difference under 2px. design-grill quotes this number when it recommends a scale.
Step 4: Write the output
.design/drift.json:
{
"stack": { "framework": "svelte", "tailwind": 3, "shadcn": true, "ext": "svelte" },
"axes": {
"spacing": {
"distinct": 31, "arbitrary": ["pb-[15px]"], "workingSet": ["2","3","4","6","8"],
"nearDuplicates": [["3","3.5"]], "longTail": ["1.5","7","9","11"]
}
},
"hotspots": [{ "file": "src/routes/about/+page.svelte", "issues": 14 }]
}Then print a summary of 25 lines or fewer. For each category, give the number of distinct values, the number of one-off bracket values, and how many values make up 80% of usage. Name the three files with the most findings.
Do not recommend a scale. That is design-grill's job.
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.

