Four canonical surfaces in. One dated drift report out.
Pull token values from each surface — DESIGN.md hex codes, tokens.json $values, main.css :root, design-system.html :root.
Four comparisons in leverage order: intra-DESIGN.md → DESIGN.md vs tokens.json → tokens.json vs main.css → main.css vs design-system.html.
For every token DESIGN.md ascribes a hex to, resolve its tokens.json reference chain to a final hex and assert equality. Catches drift hidden inside primitive→semantic indirection — the class the four-diff pass alone missed.
Write a dated audit at _agents/DESIGN_TOKEN_AUDIT_YYYY-MM.md. Severity-tagged findings, file:line citations, one concrete fix per finding, Loop-step routing for each.
Tested against a one-line prompt, a vague baseline, and a lean variant of itself. Honest result published: the lean variant (with rhetorical sections removed) outperformed the full skill on recall, including catching a value-drift finding the full version missed 0 of 3 times. Empirical commitment, not slogan.
Full methodology, per-trial outputs, scoring rubric → thios.co/design-system-bench.html
Follows the addyosmani/agent-skills anatomy. A Thios-specific instantiation of a general pattern — rule-layer ↔ implementation-layer drift detection — that other vanilla design systems could adapt.
Intentionally specific to four surfaces. If Thios adds a Figma Variables export or an npm package per Figma's “Bring your design system” workflow, those become canonical surfaces 5 and 6 — update this skill before they go live.
Run this skill when:
tokens.json $metadata.cssSyncRequired has any entriesmake audit-tokens), as drift-prevention infrastructureDo NOT use for: component-level visual review (use audit-component-consistency), CSS minification verification (covered by make check-css-sync), WCAG contrast audits (use a dedicated a11y skill).
| Surface | Path | Role |
|---|---|---|
| DESIGN.md | /DESIGN.md | Human-readable spec; the rules layer |
| tokens.json | /lib/styles/tokens.json | W3C format; the bridge |
| main.css | /lib/styles/main.css | Running production code |
| design-system.html | /design-system.html | Live demo page |
If a fifth canonical surface is added (e.g. tokens.figma.json exported from Tokens Studio), update this skill before adding it to the audit.
#[0-9A-Fa-f]{3,6}) in table rows and prose. Tag each finding with its section number so cross-section drift inside the same document is caught.$value, resolve {primitive.x.y.z} references to a final hex. Build a flat name → final hex map.:root { ... } block. Capture every --token-name: value; declaration. Ignore @media-scoped overrides — those are intentional surface variations, not drift.:root { ... } block from its inline <style>. Same shape as main.css extraction.metadata.cssSyncRequired should be empty after this passes.The four diffs check token existence but not value drift hidden inside primitive→semantic indirection. For every token DESIGN.md ascribes a hex value to:
{primitive.x.y.z} reference chain to a final hexAny mismatch is High-severity drift. Example (caught by audit-skill-bench as HIGH-1): DESIGN.md:79 says Auxosphere is #909090; tokens.json:192 says auxosphere → {primitive.color.gray.500} which resolves to #6c757d. Diff 2 passes; the value silently drifts. This step was added 2026-05-06 in response to the bench finding.
# Design Token Audit — YYYY-MM ## Summary - Total drift findings: N - Critical / High / Medium / Low: N each ## Findings For each finding: - Severity - Location: file:line ↔ file:line - Token name - Values observed (with surface labels) - Recommended fix (align value | add missing token | remove orphan) - Loop step (per design-system-loop.html: 1 Observe, 2 Design, 3 Tokenize, 4 Build, 5 Ship, 6 Document) ## Statistics - Token counts per surface - Coverage percentages ## Auditor / Date
_agents/Verification checklist before considering the skill run complete:
_agents/DESIGN_TOKEN_AUDIT_YYYY-MM.mdtokens.json $metadata.cssSyncRequired reflects current state