Skip to main content
Design/design-system-auditStableUpdated

Design System Audit

Audit an existing design system for token coverage, component completeness, consistency, accessibility, documentation and whether its docs match its code. Use when a system already exists and you need a scored health report with prioritized gaps.

Use this when a design system already exists and someone needs to know how healthy it is: whether tokens cover what the product actually uses, whether components are specced and consistent, whether documentation exists, stays current and says what the code says. You walk away with a scored health report, prioritized gaps and a remediation roadmap. It is for scoring a system that exists. Founding one is /style-guide; writing its docs from the code is /design-system-extract; whether people can use the product built with it is /ux-audit.

Related skills: Measures against /style-guide: its token foundations, its README shape and its contrast method are the bar. Use /design-system-extract instead when the system has no docs yet; its README is what Step 7 then checks. Feeds /component-spec for components flagged missing or incomplete. Reference /interaction-pattern-library for pattern consistency. Feeds /accessibility-audit for deeper accessibility evaluation.

You provide

  • {{system_location}}: Storybook URL, Figma library, documentation site or code repo. A repo is best, because Step 7 checks the docs against it.
  • {{component_inventory}}: the components the system claims to offer, or where to find that list. If none exists, that is a finding.
  • {{token_system}}: whether tokens exist and where they are defined (Figma, CSS variables, JSON, Style Dictionary).
  • {{product_screens}}: representative screenshots or flows showing how the system is actually used.
  • {{pain_points}} (optional): what the team already knows is broken, missing or drifting.
  • {{team_context}} (optional): who maintains the system and how many products consume it.

Process

Each step fills a table in reference/audit-templates.md. Copy the template; do not paraphrase it.

Step 1: Gather inputs

Check what already exists first. Read the product's docs/product-map.md (or its equivalent catalog) before recommending any new page, section or surface, and reuse what already does the job; if none exists, say so and build the catalog before recommending new surfaces. List what you found and are reusing in a "What already exists" table in the output (the product-map rule, adopted across Kate's app repos 2026-11-29). k8mak.com has no docs/product-map.md yet; knowledge/k8mak-site-inventory.md lists its apps, not its pages.

Collect the six inputs above. If the user has no component inventory, record it as a finding: a design system without a published inventory is already in trouble. If the system lives in a repo, find every place its rules live (token files, charters, brand.ts-style data files, copy decks, CLAUDE.md, CSS comments, audits) before scoring anything. The comparison found each repo kept its rules in five to ten places (docs/design-system-comparison-2026-10.md).

To make this fast on a Next.js and Tailwind v4 site such as k8mak.com: the tokens are the @theme block in site/app/globals.css, components are in site/components/, and pages in site/app/. Count bypassed tokens with a grep, for example grep -rEo '(bg|text|border)-\[#[0-9a-fA-F]{3,8}\]' site/components site/app --include=*.tsx | cut -d: -f1 | sort | uniq -c | sort -rn (arbitrary-value colours per file) and the same with '#[0-9a-fA-F]{6}\b' for raw hex. On k8mak.com each app is themed as its own world on purpose (/app-environment), so count app-scoped palettes apart from drift in shared components. For {{product_screens}}, screenshot one page per template type from sitemap.xml at 375px and 1440px with the pre-installed Playwright, rather than every page.

Step 2: Audit token coverage

Fill the Token Coverage table in reference/audit-templates.md: eleven categories from brand colour to z-index, each with defined, count and coverage. Then rate the token health indicators: hardcoded values in product, naming convention, theming support, machine-readable export, and whether every token carries a usage line naming its grounds and its measured contrast ratio.

Judge machine-readable export against the Design Tokens Format Module 2025.10, the first stable version of the W3C Design Tokens Community Group format (published 28 October 2025, announcement). It is a Community Group report, not a W3C Standard. Check: every token has a $value and a determinable $type; aliases use {group.token}; files are .tokens or .tokens.json; themes (light, dark, brand) are expressed with the companion Resolver Module rather than duplicated files. CSS custom properties alone are readable by an agent but are not this format; record which one the system has.

Step 3: Audit component completeness

Compare what the system offers against what the product uses. Mark each component Complete, Gap, Orphaned or Drift (definitions in the template), note whether it has a spec and a component README (purpose, when to use by variant, what the consumer provides, rules, props), and write the coverage summary with counts. Gaps are the highest-priority additions, and feed /component-spec.

Step 4: Check internal consistency

Fill the Consistency Assessment table in reference/audit-templates.md. Rate naming conventions, variant patterns, state coverage, prop/API patterns, spacing application, responsive behaviour, error patterns and empty states, each with a concrete finding ("Button" vs "Btn" vs "ActionButton").

Step 5: Assess accessibility at the system level

Judge whether the system makes accessible products easy or hard to build, not whether one page complies. Check contrast tokens against 4.5:1 for text and 3:1 for UI (/accessibility-audit holds the criteria), focus styles, keyboard patterns, ARIA in specs, touch targets (24px minimum, 44px recommended), reduced motion, screen reader announcements and forced-colours support.

Measure every contrast ratio yourself, on composited pixels, in every theme. A ratio written in a comment or a doc is a claim to test, not a result. The measuring method is "Measuring contrast on composited pixels" in /style-guide's enforcement reference. Run the page with its scripts, in each colour scheme, and convert lab() and oklch() colours before computing: Tailwind v4 emits lab(), and the 2026-11-01 design audit withdrew 22 false k8mak.com contrast failures caused by stripped scripts and lab() read as RGB (docs/audits/design-audit-2026-11-01.md, fix 3).

Step 6: Assess documentation quality

Rate specs, usage guidelines, code and visual examples, do/don't guidance, Figma-to-code parity, contribution guidelines, migration guides, changelog and search. Then fill the README Shape table in reference/audit-templates.md: one README per repo with summary, principles with reasons, content and voice with a Real copy table, visual foundations, iconography, components, Ruled out, Not synced, plus the four things generated systems drop (settled/draft tags, verbal ruled-out lists, rights, pattern rules) and the check scripts that enforce the system.

Step 7: Check the docs against the code

Pick every token name, count, contrast ratio, rule and example line the docs assert and test it against the source. Grep each token name before accepting it. Count themes, components and icons yourself. Recompute every ratio. Look for draft items presented as settled, and example copy that never shipped. Fill the Docs vs. Code table in reference/audit-templates.md with file:line for each verdict (Holds, Wrong, Invented, Stale). This step comes from the extraction's failure modes: invented token names, a miscount by four, copied contrast claims and stale source docs, all listed in the template.

If the docs were generated by a tool, treat them as AI output under Step 8's human-in-the-loop gate.

Step 8: Assess AI codegen readiness

Rate machine-readable token export, an MCP server or rules file, component-to-code mapping, naming an agent can apply, explicit usage rules and accessibility rules encoded as constraints. Apply the mandatory human-in-the-loop gate (edge and empty states, accessibility validation, brand fidelity, token drift) and name the single highest-leverage gap. The framing and table are in reference/audit-templates.md.

Step 9: Score the system and recommend

Score each of the six dimensions 1 to 5 using the score definitions in reference/audit-templates.md, and show the overall average as a visible sum. Write P0, P1 and P2 recommendations with effort and impact, quick wins, systemic issues, and what is working well.

Step 10: Review with the user

Ask:

  • Do the scores match your gut sense of system health?
  • Are any priority recommendations wrong (too high, too low, missing)?
  • What is the team's capacity for design system investment right now?
  • Is there a specific dimension you want to dig deeper on?

Adjust scores and recommendations based on their input.

Output contract

Present the audit as formatted text in the conversation; the scorecard and recommendations can be exported for team review or backlog planning. Before handing it over, check:

  • Every table from Steps 2 to 9 in reference/audit-templates.md is filled, or marked "not assessed" with a reason.
  • A missing component inventory is recorded as a finding.
  • Every contrast ratio in the report was measured in this audit, names its pair, ground and theme, and is not copied from a comment or doc.
  • Machine-readable export names the format found (DTCG 2025.10, Style Dictionary, CSS custom properties only, Figma only).
  • Every token name the report cites was grepped in the source; invented names are listed as findings.
  • Every count (themes, components, tokens, icons) was counted, not taken from the docs.
  • Every Docs vs. Code verdict cites file:line.
  • Each dimension has a 1 to 5 score with a one-line summary, and the overall average shows its sum.
  • Scores reflect what is specced and adopted, not what is claimed: 50 components with 10 specs is a 2, not a 4.
  • Findings distinguish "doesn't exist" from "exists but isn't adopted".
  • Every recommendation is a task with a scope ("Write specs for the 5 most-used components that currently have none"), not a direction ("Improve documentation").
  • "What's working well" names at least one real strength.
  • Uncertain findings carry markers.
  • Prose follows knowledge/voice-tone-guide.md, with no em-dashes, no hedging and no filler.

Ruled out

  • Never audit a single page's conformance in place of the system. This is about systemic health.
  • Never score on the system's claimed inventory. Score what is specced and used.
  • Never copy a contrast ratio, count or token name from the docs into the report. Measure, count and grep.
  • Never present a draft or open question in the source as a settled rule, or the reverse.
  • Never treat AI-generated components, screens or system docs as finished; they pass the human-in-the-loop gate first.
  • Never write a recommendation that is not a task.
  • Never leave out what is working. The team built something.

Not covered

  • Founding a new visual system: use /style-guide.
  • Documenting an existing system from its code, in the shared README shape: use /design-system-extract.
  • Writing specs for the gaps this audit finds: use /component-spec.
  • Page-level and deeper accessibility testing: use /accessibility-audit.
  • Whether users can complete tasks in the product the system builds: use /ux-audit.
  • Feedback on one mockup or screen before build: use /design-review.
  • Who owns the system and how changes land: use /design-system-governance.
  • The full brand book (logo, voice, imagery, rights): use /brand-guidelines-generator.

Example Output

None yet from a real run. examples.md is an illustration generated in the 2026-06-04 bulk commit (a7d0d749), not an audit of a real system. The closest real material is the per-repo findings in docs/design-system-comparison-2026-10.md, which audited five generated systems against their repos; add the first real run of this skill here.

Run this now

0/4000

One tool, one hard lesson. Only when there is something worth sending.

Occasional emails. Unsubscribe any time.