agentleFS
aaronfloreyaaronflorey/agent-skills/skills/website-visual-testing/SKILL.md

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.

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
  1. Very specific:

    Use this skill to run a website, open it in agent-browser, and verify the UI visually.

    line 11
  2. Very specific:

    Use pty_spawn for any local app, preview server, Storybook, or long-running test target.

    line 15
  3. Very specific:

    Never start a server with shell backgrounding like &, nohup, or job control.

    line 16
  4. Very specific:

    Wait for an actual readiness signal with pty_read before opening the site in the browser.

    line 17
  5. Very specific:

    Use agent-browser snapshot -i before interactions and re-snapshot after navigation or major DOM changes.

    line 18
  6. Distinctive:

    Prefer annotated screenshots when layout, unlabeled controls, or visual state matters.

    line 19
  7. Distinctive:

    Treat visual testing as a UI check, not a replacement for functional or accessibility testing.

    line 20
  8. Distinctive:

    If the site is already hosted, skip the PTY startup flow and go straight to browser testing.

    line 41
  9. Very specific:

    Start the server with pty_spawn using:

    line 48
  10. Very specific:

    Use pty_read to watch for:

    line 52
  11. Distinctive:

    If the port is unclear, read the PTY output instead of guessing.

    line 56
  12. Distinctive:

    If startup fails, fix the blocker first.

    line 58
  13. Distinctive:

    Use stable, explicit navigation:

    line 62
  14. Very specific:

    Prefer 127.0.0.1 or the exact host emitted by the dev server when available.

    line 70
  15. Distinctive:

    Before capturing screenshots on asset-heavy pages, ensure the UI is settled:

    line 72
  16. Distinctive:

    wait for app-specific loading indicators to disappear

    line 74
  17. Distinctive:

    wait for text that proves the page rendered

    line 75
  18. Very specific:

    when needed, use agent-browser eval to wait for document.fonts.ready

    line 76
  19. Distinctive:

    Use both structural and visual views:

    line 80
  20. Very specific:

    after every navigation or state-changing click, run agent-browser snapshot -i again

    line 99
  21. Distinctive:

    When you finish, report:

    line 128
  22. Distinctive:

    Prefer targeted route or component checks over wandering manual exploration.

    line 138
  23. Distinctive:

    Prefer deterministic states over whatever the live app happens to show.

    line 139
  24. Distinctive:

    Do not rely on fixed sleeps when a readiness signal or DOM condition is available.

    line 141
  25. Distinctive:

    If visual noise comes from timestamps, ads, rotating banners, or live counters, call that out explicitly and avoid overclaiming.

    line 142
  26. Very specific:

    Stop the PTY session with pty_kill when it is no longer needed.

    line 143
  27. Distinctive:

    If the task requires pixel-diff baselines or CI-grade regression suites, recommend adding dedicated visual regression automation after the …

    line 149

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Website Visual Testing

Use this skill to run a website, open it in agent-browser, and verify the UI visually.

Start Here

  • Use pty_spawn for 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_read before opening the site in the browser.
  • Use agent-browser snapshot -i before 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

NeedRead
Start, monitor, and stop the local site safelyreferences/pty-workflow.md
Drive the browser with stable agent-browser commandsreferences/agent-browser-workflow.md
Run a thorough visual review and avoid flaky checksreferences/visual-qa-checklist.md
Start a common local frontend app quicklyexamples/vite.md, examples/nuxt.md

Workflow

1. Confirm the target

Determine:

  1. whether the user wants a local site, a remote URL, or both
  2. which command starts the site if it is local
  3. 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:

  1. Inspect project scripts or docs to find the narrowest correct start command.
  2. Start the server with pty_spawn using:
    • a clear title
    • the correct workdir
    • notifyOnExit: true when useful
  3. Use pty_read to watch for:
    • localhost URLs
    • ready messages
    • compile errors
  4. 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 -i

Prefer 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 eval to wait for document.fonts.ready

4. Inspect visually before interacting

Use both structural and visual views:

  1. agent-browser snapshot -i to identify actionable refs
  2. agent-browser screenshot --annotate when you need to inspect layout, spacing, icons, overlays, or unlabeled controls
  3. agent-browser get title and agent-browser get url to 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 -i again
  • 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.png

7. 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 @e refs 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_kill when 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.