ui-audit-codex-review

Read-only web UI audit combining Chrome DevTools MCP evidence, axe, interactions, performance traces, a code-level technical review, and a blind independent Codex cross-check. Produces a filterable visual report and Markdown copy. Never changes application code.

Qu'est-ce que ui-audit-codex-review ?

ui-audit-codex-review is a Claude Code agent skill that read-only web UI audit combining Chrome DevTools MCP evidence, axe, interactions, performance traces, a code-level technical review, and a blind independent Codex cross-check. Produces a filterable visual report and Markdown copy. Never changes application code.

Compatible avec✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/sosan/ui-audit-review/tree/HEAD/.claude/skills/ui-audit-codex-review

Installed? Explore more Développement et programmation skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

UI audit with independent Codex review

Audit <site or app> using source at <repo path>. Do not change application code. The skill supports two explicit modes:

  • web (default): browser evidence through Chrome DevTools MCP, axe and traces.
  • ios, android or adaptive: source-level native audit using the platform references; no browser tooling, Lighthouse.

Electron-native or Tauri-native work needs its own desktop audit path.

The audit has two independent evidence streams, reconciled only after both run:

  1. Browser evidence: Chrome DevTools MCP, screenshots, axe, keyboard and touch checks, console/network evidence, and performance traces.
  2. Technical evidence: source-level checks scored 0–4 across five dimensions, followed by a blind Codex review of the same pages and source.

The canonical data contract is references/finding-schema.md. The browser recipe is references/browser-mcp.md. Do not invent a different finding shape in a subagent file.

Non-negotiables

  • Read-only application audit. Do not edit, format, install dependencies in, commit, or fix the application. Writes are allowed only under the audit output directory and the skill's generated report files.
  • Evidence or it did not happen. Every P0/P1 is confirmed in source (file:line) or reproduced with steps plus an existing screenshot/measurement. Unverified claims are dropped or demoted before rendering.
  • Blind Codex. Codex receives the target, repo, routes and states only. It never reads audits/, findings/, screenshots, reports or our conclusions.
  • Ask before starting if browser tools cannot be reached, a page needs sign-in, or neither Chrome MCP nor Lighthouse is available. Never guess credentials.
  • Say what was not tested. Real screen readers, real phones, other engines, signed-in areas, destructive actions and unsupported gestures must be named.
  • Do not report raw scanner output as a finding. axe, Lighthouse and any deterministic detector produce candidates; verify each in context.

Phase 0 — preflight and audit directory

Run from the project root:

python .claude/skills/ui-audit-codex-review/scripts/preflight.py

Then scaffold the output directory:

node .claude/skills/ui-audit-codex-review/scripts/new-audit.mjs \
  <slug> --target "<what is being audited>" --repo <repo path> \
  --platform web|ios|android|adaptive [--url <URL>]

This creates audits/<slug>-<YYYYMMDD>/ with audit.json, scope.md, evidence/, findings/, perf/, and codex/prompt.md. The seed is deliberately invalid until the scope, scores and coverage are filled in.

Preflight reports Node, Chromium, Lighthouse, axe, Codex CLI, Orca and jq. Browser MCP availability cannot be detected from the shell. The preferred tool suffixes are listed in references/browser-mcp.md; this session may expose them as mcp__plugin_ecc_chrome-devtools__* rather than mcp__chrome-devtools__*.

For native mode, read references/native-rubric.md plus references/ios.md, references/android.md, or both for adaptive before scoring. Do not run or report Chrome MCP, Lighthouse for a native audit.

Tool matrix:

CapabilityPreferredFallbackIf neither works
Browser, screenshots, axe, tracesChrome DevTools MCPLighthouse + CLI traces at 4× CPUAsk; use the devcontainer
Automated a11yaxe injected with evaluate_scriptnpx @axe-core/cliManual checklist, reported as limited
PerformanceChrome MCP tracelighthouse --preset=desktop and mobileSay not measured
Independent reviewCodex CLI sandboxOrca worker with --agent codexAsk; report no independent review

Phase 1 — inventory and user confirmation

Fill scope.md before collecting evidence. Inventory:

  • Every route/page and deep link.
  • Empty, loading, error, permission and destructive-confirmation states.
  • Menus, dialogs, forms, tabs, drag and drop, keyboard shortcuts and shared links.
  • Day and Night themes, including how the app actually switches theme.
  • Desktop 1440×900 and phone 390×844.
  • Auth boundary and anything explicitly out of scope.
  • The design-system file, token CSS or theme source used for comparison.

Confirm the route and state list with the user before spending time on screenshots. Record the confirmed list in audit.json as scope_in and scope_out.

Phase 2 — browser evidence

Split work across subagents: one per independent page group and one performance owner. Each browser owner writes a fragment to audits/<slug>/findings/<group>.json using the schema in references/finding-schema.md, plus raw evidence under its page directory. Use provisional id: "TBD"; the coordinator assigns global CL-## ids at merge.

For each page group and each state:

  1. Navigate and capture Day/Night at both viewports.
  2. Save screenshots as <state>-<theme>-<viewport>.png.
  3. Run axe once per theme and viewport; save raw JSON.
  4. Exercise menus, dialogs, forms, tabs, drag/drop, keyboard paths and focus after updates. Check document.activeElement, names, roles and visible focus.
  5. Check 200% text scaling with the method stated in the report.
  6. Check touch gestures with synthesized touch when available; a narrow viewport alone is layout evidence, not gesture evidence.
  7. Record console errors and relevant network requests.

The exact MCP suffixes, axe snippet, focus script, screenshots and trace workflow are in references/browser-mcp.md. Do not claim a gesture was tested when only a 390px render was inspected.

The performance owner measures every page on cold and warm loads:

  • LCP, CLS, long tasks over 50ms, transferred bytes and cache behavior.
  • Main interaction cost for each important interaction.
  • 4× CPU throttle when the MCP exposes it; otherwise state the limitation.
  • Lighthouse mobile and desktop only when MCP traces are unavailable.

Write raw output under perf/ and chart-ready rows under audit.performance.rows. Do not write zero for a metric that was not measured.

Phase 3 — technical audit

Pick the rubric by mode. They are not interchangeable.

Web mode (audit.platform: "web"). Review the implementation, not just its appearance, and score each dimension 0–4 using references/technical-rubric.md:

  1. Accessibility: contrast, motion, ARIA, keyboard/focus, semantics, alt text and forms.
  2. Performance: layout thrashing, expensive animation, image sizing/lazy loading, bundle/import cost and unnecessary rendering work.
  3. Theming: tokens, dark-mode parity, contrast and theme switching.
  4. Responsive design: fixed widths, overflow, targets, text scaling, touch gestures and RTL only where dir="rtl" is actually declared.
  5. Implementation integrity: repeated shortcuts, design-system drift, misleading/decorative content and product-specific coherence.

Native mode (ios, android, adaptive). Do not use the web rubric and do not score "responsive design" or "implementation integrity". Score the five native dimensions in references/native-rubric.md against references/ios.md and/or references/android.md:

  1. Accessibility (VoiceOver/TalkBack, Dynamic Type/font scale, targets, Reduce Motion).
  2. Performance (startup, main-thread work, list virtualization, rerenders).
  3. Appearance and theming (semantic colors/tokens, dark appearance, platform materials).
  4. Platform conformance (system gestures, insets, native navigation and controls).
  5. Adaptivity (size classes, orientation, keyboard/IME, multitasking, foldables).

Native conformance and adaptivity findings must cite the platform rule id in guideline (for example rule:ios-layout-edge-swipe-back or rule:android-layout-system-back). Never invent a rule id.

Native evidence tooling is optional and platform-specific:

  • Android: adb -s <serial> exec-out screencap -p > evidence/<screen>/<capture>.png, plus adb commands for night mode and font scale. Restore device settings after.
  • iOS: xcrun simctl io <UDID> screenshot <path> and xcrun simctl ui <UDID> appearance dark. Use the simulator UDID, not a display name.

These tools capture evidence; they do not replace source review or prove physical hardware behavior. Record the exact device/emulator and commands in audit.method; put unavailable hardware, gestures and profiler checks in audit.not_tested.

Native conformance comes from the platform references, the source review and simulator/emulator evidence. No external detector replaces that judgement, and any automated scanner output is a candidate to verify, never a finding on its own.

For web, deterministic scanners (axe, Lighthouse, custom linters) are candidates too: verify each hit in context and record confirmed false positives.

Phase 4 — blind Codex review

Fill audits/<slug>/codex/prompt.md from references/codex-prompt.template.txt. Do not include our findings, severity, source pointers or report. The page/state list must be identical to Phase 1.

Use the transport-neutral launcher. It prefers an authenticated Codex CLI and falls back to an Orca Codex worker:

node .claude/skills/ui-audit-codex-review/scripts/run-codex-review.mjs \
  audits/<slug>-<YYYYMMDD> --transport auto --timeout 30

--timeout is in minutes and defaults to 30. A stalled Codex run is terminated and reported; it never blocks the audit indefinitely.

Force one transport when debugging setup:

node .claude/skills/ui-audit-codex-review/scripts/run-codex-review.mjs \
  audits/<slug>-<YYYYMMDD> --transport codex-cli
node .claude/skills/ui-audit-codex-review/scripts/run-codex-review.mjs \
  audits/<slug>-<YYYYMMDD> --transport orca

The launcher writes the same artifact for both paths: codex/review.md. It records the selected transport in audit.json and never silently calls a second Claude pass. The Codex CLI path uses --sandbox read-only; if the source is not a Git checkout it adds only --skip-git-repo-check, which does not grant write access.

For Orca, the launcher prints a dispatch_id and returns. End the turn after starting it; Orca wakes the coordinator with worker_done. Then collect the verbatim transcript:

node .claude/skills/ui-audit-codex-review/scripts/run-codex-review.mjs \
  audits/<slug>-<YYYYMMDD> --complete <dispatch_id>

While the worker is pending, audit.json records transport: "orca-worker" and dispatch_id; validation blocks the report until the transcript is collected. For strict filesystem blindness, configure the Orca worker with a fresh worktree rather than current (the launcher defaults to current so it can inspect the same source tree).

If neither transport is available, ask whether to install/authenticate Codex, start Orca, or proceed with no independent review. A second Claude pass is never labelled independent.

Phase 5 — reconcile and validate

Merge subagent fragments into audit.json, assign stable CL-## ids, and parse Codex's output into codex.findings[]. Map each Codex item to exactly one verdict:

  • both: both reviewers found the same verified issue; canonical found_by: both.
  • claude-only: Claude found it and Codex missed it; canonical found_by: claude.
  • codex-only: Codex found it and Claude missed it; canonical found_by: codex.
  • rejected: verification disproved it; include the reason and no canonical finding.

Then run:

node .claude/skills/ui-audit-codex-review/scripts/validate-findings.mjs \
  audits/<slug>-<YYYYMMDD>

P0/P1 evidence, screenshot paths, scores, page references and the Codex comparison must pass validation. Fix the audit data, never the application, when validation fails. Keep Codex's raw output verbatim at codex/review.md.

Phase 6 — report

Optionally create theme.json in the audit directory to style the report like the audited site:

{
  "brand": "Acme",
  "fonts": { "sans": "Inter, system-ui, sans-serif", "mono": "ui-monospace, monospace" },
  "radius": "8px",
  "light": { "page": "#f9f9f7", "surface": "#fff", "ink": "#111", "ink2": "#555", "muted": "#777", "border": "#ddd", "baseline": "#888", "accent": "#2a78d6", "track": "#cde2fb" },
  "dark": { "page": "#101010", "surface": "#1a1a19", "ink": "#f0efec", "ink2": "#c3c2b7", "muted": "#898781", "border": "#333", "baseline": "#c3c2b7", "accent": "#3987e5", "track": "#184f95" },
  "viz": { "light": ["#2a78d6", "#eb6834", "#1baf7a", "#eda100"], "dark": ["#3987e5", "#d95926", "#199e70", "#c98500"] }
}

The default data-viz palette is validated. If replacing viz, validate both themes with the dataviz palette validator before using the colors. Site chrome can use the site tokens; data marks must remain contrast- and CVD-checked.

Each token is inserted as a single CSS declaration value. The renderer rejects any value containing ;, {, }, <, >, a backslash or a newline, and says so — those characters only appear when a value is malformed or someone is trying to close the style block. The optional css string is the exception: it is appended verbatim, so treat it as code and only copy it from a source you trust.

Never let theme.json carry text from the audited page (titles, error messages). Site tokens are colours, fonts and radii, not content.

Render the report:

node .claude/skills/ui-audit-codex-review/scripts/render-report.mjs \
  audits/<slug>-<YYYYMMDD>

Deliver report.html from the audit directory: open it in a browser, or share the file (screenshots are referenced relatively, so keep the directory intact) or publish it as an artifact. The Markdown copy travels anywhere. If the team cannot receive the screenshots, say so — a report without its evidence is not the report.

The renderer refuses invalid data and writes:

  • report.html: self-contained visual report with theme toggle, responsive layout, performance meter charts, screenshots, filterable findings and Codex matrix.
  • report.md: portable Markdown copy of the same report.

Required content: integrity verdict, /20 score table, executive summary, P0–P3 summary, fix-first list, repeated patterns, positive findings, performance charts and per-page table, screenshot section per page, filterable findings, Claude vs Codex comparison, recommended actions, method and not-tested coverage.

The chart renderer follows the dataviz rules: one hue for magnitude, visible threshold lines, values in a dedicated column, table twin, accessible labels, and no color-only state. Do not add a chart that the data does not justify.

Finding shape

Every canonical finding includes:

id: CL-07
page: /settings
severity: P0                 # P0 blocking · P1 major · P2 minor · P3 polish
legacy_severity: critical    # optional critical/high/medium/low
kind: accessibility
affects: { theme: night, viewport: "390x844" }
what: "What happens to the person using the page."
steps: ["Open …", "Press …"]
fix: "Concrete suggested fix."
evidence: "evidence/settings/focus-night-390.png; src/SaveButton.tsx:88"
found_by: both               # claude · codex · both
verified: reproduced          # source · reproduced · unverified

See references/finding-schema.md for validation rules and the complete audit.json contract. Keep P3s few; a long tail buries the release blockers.

Skills associés