skills/ux-audit/SKILL.md
--- name: ux-audit description: Feature-level UX audit for React/Next.js code, diff-aware by default. Catches what Lighthouse, axe, ESLint, and Storybook miss: state-coverage gaps (missing loading/empty/error), form data loss on validation, double-submit, broken focus management, optimistic UI without rollback, stale async responses, skeleton-induced layout shift, and vague microcopy. 33 modern failure-mode rules plus 30 Laws of UX rules across 12 feature playbooks. Produces a 3-tier ship-readin
npx skillsauth add mblode/agent-skills skills/ux-auditInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Static UX-quality reviewer for React/Next.js code. Operates at the feature level (a checkout flow, an onboarding flow, a dashboard) and answers one question for a dev with a PR open: "which of these will hurt users in production, and which are nice-to-haves?"
file:line evidence and React 19 fix snippets.ax-audit), a page-level rendered-UI quality/accessibility audit (→ use ui-audit), or a re-implementation of Lighthouse/axe/Chromatic (→ see "Defer to other tools").Copy and track this checklist:
UX Audit progress:
- [ ] Step 1: Determine scope (PR diff via `git diff --name-only main` OR explicit file/folder)
- [ ] Step 2: Detect features in scope (sign-in / checkout / form / modal / list / dashboard / ...)
- [ ] Step 3: For each feature, run its playbook from references/feature-playbooks.md in order
- [ ] Step 4: For each check, load the named rule file (rules-modern/ or rules/) and run its detection
- [ ] Step 5: Assign each finding a ship tier per references/ship-readiness.md (surface can bump tiers)
- [ ] Step 6: Build the JSON document, then render with the chosen output adapter
- [ ] Step 7: Run the audit-self-check; report INCOMPLETE if it fails
Step notes:
<form> with email + password is sign-in; role="dialog" is a modal; route /checkout is checkout. Detection table in references/feature-playbooks.md.rulesRun count.release-blocker | fix-this-sprint | backlog; the surface context can bump the rule's default tier up or down (sign-in/checkout bump up; marketing/internal-admin bump down).Three layers, each with its own loading condition. Load rule files individually, on demand:
| Layer | Location | Load when | Size |
|---|---|---|---|
| 1: Feature playbooks | references/feature-playbooks.md | Always, at Step 2, since it is the entry point that names which Layer 2/3 rules to run | 12 playbooks |
| 2: Modern failure modes | rules-modern/<category>-<slug>.md | A playbook check names the rule, or a changed file matches the rule's category (forms, states, async, focus, mobile, dark-i18n, microcopy) | 33 rules |
| 3: Laws of UX | rules/<prefix>-<slug>.md | A playbook explicitly names a Laws rule, or a finding needs cognitive/perceptual reasoning no Layer 2 rule covers | 30 rules (20 programmatic, 10 rubric) |
Layer-specific notes:
rules-modern/_sections.md; one-line summary of every rule with default tiers: references/modern-failure-modes.md. Each rule file contains detection greps, false-positive guards, surface-tier overrides, and a before/after fix.rules/_sections.md. The 10 rubric-kind rules score 1-5 against the anchor tables in references/observational-rubrics.md: emit the score plus the verbatim anchor text.git diff --name-only main -- '*.tsx' '*.jsx' '*.ts' '*.js' '*.css' '*.module.css'
Audit only those files, and surface the base in the output: Auditing: 8 files changed vs main.
git diff --name-only HEAD -- src/Component.tsx--full src/): e.g. when introducing the skill to a codebase. A default full sweep buries the 3 findings that matter under 60 that don't.Every audit opens with a verdict block before per-finding detail:
═══════════════════════════════════════════════════════════
SHIP VERDICT: ❌ NOT READY (1 release-blocker)
Surface count: 3 (CheckoutForm, PaymentStep, ConfirmStep)
Findings: 7
Release blockers: 1 ⛔ Form data loss on validation (PaymentStep.tsx:42)
Fix this sprint: 3 ⚠️
Backlog: 3 📋
Defer-to (not audited here):
Performance (CWV): Run Lighthouse
Bundle size: Run size-limit
WCAG violations: Run axe-core
═══════════════════════════════════════════════════════════
Verdict computation: ✅ READY (0 blockers, ≤3 sprint) · ⚠️ READY WITH FOLLOW-UP (0 blockers, ≥4 sprint) · ❌ NOT READY (≥1 blocker) · 🚫 INCOMPLETE (self-check failed). Tier definitions, surface bump rules, and worked examples: references/ship-readiness.md.
All three formats render from the same JSON document. Templates and field mappings: references/output-adapters.md; strict schema: references/output-schema.md.
| Adapter | When | Format |
|---|---|---|
| Terminal table | Local dev, agent chat | Tight table grouped by surface, tier-sorted |
| PR comment | GitHub / Vercel review | Markdown summary + inline comments with suggestion blocks |
| CI JSON | Pipelines, merge gates | Strict JSON; gate with jq -e '.summary.releaseBlockers == 0' |
A finding is intentionally suppressed with an inline comment whose slug matches the rule:
{/* ux-audit-ignore:focus-not-restored, intentional: parent owns focus */}
<Dialog open={open} onClose={onClose}>
Suppressed findings still appear in the audit summary (summary.suppressed) so reviewers can verify intent.
ux-audit lives in the gap between "lint passes and axe is clean" and "the product still feels broken." When a finding belongs to another tool, link out, don't restate:
| Concern | Use instead | |---|---| | Core Web Vitals (LCP, CLS, INP) | Lighthouse + web-vitals | | WCAG rule violations, alt text, contrast | axe-core / eslint-plugin-jsx-a11y | | Visual regression | Chromatic / Percy | | Bundle size budgets | size-limit / bundle-analyzer | | Generic bug review | CodeRabbit / Vercel Agent |
Full coverage map plus the list of gaps only ux-audit catches: references/defer-to-other-tools.md.
| File | Read when |
|------|-----------|
| references/feature-playbooks.md | Steps 2-3: feature detection table + per-feature ordered checks |
| references/modern-failure-modes.md | Browsing Layer 2: all 33 rules with categories and default tiers |
| references/states-coverage.md | Validating loading/empty/error/disabled coverage; state-pair grep recipes |
| references/ship-readiness.md | Step 5: tier definitions, surface bump table, verdict logic |
| references/output-adapters.md | Step 6: verbatim terminal / PR-comment / JSON templates |
| references/output-schema.md | Step 6: strict JSON schema and validation rules |
| references/observational-rubrics.md | Scoring any of the 10 Layer 3 rubric-kind rules (1-5 anchors) |
| references/defer-to-other-tools.md | Deciding whether a concern is another tool's job |
| rules-modern/_sections.md | Layer 2 category index (7 categories, 33 rules) |
| rules-modern/<category>-<slug>.md | Step 4: running a named Layer 2 check |
| rules/_sections.md | Layer 3 category index (5 prefixes, 30 rules) |
| rules/<prefix>-<slug>.md | Step 4: running a named Layer 3 check |
ax-audit, agentic-feature PRs (agent dashboards, tool-use UIs, trust patterns). Run both on an agentic feature: ax-audit for the agent layer, ux-audit for the traditional surfaces around it.ui-audit: page-level audit of rendered UI quality and accessibility; use it when the question is "polish this page", not "review this diff".pr-reviewer: correctness bugs and code quality in the same diff; ux-audit only covers user-facing behaviour.release-blocker liberally. Reserve it for data loss, broken critical paths, and dark patterns. If every finding is a blocker, the verdict stops gating merges.<Suspense fallback={<InvoiceListSkeleton />}>" gets applied.defaultTier/assignedTier/tierReason and makes runs incomparable.result: "unknown" with a reason, never a fail. The self-check flags audits with >30% unknowns.Self-flag the audit as INCOMPLETE if any of these are true:
rulesRun < rulesPlanned)unknownfile:line citationfix (and, where mechanical, a fixSnippet)development
Designs and builds UI end to end, from visual direction (palettes, type scales, design tokens, layout systems, landing-page CRO strategy, brand kits) to Tailwind implementation with the ui.sh design guideline system, including multiple variants with an in-browser picker, semantic markup scaffolds from screenshots, retrofitting dark mode or responsive behavior, and componentizing or canonicalizing Tailwind code. Use when asked to "build a landing page", "create a dashboard", "make this look good", "make this look premium", "pick a visual style", "design the UI for", "show me 3 hero options", "improve conversions", "create a brand kit", "turn this screenshot into markup", "add dark mode", "make a dark version of this image", "make this responsive", "fix this on mobile", "componentize this page", "clean up the Tailwind", or any prompt that designs, creates, or refines UI code. For auditing existing UI use ui-audit; for motion use ui-animation; for landing page copy use copywriting.
development
Collaborative interrogation that produces an implementation plan before any code is written. Explores the codebase and relevant docs first, asks one question at a time with a concrete recommended answer, grills the rationale behind documented decisions, flags fuzzy terminology, and walks a decision tree until shared understanding is reached, then writes a plan file. First step of the shipping pipeline; it creates plans, plan-reviewer stress-tests them, pr-creator opens the PR. Use when asked to "create a plan", "help me think through this", "plan this feature", "I want to build X", "grill me", "grill with docs", "understand the docs", "unpack the decisions", "brainstorm a spec", "what should the plan be", "think this through with me", or before starting any non-trivial implementation.
development
--- name: pr-reviewer description: Reviews the current local diff or branch and returns a read-only, severity-tiered findings report. It never edits files. Four modes: standard bug and compliance review, structural quality, AI slop detection, and whole-codebase security audit. Use when asked to run /pr-reviewer, "review my changes", or "code review" before commit, push, or handoff. "Thermo-nuclear review", "structural review", "deep code quality audit", "harsh maintainability review", and "code
development
Audits web UI quality at page or feature level across accessibility, keyboard interaction, forms, typography surface checks, navigation feedback, layout resilience, performance, motion, and microcopy. 35 prefix-dispatched rules plus craft and typography sweep checklists; reports findings by file with impact ratings and concrete fixes. Use when reviewing or refining frontend UI before merge or release, asking "check my UI", "is this accessible", "polish this page", "design QA this", or requesting a UI or accessibility audit. For code-level React/Next.js UX bugs in a diff (state coverage, focus management, optimistic UI), use ux-audit. For agentic-app patterns and trust design, use ax-audit. For deep typography (typeface pairing, brand identity, display type), use typography-audit. For motion implementation (springs, easing, gestures), use ui-animation.