audit-ui-and-save-files
Use if auditing a running web app UI across pages/viewports, saving per-bug findings to a tree.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use if auditing a running web app UI across pages/viewports, saving per-bug findings to a tree.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Use skill if you are exhaustively testing or release-gating martool CLI commands in a source checkout or deployed Coolify container over SSH, without local Docker or provider spend.
Use if driving agent-browser for Chrome/CDP automation, @ref snapshots, tabs, or verification.
Use if testing or debugging an iOS app via agent-device CLI — simulator flows, evidence, bug triage.
Use if supervising Jean agents through MCP and Computer Use for monitoring, recovery, or closure.
Use if auditing or designing a CLI for agent/LLM use — JSON output, exit codes, non-interactive.
Use if auditing or designing an MCP server for agent-readiness — framework, security, context.
| name | audit-ui-and-save-files |
| description | Use if auditing a running web app UI across pages/viewports, saving per-bug findings to a tree. |
Disciplined visual QA of a running web app, with a durable on-disk artifact and an explicit fix-dispatch step.
Dispatch parallel audit subagents that each drive the run-agent-browser skill across an owned slice of pages, capture screenshots at canonical viewports, and write one markdown finding per real bug into a dated, context-scoped, device-scoped tree under css-issues/. When the audit returns, cluster findings into themes, present a Markdown dispatch table, ask the user to approve, and only then spawn fix subagents that route to the pack's build-* or direct-edit paths as appropriate.
The skill owns three things: where files live, how findings are written, and how the fix-pass is dispatched. It does NOT own design taste (the subagents bring that) and does NOT perform the fixes itself (it dispatches them).
Trigger on phrases and contexts like:
Do NOT use this skill for:
run-agent-browser directly inline. This skill's overhead pays back when there are ≥5 routes or when the bug count is unknown.run-playwright or similar; this skill is layout/visual-first.Two structural commitments separate this skill from a generic visual-audit run. Both are non-negotiable.
Every finding markdown file is written to:
css-issues/[YY-MM-DD]/[context]/[device]/NN-short-slug.md
Concrete example (an audit run on 2026-05-19, of the dashboard page, at the iPhone-13 viewport):
css-issues/26-05-19/dashboard/mobile-375/03-overflow-on-table-headers.md
Each segment is mandatory and has a precise meaning. See "Output Tree" below for the full grammar, the canonical viewport slugs, and how to choose [context] slugs. Plant the spec into css-issues/README.md at Phase 2 so every subagent enforces the same layout.
After every audit subagent returns, Claude does NOT silently spawn fix workers. The skill MUST:
N (1 ≤ N ≤ 20) — the number of fix subagents — driven by theme count, NOT by finding count.build-* / direct-edit path.The full clustering rubric, table template, approval grammar, and post-dispatch reconciliation steps live in references/dispatch-fixes-plan.md — read it in full before clustering.
Before dispatching any subagents, confirm:
curl -s -o /dev/null -w "%{http_code}" <url> — must return 200. If the user wants to audit localhost:3000 and nothing is running, boot the dev server in the background and wait for "Ready in" before continuing. Don't dispatch audit subagents against a server that isn't up.run-agent-browser skill is available. Check the available-skills list. If it isn't there, surface this and stop — there is no graceful fallback that produces real screenshots.YY-MM-DD once at the start of the run (e.g. 26-05-19) and pin it for every subagent. Do not let later subagents recompute — same audit, same date, even if it crosses midnight.[context] slugs the audit covers (e.g. dashboard, signup-flow, pricing-page, tables-component). One subagent typically owns one context; large contexts can be split. See "Choosing context slugs" under "Output Tree" for the rubric.Write css-issues/README.md in the project root before dispatching anything. Every audit subagent reads this file as their format authority — pulling the format spec out of every subagent prompt and into one shared file keeps prompts lean and the format consistent.
Copy the spec verbatim from references/audit-format-spec.md. Do NOT paraphrase or recreate — the subagents are matched against this exact file.
Also create css-issues/[YY-MM-DD]/screenshots/ so subagents have a known location to write PNGs. Screenshots are scoped to the audit date, not to context — they live in one flat per-date directory keyed by prefix to avoid collisions.
Partition by [context]. Each subagent owns one (or sometimes two) contexts under the date — a context is the unit of "what slice was audited" and maps cleanly to a subagent's mental model. Common partitions for a marketing-site audit:
homepage)features, pricing, customers)stubs)A 21-route site fits cleanly into 3–4 subagents. A larger site can scale to 6–8.
File ownership is the boundary. Each subagent's "Hard constraints" section names exactly which paths under css-issues/[YY-MM-DD]/<context>/** they may touch. Sibling subagents do not write to each other's subtrees. Screenshots use a per-subagent prefix — see the screenshot-prefix rule below.
Use the prompt template in references/subagent-prompt-template.md. It follows the mission-protocol shape (context → mission gravity → hard constraints → research guidance → DoD → verification → failure protocol → handback). Fill the per-agent slots and dispatch. The template is calibrated against real subagent runs — do NOT compress it.
Dispatch strategy — DO NOT fully parallelize browser-driven audits. This is the single most important footgun. run-agent-browser uses a shared Chrome daemon with a SingletonLock; if you fire 4 audit subagents in the same message they will contend, steal each other's sessions, and most will return with 0 findings. The patterns that actually work:
See references/footguns.md §1 and §7 for the full failure analysis and recovery protocol.
When all subagents return:
Inventory the output:
find css-issues/<YY-MM-DD> -name "*.md" -not -name "README.md" | wc -l
ls css-issues/<YY-MM-DD>/screenshots/ | wc -l
find css-issues/<YY-MM-DD> -mindepth 3 -maxdepth 3 -type d | sort
Track count by context, by device, and by severity (critical / major / minor).
Surface systemic findings. The highest-value patterns are bugs that recur across contexts or devices — they collapse the fix pass from N edits to 1 edit. Read each subagent's "Observations" handback section and lift any "this manifests on N other pages" notes into the top of your summary.
Verify tree shape. Every finding file path should match css-issues/<YY-MM-DD>/<context>/<device>/NN-<slug>.md. Any file outside this shape is a subagent error — move it before continuing.
Report a triage summary to the user: total counts, severity breakdown, top 5–8 most critical individual bugs, the systemic patterns, and a path-to-everything. Do not start fixing. That is Phase 5.
This phase is the headline new capability. Follow references/dispatch-fixes-plan.md in detail; the summary is:
Cluster findings into themes. A theme is a group whose findings share at least one of: the same source files, the same design-token misuse, the same viewport breakpoint, the same component family. If two candidate themes share more than ~70% of their target files, merge them.
Choose N (1 ≤ N ≤ 20) fix subagents. N is driven by theme count, NOT by finding count. A 60-finding audit can map cleanly to 4 themes and 4 subagents; an 18-finding audit might need 6 subagents if the themes are tightly file-disjoint. Cap at 20.
Build the dispatch table with these columns, in this order:
| # | Theme | Findings (count + paths) | Files likely touched | Outcome | Suggested skill(s) |
|---|
# — ordinal subagent number (1..N).Theme — short name (3–6 words) for the cluster (mobile-375 overflow cluster, dashboard contrast on dark surfaces, BrandLogo fallback).Findings (count + paths) — count and the full per-finding paths (relative to repo root). For >5 findings, list the first 5 and …+N more; the full list goes into the subagent prompt.Files likely touched — best-guess src/... paths derived from each finding's Likely cause field. Deduplicated.Outcome — one-line success criterion (bug is invisible at 1440×900 and 375×812, BrandLogo renders correctly on every page).Suggested skill(s) to invoke — frontend-design is NOT a skill in this pack; route to canonical alternatives instead: build-tinacms-nextjs / build-chrome-extension for framework-specific edits, plain Edit / Write for vanilla CSS/component fixes, run-review Mode A for the post-fix self-review step. See references/dispatch-fixes-plan.md for the full routing matrix.Show the full table to the user in the chat. Then ask, verbatim or close to it:
Approve the plan above? Reply
goto dispatch all,go 1,3,5to dispatch only those subagents,changeto revise the plan, orcancelto stop here.
Block on the reply. Do NOT spawn any fix subagent before the user has typed go (with optional subset) or an equivalent affirmative. If the reply is change, revise the table and re-ask. If cancel, stop — the audit artifact remains on disk for later.
Spawn the approved fix subagents. Each gets a tightly scoped prompt: (a) the list of finding files it owns (full paths), (b) the suggested skill to invoke, (c) the outcome criterion, (d) hard constraints on what it must NOT touch outside its theme. See references/dispatch-fixes-plan.md for the fix-subagent prompt template.
Reconcile after fixes land. When fix subagents return, each finding file gets its ## Fix tracking block updated (Fixed by subagent #N checkbox flipped). The audit skill's job ends when (a) fixes are committed and (b) the audit tree reflects which findings are resolved. Re-running the audit verb is a separate session.
The full grammar of the on-disk artifact:
css-issues/
├── README.md (format spec — single source of truth, copy from references/audit-format-spec.md)
└── [YY-MM-DD]/ (audit date, e.g. 26-05-19; computed once at Phase 1)
├── screenshots/ (flat per-date directory; per-subagent prefix avoids collisions)
│ ├── homepage-bento-01-cards-overlap.png
│ ├── feat-pricing-02-cta-cut-off.png
│ └── stub-careers-01-page-x-scroll.png
└── [context]/ (the slice audited: dashboard / homepage / features / signup-flow / tables / ...)
└── [device]/ (viewport slug: mobile-375 / desktop-1440 / tablet-768 / ...)
├── 01-<short-slug>.md (one finding per file; NN preserves discovery order within context/device)
├── 02-<short-slug>.md
└── ...
YY-MM-DD — two-digit year, two-digit month, two-digit day of the audit. Computed at Phase 1 and pinned for every subagent. Same audit = same date even if it crosses midnight. Re-audits get a new date; old dates are durable history.
[context] — a hand-chosen short kebab-case name for the slice being audited. Choose one of these granularities depending on what makes sense for the codebase:
dashboard, homepage, pricing, signup, settings-profile. Best when each page has distinct visual concerns.signup-flow, checkout-flow, onboarding. Best when the audit spans 2–4 related pages with shared visual identity.tables, forms, modals, navigation. Best when the bug class is component-shape across pages (a <DataTable> overflows on mobile everywhere).homepage-hero, homepage-bento. Best when a single page is large enough to split across subagents.Avoid mixing granularities in one audit — e.g. dashboard/ and tables/ overlap because tables appear on the dashboard; pick one. If the audit genuinely needs both, namespace them explicitly (tables-component/ to clarify it's the standalone component, not the dashboard's tables).
[device] — canonical viewport slug. Choose from this list:
| Slug | Width × Height | Used for |
|---|---|---|
mobile-375 | 375 × 812 | iPhone-13 baseline; the brutal-truth viewport |
mobile-414 | 414 × 896 | iPhone Plus-class |
tablet-768 | 768 × 1024 | Where mega-menus collapse to slide-in panels |
tablet-1024 | 1024 × 768 | Where bento/feature grids go 2-col |
desktop-1280 | 1280 × 800 | Where 12-col grids often collapse to 8/4 |
desktop-1440 | 1440 × 900 | Primary design target on most modern sites |
desktop-1920 | 1920 × 1080 | Where max-width caps and white space appear |
Auditor MAY add more (e.g. mobile-360 for Android baseline, desktop-2560 for 4K) but MUST explain in the handback Observations why the canonical set was insufficient. The canonical set is the default; expansions are exceptions.
NN-short-slug.md — zero-padded ordinal (01, 02, …, 99) within [context]/[device]/, then a 3–6-word kebab-case slug describing the bug. Ordinal is per-[context]/[device]/ (not global), preserves manual sort order, and gives the fix subagents a stable iteration order. Examples:
01-bento-cards-overlap-row2.md03-overflow-on-table-headers.md07-cta-button-clipped-by-cookie-banner.mdA finding for a table overflow on the dashboard, iPhone-13 viewport, third bug discovered for that context/device on 2026-05-19:
css-issues/26-05-19/dashboard/mobile-375/03-overflow-on-table-headers.md
That path is searchable, sortable, and locatable to a single subagent's worth of work. The fix dispatch step in Phase 5 reads these paths verbatim and assigns them to themes.
Every .md file follows the template in references/audit-format-spec.md. The template includes a ## Fix tracking block — Phase 5's dispatch step writes the assigned subagent number into that block, and the fix subagent flips its checkbox when done. See the format-spec file for the exact template.
Every audited page should be visited at minimum two viewports (desktop + mobile). The full canonical set, which is what the bundled prompt template asks for, mirrors the device slugs above:
| Viewport slug | Width × Height | When to capture |
|---|---|---|
desktop-1440 | 1440 × 900 | Always (primary design target) |
desktop-1280 | 1280 × 800 | When the 1440 layout has any grid that compresses |
tablet-1024 | 1024 × 768 | When grid columns or sidebar visibility change at ≤1024 |
tablet-768 | 768 × 1024 | When mega-menu / sidebar collapse pattern applies |
mobile-414 | 414 × 896 | When a bug is suspected to differ between 375 and 414 |
mobile-375 | 375 × 812 | Always (iPhone-13 baseline) |
Subagents are told to be efficient: desktop-1440 + mobile-375 minimum for every page; intermediate viewports only when the desktop look is fine but the intermediate breakpoint is suspect. They are NOT expected to capture all six viewports on every page — the goal is bug coverage, not an exhaustive screenshot library.
This is non-negotiable; every finding gets one of three labels:
The rubric matters because the fix-pass operator triages by severity. A subagent that files every minor spacing nit at "major" wastes the operator's attention budget. The format-spec file (references/audit-format-spec.md) carries the full rubric verbatim.
All screenshots land in the flat css-issues/[YY-MM-DD]/screenshots/ directory. Filename collisions are inevitable without a convention. Use a per-subagent prefix:
homepage-<context>-NN-<slug>.png for the homepage agentfeat-<slug>-<context>-NN-<slug>.png for feature-page agentsstub-<route>-<context>-NN-<slug>.png for stub-page agentsIf you split feature pages across two agents (e.g. first 5 / second 5), give each a distinct prefix (feat1-, feat2-) to keep their screenshots disjoint. The bundled prompt template names a specific prefix for each agent role.
(Detail in references/dispatch-fixes-plan.md. The summary lives here so it's impossible to miss while reading SKILL.md top-to-bottom.)
After Phase 4 lands and the user has the triage summary, never proceed to fixes silently. Always:
go (full), go <subset> (selected #s), change (revise), or cancel (stop).go, spawn each approved subagent with: the full list of finding-file paths it owns, the Suggested skill(s) from the table, the Outcome success criterion, and Hard Constraints forbidding writes outside its theme's src/ candidates and the assigned finding files.change, revise per the user's instructions and re-ask. On cancel, stop — the audit tree is durable.When fix subagents return, each one updates the ## Fix tracking block in every finding file it owned (flipping the checkbox to checked, recording its subagent #), commits its src changes in conventional-commit shape, and hands back. The audit skill's job is done when (a) every approved subagent has reported, (b) every finding it owned has a checked fix-tracking block or an explicit wontfix note, and (c) the orchestrator has surfaced any subagent that failed to land its outcome.
If the user types go then immediately revises with new instructions — treat that as change, not partial approval. Re-ask explicitly. Implicit approval is the failure mode this gate is designed to prevent.
See references/dispatch-fixes-plan.md for: the theme-clustering rubric, the full table-format reference, the routing matrix from theme-shape to skill, the fix-subagent prompt template, post-dispatch reconciliation steps, and worked examples (a 12-finding audit → 4 themes, a 60-finding audit → 8 themes, an audit where 70%-overlap merging collapses 6 candidate themes to 3).
The patterns that broke real runs are catalogued in references/footguns.md. The headline list:
<owned-paths> and <forbidden-paths>.Likely cause source-file paths. Push back in dispatch; re-audit.New in this version:
N too high because findings were used as the unit instead of themes. A 60-finding audit must NOT become 60 subagents. Cluster first; let N fall out of theme count. Cap at 20.references/dispatch-fixes-plan.md carries the merge rule.See references/footguns.md for the long-form recovery protocol for each.
references/audit-format-spec.md — verbatim contents of the css-issues/README.md you plant in Phase 2. Includes the per-finding template (with the ## Fix tracking block for Phase 5), severity rubric, viewport table, what-to-look-for list, and the dated-tree path grammar.references/subagent-prompt-template.md — mission-protocol-shaped audit subagent prompt with slots for <base-url>, <page-list>, <context>, <owned-paths>, <screenshot-prefix>, <floor-count>, <dispatch-mode>, and the new <audit-date> slot. Fill the slots and dispatch.references/dispatch-fixes-plan.md — the Phase 5 playbook: theme-clustering rubric, dispatch-table column spec, theme→skill routing matrix, approval-gate phrasing, fix-subagent prompt template, post-dispatch reconciliation, and worked examples.references/footguns.md — long-form failure-mode catalogue with the exact symptoms each produces, including the new Phase 5 footguns (#11–#14).The audit produces files a human design lead will read in a triage meeting. Subagents are encouraged to describe what they SEE, not what they think the user wants to hear. "The card extends 40px past its container's right border" is useful. "The card looks broken" is not. The bundled template's "Observation" field instruction enforces this.
The goal isn't to make the site look bad. The goal is to make every fixable bug visible in one pass, severity-ranked, with a screenshot the operator can paste into chat — and then to convert that inventory into approved, scoped fix work that lands in src/ without losing the audit's structure. That's it. That's the deliverable.