apply-design-system
Skill0 starsChanged 6 months agoMITView on GitHub
Apply a shared design system to a codebase from bootstrap through ongoing extension workflows, with traceability from DESIGN.md files into token CSS and component usage. Use when adding or modifying UI, adopting DESIGN.md in a project, or introducing new design tokens.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- edenspiekermann/Skillstheir own version, first seen Mar 24, 2026
- dillonlui/claude-skillstheir own version, first seen Feb 20, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- edenspiekermann/Skills★ 67same name
- dillonlui/claude-skills★ 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 repository3 other files it gives its agents.
The file
Show its rules and text
We split this skill into the rules it gives an agent
28 rules. About 0 are common, 14 are distinctive, and 14 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
14
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
Do NOT introduce raw visual values (hex, rgb, px, rem, etc.) directly in components/pages when a token is required.
- Distinctive: line 45
Create a task for each item and complete in order:
- Distinctive: line 47
Check project context: - read repo AGENTS guidance and identify frontend structure.
- Very specific: line 49
Locate design files: - verify whether docs/specs/DESIGN.md and docs/specs/DESIGN-EXTENSION.md exist.
- Very specific: line 56
Validate design docs: - run @google/design.md lint on both design files.
- Very specific: line 57
Regenerate token stylesheet: - run the project's generate-styles script to regenerate the token stylesheet from merged design sources.
- Distinctive: line 59
Enforce boundary: - ensure linting in project tooling rejects raw values outside token stylesheet.
- Distinctive: line 64
Use when the project has not adopted the design system yet.
- Very specific: line 66
If docs/specs/DESIGN.md is missing, copy assets/DESIGN.md into docs/specs/DESIGN.md.
- Very specific: line 68
If docs/specs/DESIGN-EXTENSION.md is missing, copy assets/DESIGN-EXTENSION.md into docs/specs/DESIGN-EXTENSION.md.
- Very specific: line 72
After bootstrap, suggest adding these checks to build/lint workflow (for example make lint):
- Distinctive: line 81
Do not prescribe a single implementation mechanism for linting.
- Distinctive: line 89
Use when requested UI changes can be satisfied by existing tokens.
- Very specific: line 91
Look up available tokens in the token stylesheet (styles.css or equivalent).
- Distinctive: line 94
If a needed token is missing from the token stylesheet, do not use raw values.
- Distinctive: line 99
Use when a required visual value does not already exist as a token.
- Distinctive: line 101
Ask one question at a time and guide this decision tree:
- Very specific: line 105
If absent from both, add the token to DESIGN-EXTENSION.md with:
- Very specific: line 111
Run the project's generate-styles script (see Template Assets) to regenerate the token stylesheet.
- Distinctive: line 113
Use the new token reference in UI code.
- Distinctive: line 115
Never skip directly to hardcoded values in components.
- Distinctive: line 124
Never modify baseline contents in place.
- Very specific: line 126
Use npx @google/design.md diff between old and new baseline to understand token changes.
- Very specific: line 129
Run the project's generate-styles script (see Template Assets).
- Very specific: line 131
Update baseline-version in DESIGN-EXTENSION.md.
- Very specific: line 135
Treat the token stylesheet (styles.css or equivalent) as the project token boundary.
- Very specific: line 170
Do not hardcode frontend/src/styles.css in the skill logic.
- Distinctive: line 172
Keep linting mechanism open.
≈ “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
Apply Design System
Apply a design system using a two-layer source model:
DESIGN.md: company baseline, static asset (bootstrapped from this skill's assets)DESIGN-EXTENSION.md: product-local additions and overrides
Then map both into a token stylesheet (often styles.css) and ensure UI code
only uses token references, never raw visual values.
Traceability flow:
DESIGN.md + DESIGN-EXTENSION.md
|
| merge frontmatter (via yq) + export (via @google/design.md)
v
styles.css <- only place raw values appear
|
| CSS classes or var(--token-name)
v
components / pages<HARD-GATE>
Do NOT introduce raw visual values (hex, rgb, px, rem, etc.) directly in
components/pages when a token is required. If a needed value does not exist in
either DESIGN.md file, add it to DESIGN-EXTENSION.md first.
</HARD-GATE><HARD-GATE>
`DESIGN.md` is a read-only, company-sourced baseline asset. Do NOT edit,
normalize, or patch it in individual projects, including when lint tools report
warnings. Project-local changes MUST go in `DESIGN-EXTENSION.md`.
</HARD-GATE>Checklist
Create a task for each item and complete in order:
- Check project context - read repo AGENTS guidance and identify frontend structure.
- Locate design files - verify whether
docs/specs/DESIGN.mdanddocs/specs/DESIGN-EXTENSION.mdexist. - Bootstrap if needed - copy missing files from this skill's
assets/. - Locate token stylesheet - identify
styles.cssequivalent used as token source for the project. - Apply workflow - either consume existing tokens or run extension flow for new needs.
- Validate design docs - run
@google/design.md linton both design files. - Regenerate token stylesheet - run the project's
generate-stylesscript to regenerate the token stylesheet from merged design sources. - Enforce boundary - ensure linting in project tooling rejects raw values outside token stylesheet.
Workflow A: Bootstrap
Use when the project has not adopted the design system yet.
- If
docs/specs/DESIGN.mdis missing, copyassets/DESIGN.mdintodocs/specs/DESIGN.md. - If
docs/specs/DESIGN-EXTENSION.mdis missing, copyassets/DESIGN-EXTENSION.mdintodocs/specs/DESIGN-EXTENSION.md. - Confirm both files are added to the project repository.
After bootstrap, suggest adding these checks to build/lint workflow (for example
make lint):
npx @google/design.md lint docs/specs/DESIGN.mdnpx @google/design.md lint docs/specs/DESIGN-EXTENSION.mdgenerate-styles(or equivalent) in the frontend build step- A frontend lint rule that rejects raw visual values outside the token stylesheet
Do not prescribe a single implementation mechanism for linting; keep it open to the codebase (ESLint custom rule, regex gate, other existing tooling).
Copy both template assets (see Template Assets) into the project and wire them into build/lint.
Workflow B: Use Existing Tokens
Use when requested UI changes can be satisfied by existing tokens.
- Look up available tokens in the token stylesheet (
styles.cssor equivalent). This is the authoritative list UI code may reference. - Apply token references (
var(--token-name)) in component/page code. - If a needed token is missing from the token stylesheet, do not use raw values. Use Workflow C.
Workflow C: Need Something New (Agent-Guided)
Use when a required visual value does not already exist as a token.
Ask one question at a time and guide this decision tree:
- Check baseline - does
DESIGN.mdalready define an equivalent token? - Check extension - does
DESIGN-EXTENSION.mdalready define it? - If absent from both, add the token to
DESIGN-EXTENSION.mdwith:- name
- value
- purpose/intent
- short justification
- Validate both files with
@google/design.md lint. - Run the project's
generate-stylesscript (see Template Assets) to regenerate the token stylesheet. - Use the new token reference in UI code.
Never skip directly to hardcoded values in components.
Workflow D: Baseline Version Drift (Manual)
Updating DESIGN.md is intentional and manual via baseline replacement only.
This skill does not perform auto-updates and does not allow in-place edits.
- Replace project
docs/specs/DESIGN.mdwith a newer baseline only when the project explicitly chooses to upgrade the company baseline. - Never modify baseline contents in place; use a full-file replacement from the approved baseline source.
- Use
npx @google/design.md diffbetween old and new baseline to understand token changes. - Reconcile
DESIGN-EXTENSION.mdmanually. - Run the project's
generate-stylesscript (see Template Assets). Do not hand-edit the token stylesheet. - Update
baseline-versioninDESIGN-EXTENSION.md.
Token Pipeline Contract
Treat the token stylesheet (styles.css or equivalent) as the project token
boundary.
- Raw values are allowed in:
docs/specs/DESIGN.mddocs/specs/DESIGN-EXTENSION.md- token stylesheet source/output
- Raw values are not allowed in:
- components
- pages
- inline React styles
- non-token CSS modules/files
The token stylesheet is generated by the project's generate-styles script (see
Template Assets).
The token stylesheet is fully generated from the DESIGN files. Do not hand-edit
it. Any new values must be added to DESIGN-EXTENSION.md first, then the
stylesheet regenerated.
Template Assets
This skill provides two Node.js script templates in assets/. Copy both into
the project's scripts directory during bootstrap and configure project-specific
paths/file extensions.
generate-styles.mjs expects yq to be available on PATH.
| Template | Purpose | Wire into |
generate-styles.mjs | Merge baseline and extension token outputs and write the token stylesheet | frontend build step |
enforce-design-boundary.mjs | Reject raw visual values outside the token stylesheet | frontend lint step |
Flexibility Rules
- Do not hardcode
frontend/src/styles.cssin the skill logic. - Locate the token stylesheet path per project.
- Keep linting mechanism open; enforce behavior, not tool choice.
Success Criteria
The workflow is complete when all are true:
- Both design source files exist in
docs/specs/. DESIGN-EXTENSION.mdis the single source for product-local visual extensions.- Token stylesheet is generated from merged design sources.
- Components/pages reference tokens only.
- Lint/build workflow includes design doc validation and raw-value boundary enforcement.
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.

