From voice-sweep
This skill should be used when auditing a Next.js or React project for design-system drift — CTA color violations, heading hierarchy mistakes, missing alt text, container pattern breaks, or semantic-color hygiene. Trigger phrases include "audit the design", "check design system", "design drift", "find CTA color violations", "heading hierarchy check", "design audit". Reads every page.tsx (or configurable glob) and reports findings by severity. Deterministic, no LLM, no paid APIs.
How this skill is triggered — by the user, by Claude, or both
Slash command
/voice-sweep:design-auditThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A static-analysis design-system gate. Reads every page file in a project,
A static-analysis design-system gate. Reads every page file in a project, runs a configurable ruleset, and reports per-file findings classified by severity. Built to catch the drift that visual QA misses — wrong CTA colors, skipped heading levels, raw tailwind color classes that should go through semantic tokens, missing alt text on images.
Trigger this skill when:
page.tsx filesDo NOT use for:
visual-qa skill instead)voice-sweep skill instead)The skill ships a single CLI binary. Invoke it via npx:
npx @operator-skills/design-audit
Common flags:
| Flag | What it does |
|---|---|
--page <route> | Audit a single route (e.g. /operator-pass) |
--glob <pattern> | Override the default src/app/**/page.tsx glob |
--config <path> | Load a custom ruleset JSON |
--remote-config <url> | Fetch a JSON ruleset from a URL (opt-in, no LLM) |
--format table|json | Output format (default: table) |
--verbose | Per-finding detail |
--severity error|warn|info | Minimum severity to surface |
Exit codes: 0 clean, 1 error-level findings, 2 config / file errors.
The default ruleset covers seven rule families. Each project can
override or extend via design-audit.config.json at the repo root.
| ID | Severity | Catches |
|---|---|---|
heading-hierarchy | error | Skipped h* levels (e.g. <h1> → <h3> without <h2>) |
cta-color-destination | error | Buttons styled with bg-secondary but text color that fails WCAG AA contrast (text-background on deeper orange, etc.) |
raw-color-classes | warn | Raw Tailwind colors (text-red-500) where a semantic token (text-danger) exists |
missing-alt | error | <img> or next/image without alt attribute |
container-pattern | warn | Hero / section wrappers missing the standard max-w-* container |
font-display-mismatch | warn | Heading elements using font-sans instead of .font-display |
internal-link-tag | warn | <a href="/..."> for internal routes — should be next/link |
For the full rule list and per-rule examples, load
references/design-audit-rules.md.
Add a single-line comment to a page to suppress a specific rule:
// @audit-design: allow heading-hierarchy
// Reason: legacy h3 inside a marketing-card; rewrite planned 2026-Q3
Suppressions require a Reason: line within the next 5 lines, otherwise
the rule still fires.
design-audit.config.json at the repo root:
{
"glob": "src/app/**/page.tsx",
"rules": {
"heading-hierarchy": "error",
"cta-color-destination": "error",
"raw-color-classes": "off", // disable a default rule
"custom-rule-id": { // add a custom regex rule
"severity": "warn",
"pattern": "TODO\\([A-Z]+\\)",
"message": "Replace TODO(...) with a tracked GitHub issue"
}
},
"ignore": ["src/app/legacy/**"]
}
Default table output groups findings by route:
ROUTE ERR WARN INFO TOTAL
-------------------------------------------------------
/operator-pass 0 1 0 1
/build/partnership 1 0 0 1
-------------------------------------------------------
2 page(s) w/ findings 1 1 0 2
--format json returns a structured { summary, findings[] } payload
suitable for piping into other tools or posting as a PR comment.
- name: Design audit
run: npx @operator-skills/design-audit --severity error
Fails the build on any error-level finding. Warnings are surfaced in the log but do not block. Use suppression comments for known-acceptable exceptions.
This skill works in:
npx @operator-skills/design-audit/plugin install design-audit; Claude auto-invokes when trigger phrases matchnpx @operator-skills/design-audit mcp into any MCP-aware runtimevisual-qa — runtime layout / overflow checks (Playwright)voice-sweep — brand-voice + tone violationsCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub cmj-hub/operator-skills --plugin design-audit