ui-audit-loop
Skill23 starsChanged 7 days agoMITView on GitHub
Visually audit rendered web pages with Playwright screenshots at desktop and mobile widths, automated contrast and overflow checks, asset parity, and an anti-slop checklist, iterating until zero P0 or P1 issues remain. Use when reviewing or polishing pages, layouts, landing pages, or web migrations before claiming done.
In this repository46 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agents-autonomous-loopsSkill
- agents-correctSkill
- agents-create-verification-skillSkill
- agents-reflectSkill
- agents-swarmSkill
- alchemy-infraSkill
- cloudflare-edge-hardeningSkill
- cloudflare-gradual-releaseSkill
- comms-howSkill
- comms-impactSkill
- comms-interrogateSkill
- comms-promo-videoSkill
- comms-slidesSkill
- comms-technical-writingSkill
- comms-unslopSkill
- comms-whySkill
- drizzle-postgresSkill
- effect-boundary-validationSkill
- effect-seam-migrationSkill
- effectSkill
- eng-agent-dx-cli-scaleSkill
- eng-ai-featuresSkill
- eng-benchmark-checklistSkill
- eng-blast-radiusSkill
- eng-change-checklistSkill
- eng-cutover-verificationSkill
- eng-data-backward-compatSkill
- eng-migrationSkill
- eng-monorepoSkill
- eng-qa-cujsSkill
- eng-state-machineSkill
- eng-tddSkill
- eng-testingSkill
- gh-ci-triageSkill
- gh-issue-burndownSkill
- gh-pr-commit-reviewSkill
- gh-pr-feedback-loopSkill
- nix-darwinSkill
- reg-suitSkill
- sentry-bugfixSkill
- sentry-perfSkill
- seo-coachSkill
- svelte-shadcnSkill
- svelte-ui-deliverySkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Start the app or preview build and poll its health endpoint until HTTP 200 before opening a browser.
- Very specific: line 17
Always embed or attach the screenshots in your report or artifact.
- Very specific: line 24
Accessibility and contrast: run @axe-core/playwright (or the repo's axe check) in both light and dark modes with zero color-contrast, …
- Very specific: line 25
Asset, favicon, and metadata parity: verify favicon.ico, og:image, and all rendered <img> assets load with HTTP 200 and non-zero natural …
- Distinctive: line 34
No internal jargon, debug strings, or implementation labels exposed in user-facing UI.
- Very specific: line 35
No raw unmapped enum strings (such as not_stated, snake_case, or undefined) rendered in templates.
- Distinctive: line 36
No overlapping controls, clipped buttons, or unreadable muted text on subtle surfaces.
- Distinctive: line 41
Stop when 0 P0 and 0 P1 visual issues remain, or after 3 consecutive iterations without progress (in unattended or headless runs, attach …
- Very specific: line 46
Every screenshot is embedded or attached as an artifact.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
UI audit loop
Code and unit tests do not catch clipped mobile layouts, unreadable dark-mode contrast, broken favicons, or decorative slop. Capture real rendered screenshots, inspect every image, fix defects, and re-verify until zero P0 or P1 visual issues remain. Pair with svelte-ui-delivery for implementation rules, comms-unslop for copy and UI chrome, and reg-suit for CI visual baselines.
Repo facts (from AGENTS.md): local dev or preview start command (supporting dynamic port or printed URL), health-check URL, key routes to audit, seeded sign-in or auth state, Playwright and axe commands, live-vs-new asset parity baseline URL (for migrations), and screenshot artifact directory.
1. Launch and capture real screenshots
- Start the app or preview build and poll its health endpoint until HTTP 200 before opening a browser. Use a dynamic port (
--port 0) when supported to avoid port collisions. - Drive Playwright across every changed or key route at both 1280px desktop and 375px mobile widths, in light and dark mode when the app supports themes.
- Save full-page and above-the-fold screenshots into the session or PR artifact directory.
- Always embed or attach the screenshots in your report or artifact. Never ask the user to open
localhostto inspect your work.
2. Run automated page invariants
Assert these checks on every audited route and viewport:
- Zero horizontal overflow:
document.documentElement.scrollWidth <= document.documentElement.clientWidthat both375pxand1280px. - Accessibility and contrast: run
@axe-core/playwright(or the repo's axe check) in both light and dark modes with zero color-contrast, landmark, or heading-outline violations. - Asset, favicon, and metadata parity: verify
favicon.ico,og:image, and all rendered<img>assets load with HTTP 200 and non-zero natural dimensions. On site migrations, diff rendered images against the live baseline so no page assets drop silently. - Runtime cleanliness: zero uncaught page errors, failed asset requests, or
securitypolicyviolationCSP events.
3. Apply the anti-slop visual checklist
Inspect every captured screenshot directly and flag any P0 (broken layout, overflow, unreadable contrast, missing image) or P1 (visual clutter, slop, raw internals):
- Apply the UI chrome rules in
comms-unslopto the first viewport and the full page at both widths. On landing pages, flag pills, pretitles, or eyebrows above the hero headline unless the user requested them or the accepted design includes them. Check template defaults too. - Flag filler sections, repeated cards that serve no comparison or scanning need, and static elements that animate for attention. Check the source for each visible metric, testimonial, customer logo, and status claim.
- No internal jargon, debug strings, or implementation labels exposed in user-facing UI.
- No raw unmapped enum strings (such as
not_stated,snake_case, orundefined) rendered in templates. - No overlapping controls, clipped buttons, or unreadable muted text on subtle surfaces.
4. Iterate until clean
- Fix all P0 and P1 findings in code, then re-run the capture and automated checks over every affected route so no stale screenshots remain.
- Stop when 0 P0 and 0 P1 visual issues remain, or after 3 consecutive iterations without progress (in unattended or headless runs, attach the latest failure screenshots and stop with a clear blocker rather than looping or waiting for input).
Verify
- Desktop (
1280px) and mobile (375px) screenshots were captured after the final edit and visually inspected. - Every screenshot is embedded or attached as an artifact; the user was not asked to open
localhost. - Zero horizontal overflow, zero axe contrast violations, valid favicon and OG assets, and zero anti-slop P0 or P1 findings remain.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

