visual-verification
Capture, inspect, and validate rendered local app UI with headless Chrome screenshots. Use when Codex needs to verify frontend changes, compare light/dark or responsive states, inspect authenticated local pages, capture hover/dropdown/focus states, diagnose visual regressions, or create a repo-local screenshot/auth workflow for agents.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- visual-verification
- description
- Capture, inspect, and validate rendered local app UI with headless Chrome screenshots. Use when Codex needs to verify frontend changes, compare light/dark or responsive states, inspect authenticated local pages, capture hover/dropdown/focus states, diagnose visual regressions, or create a repo-local screenshot/auth workflow for agents.
02 资源文件 10
- 参考文档agents/openai.yaml215 B
- 参考文档references/auth-adapters.md3.2 KB
- 参考文档references/first-use.md2.4 KB
- 参考文档references/screenshot-recipes.md2.1 KB
- 参考文档references/troubleshooting.md2.0 KB
- 脚本scripts/detect-project.mjs7.0 KB
- 脚本scripts/ensure-auth.mjs2.7 KB
- 脚本scripts/ensure-browser.mjs4.5 KB
- 脚本scripts/init-config.mjs3.1 KB
- 脚本scripts/screenshot.mjs36.5 KB
03 SKILL.md 正文
Visual Verification
Use this skill to turn UI claims into screenshot evidence. The goal is a local-agent workflow: discover or create repo config, capture the rendered state, inspect the PNG, and iterate until the UI is actually verified.
In commands below, replace <skill-root> with the installed directory containing this SKILL.md.
First Use
- Look for
.agents/visual-verification.json. - If missing, run:
node "<skill-root>/scripts/detect-project.mjs"
node "<skill-root>/scripts/init-config.mjs"
- Run browser setup checks when Chrome/headless-shell availability is unknown:
node "<skill-root>/scripts/ensure-browser.mjs" --smoke
Use --install --smoke if no browser is found.
4. Read references/first-use.md when config is missing, stale, or the repo needs auth setup.
5. Prefer existing repo commands over generated helpers, but do not assume a command name.
6. When protected pages need auth, read references/auth-adapters.md before adding or changing auth setup.
The user does not need to hand-author the config. Agents may create it automatically after inspecting the repo.
Screenshot Workflow
- Reuse an existing dev server when one is running; start the configured dev server only when needed.
- Run the screenshot script from the repo root:
node "<skill-root>/scripts/screenshot.mjs" <url> [options]
- For UI work, capture the relevant states rather than one resting viewport:
- light and dark modes when the app supports themes
- desktop and mobile/tablet when layout changes are relevant
- hover, dropdown, focus, open modal, and scrolled states when those are the changed surfaces
- Open/read the PNG before concluding. A successful command is not enough.
- If the command fails on a selector, expectation, console error, or network error, treat that as a useful verification failure and fix the underlying issue or the selector.
Read references/screenshot-recipes.md for command examples.
Auth Boundary
The skill owns browser control and visual verification. The repo owns auth mutation.
Supported auth modes in config:
none: public pages only.storage-state: use an existing Playwright storage state; never refresh it.command: run a repo-owned command that writes a Playwright storage state.custom-cookie: a repo-owned command creates cookie/storage-state data.playwright-login: a repo-owned Playwright script logs in and writes storage state.
For Better Auth, keep setup local-only and fail closed: refuse remote DB URLs, require BETTER_AUTH_SECRET, create an obvious agent user, grant only local verification permissions, and write .auth/agent-admin-storage-state.json with restrictive file permissions.
Scripts
scripts/screenshot.mjs: plain-Node CDP screenshot runner.scripts/detect-project.mjs: inspect package scripts, routes, and auth signals.scripts/init-config.mjs: write.agents/visual-verification.json.scripts/ensure-browser.mjs: verify or install the Chrome/headless-shell runtime.scripts/ensure-auth.mjs: refresh configured auth storage state without capturing.
References
references/first-use.md: config discovery and initialization flow.references/screenshot-recipes.md: common screenshot commands.references/auth-adapters.md: auth adapter patterns and safety rules.references/troubleshooting.md: known failure modes.
04 同仓库更多 Skills
flow-walk
Fresh-eyes walk of one user flow in the running app, judging ease: friction, copy weight, confusing hierarchy and what can be removed. Use before code review when a change alters what a user sees or decides, and when asked to "walk this flow", "try this as a user" or get "fresh eyes" on a screen. The builder hands one user goal to a tester who knows nothing about the change, then sorts the report. It takes no acceptance criteria and keeps no run folder, only the report; checking acceptance criteria against requirements with retained evidence is the uat skill's job, and correctness belongs to tests and code review.
wrong
Wrong name fixture.
sample
Sample skill for a fixture.
sample
Sample skill for a fixture.
sample
Sample skill for a fixture.
sample
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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