design-tokens-auditor
Audits UI code for design-token consistency and WCAG 2.2 AA basics - hard-coded colors, spacing and font sizes, contrast, focus states and touch targets. Use when the user asks for a UI/design review, accessibility check, or to migrate styles onto tokens.
DesignSource
Install
mkdir -p ~/.claude/skills/design-tokens-auditor # save the file below as ~/.claude/skills/design-tokens-auditor/SKILL.md
SKILL.md
--- name: design-tokens-auditor description: Audits UI code for design-token consistency and WCAG 2.2 AA basics - hard-coded colors, spacing and font sizes, contrast, focus states and touch targets. Use when the user asks for a UI/design review, accessibility check, or to migrate styles onto tokens. --- # Design Tokens Auditor ## Scan 1. Find hard-coded values: hex/rgb/hsl colors, px spacing, font sizes, radii, shadows outside the token files. 2. Map each to the nearest existing token; list values with no close token as candidates for a new one (don't invent them silently). ## Accessibility checks (WCAG 2.2 AA) - Text contrast ≥ 4.5:1 (≥ 3:1 for ≥ 24px or ≥ 19px bold); UI component borders/icons ≥ 3:1. Check both light and dark themes. - Every interactive element has a visible `:focus-visible` style. - Touch targets ≥ 24×24 CSS px. - Don't convey state by color alone; inputs have labels. ## Output | File:line | Issue | Current | Suggested token / fix | Severity | Then a short summary: how many hard-coded values, how many contrast failures, and the three changes with the most impact.