ds-gen
Skill0 starsChanged 5 months agoMITView on GitHub
Build tokens.css from the DTCG token SSoT (deterministic, idempotent). Use --check to verify the committed CSS matches the SSoT byte-for-byte (CI gate). Supports tenant builds with --base.
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 49
Fail-closed rule: before a tenant build, run the merged-token audit (/ds-gate --tenant {id}).
≈ “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
Purpose
DESIGN/design-tokens.json is the SSoT; tokens.css is a build artifact and is
never hand-edited. This skill runs the engine's deterministic generator
(light-first :root + [data-theme="dark"], HSL channels).
Windows note: always
python -X utf8 ….
Modes
Build (default)
python -X utf8 ${CLAUDE_PLUGIN_ROOT}/scripts/gen_tokens.py --src DESIGN/design-tokens.json --out DESIGN/tokens.css --profile design.profile.ymlCheck (idempotency / CI gate)
python -X utf8 ${CLAUDE_PLUGIN_ROOT}/scripts/gen_tokens.py --src DESIGN/design-tokens.json --out DESIGN/tokens.css --profile design.profile.yml --checkExit 0 = CSS is up to date; exit 1 = mismatch (SSoT changed but CSS wasn't
regenerated, or someone hand-edited the CSS). On mismatch, show the user what
drifted, then rebuild.
Tenant build (brand override on a shared base)
Tenants override only primitive leaves (brand color, font); semantic structure and a11y discipline are inherited through the reference chain.
python -X utf8 ${CLAUDE_PLUGIN_ROOT}/scripts/gen_tokens.py --base DESIGN/design-tokens.json --src tenants/{id}/design/override.tokens.json --out tenants/{id}/design/tokens.css --profile design.profile.ymlFail-closed rule: before a tenant build, run the merged-token audit
(/ds-gate --tenant {id}). If it returns BLOCK, do not generate the tenant CSS.
After any build
Remind the user that consumer surfaces vendor tokens.css — if this Hub feeds a
Claude Design project, /ds-push re-uploads the refreshed CSS.
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.

