$npx -y skills add educlopez/ui-craft --skill auditTechnical UI audit — a11y, performance, responsive. Produces a prioritized findings table. Invoke when the user asks for audit on their UI, or mentions 'audit' alongside design / UI / frontend work.
| 1 | <!-- HARNESS MIRROR — do not edit here. Canonical source: skills/ or commands/. After editing source, copy into cli/assets/<harness>/ and repo-root harness mirrors. --> |
| 2 | |
| 3 | **Context:** this sub-skill is one lens of the broader `ui-craft` skill. If the `ui-craft` skill is also installed, read its SKILL.md first for Discovery + Anti-Slop + Craft Test, then apply the specific lens below. |
| 4 | |
| 5 | Run a technical audit of the UI at the target the user described. Load the `ui-craft` skill and apply the audit lens. |
| 6 | |
| 7 | ## Step 0: Visual capture (mandatory) |
| 8 | |
| 9 | Code-only review is insufficient. Every audit/critique starts with the surface as the user sees it. Try the following in order; use the first one available: |
| 10 | |
| 11 | 1. **Playwright MCP** — if `playwright` MCP server is available, use it. Capture full-page screenshots at three viewports: desktop (1280×800), tablet (768×1024), mobile (375×812). Capture dark mode if the app supports it. |
| 12 | 2. **Browser DevTools / Chrome MCP** — second choice; same viewport set. |
| 13 | 3. **Other browser automation** (`agent-browser`, `cursor-ide-browser`) — third choice. |
| 14 | 4. **Ask the user** — last resort. If no automation is available, request screenshots from the user before proceeding. Be specific: |
| 15 | - "Visual review needs screenshots. Please provide: |
| 16 | - Full-page at 1280px (desktop) |
| 17 | - Full-page at 768px (tablet) |
| 18 | - Full-page at 375px (mobile) |
| 19 | - Dark mode of each, if supported." |
| 20 | |
| 21 | Do not begin the review until visuals are captured or provided. State this explicitly to the user when no automation succeeds — don't silently fall back to code-only review. |
| 22 | |
| 23 | If the user declines to provide screenshots, run a code-only pass and clearly mark the report `[CODE-ONLY REVIEW — visual issues not assessed]` at the top so the limitation is explicit. |
| 24 | |
| 25 | **Note:** audit is knob-agnostic — accessibility and performance are not tunable. |
| 26 | |
| 27 | **Scope (non-negotiable checks):** |
| 28 | |
| 29 | 1. **Accessibility** — read `references/accessibility.md`: |
| 30 | - Visible `:focus-visible` on every interactive element |
| 31 | - Keyboard reachable, no focus traps |
| 32 | - Touch targets ≥ 44px (mobile) |
| 33 | - Color not the only signal for state |
| 34 | - Form labels, error association, required indication |
| 35 | - `prefers-reduced-motion` honored for all animations |
| 36 | 2. **Performance** — read `references/motion.md` Rendering Performance section: |
| 37 | - Only `transform` / `opacity` animated (no `width`/`top`/`height`) |
| 38 | - No `transition: all` |
| 39 | - `will-change` scoped to active interaction, removed after |
| 40 | - Images have `width`/`height` or `aspect-ratio` (CLS) |
| 41 | - No layout thrash in scroll/resize handlers |
| 42 | 3. **Responsive** — read `references/responsive.md`: |
| 43 | - Mobile-first breakpoints, no fixed-width components |
| 44 | - `env(safe-area-inset-*)` respected on fixed elements |
| 45 | - Touch zones don't overlap |
| 46 | - No horizontal scroll at 320px |
| 47 | |
| 48 | **Output format** — the Review Format table from SKILL.md: |
| 49 | |
| 50 | | Before | After | Why | |
| 51 | | --- | --- | --- | |
| 52 | |
| 53 | Group findings by priority: **Critical** (blocks usability/a11y) → **High-impact** (immediately noticeable) → **Quick wins** (polish). |
| 54 | |
| 55 | Do NOT rewrite code unless asked. Report findings first; wait for approval before editing. |