website-visual-testing
Skill2 starsChanged 7 months agoMITView on GitHub
Test websites visually in a browser using `opencode-pty` plus `agent-browser`. Use this skill when asked to inspect a local dev server in the browser, reproduce a UI bug visually, verify responsive layout, check light or dark mode, compare mobile and desktop states, or run manual browser QA with screenshots.
In this repository26 other files it gives its agents.
- other/AGENTS.mdAGENTS.md
- beamng-modsSkill
- bootstrap-vueSkill
- charmbraceletSkill
- depsdotdevSkill
- find-domainSkill
- github-cliSkill
- go-cobraSkill
- goreleaserSkill
- go-viperSkill
- kasettoSkill
- laravel-actionsSkill
- lefthookSkill
- miseSkill
- pelican-panel-pluginsSkill
- php-monorepo-builderSkill
- php-saloonSkill
- prd-todo-slicerSkill
- prd-to-kandev-tasksSkill
- qodo-mergeSkill
- release-pleaseSkill
- rewrite-in-goSkill
- shieldsioSkill
- skill-researcherSkill
- skill-scoutSkill
- taskfileSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
27 rules. About 0 are common, 16 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Use this skill to run a website, open it in agent-browser, and verify the UI visually.
- Very specific: line 15
Use pty_spawn for any local app, preview server, Storybook, or long-running test target.
- Very specific: line 16
Never start a server with shell backgrounding like &, nohup, or job control.
- Very specific: line 17
Wait for an actual readiness signal with pty_read before opening the site in the browser.
- Very specific: line 18
Use agent-browser snapshot -i before interactions and re-snapshot after navigation or major DOM changes.
- Distinctive: line 19
Prefer annotated screenshots when layout, unlabeled controls, or visual state matters.
- Distinctive: line 20
Treat visual testing as a UI check, not a replacement for functional or accessibility testing.
- Distinctive: line 41
If the site is already hosted, skip the PTY startup flow and go straight to browser testing.
- Very specific: line 48
Start the server with pty_spawn using:
- Very specific: line 52
Use pty_read to watch for:
- Distinctive: line 56
If the port is unclear, read the PTY output instead of guessing.
- Distinctive: line 58
If startup fails, fix the blocker first.
- Distinctive: line 62
Use stable, explicit navigation:
- Very specific: line 70
Prefer 127.0.0.1 or the exact host emitted by the dev server when available.
- Distinctive: line 72
Before capturing screenshots on asset-heavy pages, ensure the UI is settled:
- Distinctive: line 74
wait for app-specific loading indicators to disappear
- Distinctive: line 75
wait for text that proves the page rendered
- Very specific: line 76
when needed, use agent-browser eval to wait for document.fonts.ready
- Distinctive: line 80
Use both structural and visual views:
- Very specific: line 99
after every navigation or state-changing click, run agent-browser snapshot -i again
- Distinctive: line 128
When you finish, report:
- Distinctive: line 138
Prefer targeted route or component checks over wandering manual exploration.
- Distinctive: line 139
Prefer deterministic states over whatever the live app happens to show.
- Distinctive: line 141
Do not rely on fixed sleeps when a readiness signal or DOM condition is available.
- Distinctive: line 142
If visual noise comes from timestamps, ads, rotating banners, or live counters, call that out explicitly and avoid overclaiming.
- Very specific: line 143
Stop the PTY session with pty_kill when it is no longer needed.
- Distinctive: line 149
If the task requires pixel-diff baselines or CI-grade regression suites, recommend adding dedicated visual regression automation after the …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Website Visual Testing
Use this skill to run a website, open it in agent-browser, and verify the UI visually.
Start Here
- Use
pty_spawnfor any local app, preview server, Storybook, or long-running test target. - Never start a server with shell backgrounding like
&,nohup, or job control. - Wait for an actual readiness signal with
pty_readbefore opening the site in the browser. - Use
agent-browser snapshot -ibefore interactions and re-snapshot after navigation or major DOM changes. - Prefer annotated screenshots when layout, unlabeled controls, or visual state matters.
- Treat visual testing as a UI check, not a replacement for functional or accessibility testing.
Read By Need
| Need | Read |
| Start, monitor, and stop the local site safely | references/pty-workflow.md |
Drive the browser with stable agent-browser commands | references/agent-browser-workflow.md |
| Run a thorough visual review and avoid flaky checks | references/visual-qa-checklist.md |
| Start a common local frontend app quickly | examples/vite.md, examples/nuxt.md |
Workflow
1. Confirm the target
Determine:
- whether the user wants a local site, a remote URL, or both
- which command starts the site if it is local
- which surfaces matter most: route, component, breakpoint, theme, or bug repro path
If the site is already hosted, skip the PTY startup flow and go straight to browser testing.
2. Start the site with opencode-pty
For local targets:
- Inspect project scripts or docs to find the narrowest correct start command.
- Start the server with
pty_spawnusing:- a clear
title - the correct
workdir notifyOnExit: truewhen useful
- a clear
- Use
pty_readto watch for:- localhost URLs
- ready messages
- compile errors
- If the port is unclear, read the PTY output instead of guessing.
If startup fails, fix the blocker first. Do not continue to browser testing against a broken or half-started app.
3. Open the page in agent-browser
Use stable, explicit navigation:
agent-browser open http://127.0.0.1:3000
agent-browser wait --load networkidle
agent-browser snapshot -iPrefer 127.0.0.1 or the exact host emitted by the dev server when available.
Before capturing screenshots on asset-heavy pages, ensure the UI is settled:
- wait for app-specific loading indicators to disappear
- wait for text that proves the page rendered
- when needed, use
agent-browser evalto wait fordocument.fonts.ready
4. Inspect visually before interacting
Use both structural and visual views:
agent-browser snapshot -ito identify actionable refsagent-browser screenshot --annotatewhen you need to inspect layout, spacing, icons, overlays, or unlabeled controlsagent-browser get titleandagent-browser get urlto confirm you are on the expected page
Annotated screenshots are especially useful for:
- responsive breakpoints
- modal, dropdown, and tooltip positioning
- icon-only controls
- canvas-like or visually rich areas that the accessibility tree underspecifies
5. Exercise the target states
Move through the smallest path that proves the visual behavior.
Common patterns:
- after every navigation or state-changing click, run
agent-browser snapshot -iagain - for forms, fill by ref and capture the empty, focused, invalid, and submitted states when relevant
- for menus or modals, capture both closed and open states
- for bug repros, capture before-action and after-action screenshots
6. Cover key visual dimensions
At minimum, check the views that match the request. Common dimensions:
- desktop viewport
- mobile viewport or named device emulation
- light and dark mode
- happy path plus the visually risky state tied to the bug or feature
Typical commands:
agent-browser set viewport 1440 900
agent-browser screenshot shots/home-desktop.png
agent-browser set device "iPhone 14"
agent-browser screenshot shots/home-mobile.png
agent-browser set media dark
agent-browser screenshot shots/home-dark.png7. Report findings clearly
When you finish, report:
- the PTY session used and whether the site started cleanly
- the URLs, viewports, and themes you checked
- concrete findings with route and state context
- screenshots captured, if relevant to the task
- anything not verified and why
Rules
- Prefer targeted route or component checks over wandering manual exploration.
- Prefer deterministic states over whatever the live app happens to show.
- Re-snapshot after page changes because
@erefs can become stale. - Do not rely on fixed sleeps when a readiness signal or DOM condition is available.
- If visual noise comes from timestamps, ads, rotating banners, or live counters, call that out explicitly and avoid overclaiming.
- Stop the PTY session with
pty_killwhen it is no longer needed.
Boundaries
- This skill is for visual browser testing and manual UI verification.
- It does not replace functional tests, accessibility checks, or cross-browser certification unless the user explicitly asks for those.
- If the task requires pixel-diff baselines or CI-grade regression suites, recommend adding dedicated visual regression automation after the manual browser pass.
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.

