/kenji:audit-responsive [path or route to scope the audit]from kenji skills
Audits and fixes responsive layouts across breakpoints (375/768/1440). Detects stretched-phone anti-patterns, missing max-width, and layout reflow issues. Reports findings before implementing.
Ships in kenji skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Degree of freedom: MIXED — Phases 0–3 [HIGH freedom]; viewport
screenshot loop [LOW freedom — run exactly]; Phase 4 implement only after
the report (wait if scope is large).
Audit-and-fix exception. Report first; then implement. Not present-then-stop.
Desktop is not a wide phone. Responsive means groups reflow, controls size to function, and reading columns cap. A 1440px screenshot that looks like a stretched phone fails this skill.
Before ANY browser interaction, read protocol-browser-anti-stall.
Report-first. Findings + token sheet + ASCII wireframes first. If the scope is large, wait for approval before Phase 4. Then implement in reviewable chunks. Optional path scope:
$ARGUMENTSor a path the user named (e.g.src/pages/dashboard).
| Skill | Owns |
|---|---|
| audit-responsive (this) | Layout reflow + page-level IA at 375 / 768 / 1440 |
design-mobile-first | Touch, safe areas, gestures — mobile-up, not "unstack desktop" |
audit-ux-journeys | Cross-page stories, nav findability |
audit-ux | Per-page heuristics and microcopy |
audit-uiux-design-system | Tokens, components, visual drift |
plan-uiux-unification | Full DS unification plan — no code |
enhance-web-ui / enhance-web-ux | Polish after the layout contract exists |
Observe: Dashboard at 1440: single column, full-width buttons, no
max-w-*. Screenshot matches the 375 stack scaled up. Interpret: desktop is a wide phone — groups that compare (stats, list+detail) never sit side-by-side. Classify: anti-patterns 1, 2, 3 — blocker. Finding:app/dashboard/page.tsx| #1+#2+#3 | blocker | add page max-width; 12-col stats + list+detail at ≥1024
Inspect the scoped UI and record:
All fixes use the repo's conventions. Never add a styling system unless none exists — then propose the lightest fit and ask before adding a dependency.
# Framework + styling signals
rg -l '"next"|"react"|"vue"|"svelte"|"@angular"' package.json
rg -l 'tailwindcss|styled-components|@emotion|@mui/material|@chakra-ui|@radix-ui' package.json
# Tokens / containers / breakpoints
rg -n "screens|breakpoints|max-w-|container|@theme|--spacing" -g '*.{css,ts,js,mjs}' -g '!node_modules' | head -40
# Icon set already in use
rg -n "from 'lucide-react'|from '@heroicons'|from 'react-icons'|phosphor" -g '*.{tsx,jsx,vue,svelte}' | head -20
Scan scoped pages, views, screens, and major layout components. Full signals and pass/fail cues: references/checklist.md.
| # | Anti-pattern | Fail when |
|---|---|---|
| 1 | No max-width container | Content or text edge-to-edge at desktop. Cap layouts ~1140–1280px; reading ~640–720px / 65–75ch |
| 2 | Single-column everything | Vertical stack at ≥1024px when groups belong side-by-side (form+summary, list+detail, comparable stats, media+text) |
| 3 | Stretched interactive elements | Full-width buttons, inputs, or cards at desktop. Full-width is a mobile pattern |
| 4 | No visual hierarchy | Headings, body, labels, captions near-identical size/weight; everything left-aligned by default, not by decision |
| 5 | No spacing system | Arbitrary 13/22/37px gaps instead of the repo's 4/8 scale |
| 6 | No grouping / IA | Related data unclustered; unrelated data merged; flat lists where table/grid/master-detail fits |
| 7 | Missing or mixed icons | Text-only nav/status/actions, or mixed icon libraries/styles |
| 8 | Breakpoint gaps | Styles for one width only; abandoned at 768 (tablet) or 1440 (desktop) |
| 9 | Typography defaults | Browser font stack/size, no type scale, line length >~80ch, cramped body line-height |
| 10 | Table/data misuse | Tabular data as stacked cards on desktop, or wide tables with no mobile strategy |
Each finding: file:line · anti-pattern # · one-line description · severity
(blocker / major / minor).
Live evidence — resize before goto (viewport persists across navigation):
PW="npx --yes @playwright/cli@latest"; S="-s=responsive-audit"
$PW $S open --headed "<app-url>"
for wh in "375 812" "768 1024" "1440 900"; do
$PW $S resize $wh
$PW $S goto "<app-url>/<route>"
$PW $S snapshot # blank → sleep 2 → snapshot again
$PW $S screenshot --filename ".playwright-mcp/responsive-<route>-${wh// /x}.png"
done
If the 1440 screenshot is a stretched phone, that is a blocker for the page.
Shipped as a native app (Capacitor, Expo, RN)? Add 844 390 (phone landscape) and
1024 768 (tablet / unfolded foldable) to the loop. For apps targeting Android 16,
displays ≥ 600dp ignore orientation and resizability locks, so a portrait-locked phone
layout appears stretched there. Confirm on the tablet AVD with mobile-emulator-test.
Before fixing, produce a sheet. If the repo already has tokens, use them verbatim and flag violations — do not invent a second scale.
| Token | Default if the repo has none (mark as proposed) |
|---|---|
| Breakpoints | mobile <640 · tablet 640–1023 · desktop ≥1024 |
| Containers | page max-width · content max-width · reading max-width |
| Grid | 12-column mental model; how each group maps at each breakpoint |
| Spacing | 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 |
| Type | 12 / 14 / 16 / 20 / 24 / 32 + weight + use (caption / label / body / h3 / h2 / h1) |
| Icons | one library; 16 inline · 20 controls · 24 nav |
For each flagged page/screen:
Use real content from the codebase — never invented examples.
prefers-reduced-motion respected.Chunk by severity into reviewable PRs. After each chunk, re-run the 375 / 768 / 1440 screenshot loop on touched routes.
Hand off leftover polish (motion, microcopy, token drift) — do not absorb it.
design-mobile-first; empty states → audit-ui-statesfile:line | anti-pattern | severity | one-line fixForbidden: inventing a new design system when one exists; stacking a
desktop skin on a single-column DOM; claiming done from code inspection
without the three viewport screenshots; routing a linearized-desktop complaint
to design-mobile-first.
design-mobile-first — touch / safe-area / gesture; the mobile-up counterpartplan-uiux-unification — whole-repo DS + IA plan when the system itself is the problemaudit-uiux-design-system — token/component compliance after layout is fixedaudit-ux / audit-ux-journeys — heuristics and cross-page IA (not breakpoint layout)enhance-web-ui / enhance-web-ux — polish once the wireframe is implementedhousekeep-design — competing token/component SSOTsaudit-accessibility — WCAG after reflow (focus order, target size)audit-ui-states — empty/error/offline matrix (not breakpoint layout)test-visual-regression — lock the 375 / 768 / 1440 baselinestest-playwright — regression coverage for the new layoutsWhat SKILL.md sets; muted values are Claude Code's defaults
highnpx claudepluginhub kensaurus/skills --plugin kenji162 skills in this plugin
/audit-accessibilityWCAG 2.2 AA audit via playwright-cli: axe-core, keyboard, contrast, target size, focus, ARIA. Use when "audit accessibility", "check a11y", "WCAG audit", "check keyboard nav", or "test screen reader".
/audit-agent-speedMeasure and fix a slow coding-agent setup: status line, hooks, instruction bloat, effort, worktree pile-up, antivirus and indexer scans. Use when "Claude is slow" or "CPU is pinned". App speed → audit-performance.
/audit-analyticsRead-only audit of product-analytics events (PostHog, Amplitude, Mixpanel, GA4): taxonomy, funnels, consent-gated firing, dead or duplicate events. Use when "audit our analytics", "are we tracking the right events", or "funnel instrumentation".
Other plugins' skills for the same job