From qe-framework
Scans source files for design token outliers — flags inconsistent font sizes, spacing, colors, component patterns. For style-drift audits or consistency checks.
How this skill is triggered — by the user, by Claude, or both
Slash command
/qe-framework:Qdesign-audit [--scan|--fix|--visual] [file-or-pattern][--scan|--fix|--visual] [file-or-pattern]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
| Request | Action |
| Request | Action |
|---|---|
| "Check design consistency", "standardize font sizes", "design audit" | This skill — scan and report inconsistencies |
| "Fix UI code", "Create new component" | NOT this skill — use Qfrontend-design |
| "Review against Vercel guidelines" | NOT this skill — use Qweb-design-guidelines |
| Flag | Behavior |
|---|---|
--scan | Report inconsistencies only (default) |
--fix | Auto-normalize outliers to design token values |
--visual | Screenshot comparison via Chrome MCP (requires connection) |
If no mode flag is given, default to --scan.
Search for the project's design system source of truth in priority order:
**/theme.ts, **/tokens.ts, **/design-tokens.*, **/variables.csstailwind.config.*:root { --* } blocks in any .css fileRecord the canonical set: { property → [expected values] }.
Grep .tsx, .ts, .css, .scss files for these properties:
| Property | Patterns to match |
|---|---|
fontSize | fontSize:, font-size:, text-{size} (Tailwind) |
fontFamily | fontFamily:, font-family: |
padding | padding:, p-{n}, px-, py-, pt-, pb- |
margin | margin:, m-{n}, mx-, my-, mt-, mb- |
maxWidth | maxWidth:, max-width:, max-w- |
borderRadius | borderRadius:, border-radius:, rounded- |
color | hex #[0-9a-fA-F]{3,8}, rgb(, hsl(, named colors |
gap | gap:, gap- |
Collect every (value, file, line) tuple per property.
For each property, count how many times each value appears:
fontSize:
14px → 42 occurrences
16px → 38 occurrences
13px → 2 occurrences ← candidate outlier
11px → 1 occurrence ← candidate outlier
Mark a value as an outlier if both conditions hold:
N times (default N = 3)If a design token file exists, any value absent from it is an outlier regardless of frequency.
Output the inconsistency report in this format:
## Design Audit Report
**Scanned:** 84 files | **Outliers found:** 7
### fontSize
| Outlier | Expected | File:Line |
|---------|----------|-----------|
| 13px | 14px, 16px | src/components/Card.tsx:42 |
| 11px | 14px, 16px | src/pages/Login.tsx:18 |
### color
| Outlier | Expected | File:Line |
|---------|----------|-----------|
| #e0e0e0 | token: --color-gray-200 (#ebebeb) | src/ui/Divider.tsx:9 |
If no outliers are found, report: "No inconsistencies detected."
--fixFor each outlier:
Never auto-apply without confirmation.
--visual (Chrome MCP)Check MCP connection first:
claude mcp list 2>/dev/null | grep -i chrome
Connected: For each page/component with outliers, take a screenshot using mcp__claude-in-chrome__*, then compare visually against a reference screenshot if available.
Not connected: Skip visual mode, proceed with code-only scan, and note at the top of the report:
[Visual mode skipped — Chrome MCP not connected. Run /Qchrome to set up.]
Before delivering the report:
file:line — FAIL if location is missing--fix mode showed diff before applying — FAIL if edits were made without confirmation/Qdesign-audit → scan entire project
/Qdesign-audit --fix → scan + auto-normalize (with confirmation)
/Qdesign-audit --visual → scan + screenshot comparison
/Qdesign-audit src/components/ → scan specific directory
--fix always previews first)Qweb-design-guidelines)npx claudepluginhub inho-team/qe-framework --plugin qe-frameworkCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.