agent-browser

Automates browser interactions for visual QA using accessibility snapshots and ref-based element targeting.

Updated Jul 28, 2026
One-click install
npx skills add https://github.com/christian-byrne/comfy-skills --skill agent-browser-christian-byrne
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: agent-browser
Source: https://github.com/christian-byrne/comfy-skills/tree/main/skills/agent-browser
Command: npx skills add https://github.com/christian-byrne/comfy-skills --skill agent-browser-christian-byrne

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires agent-browser.

What problem does it solve? Verifying UI changes on a running dev server manually is slow and error-prone, and full browser automation frameworks like Playwright MCP dump entire DOM trees that consume excessive context tokens. This Skill provides lightweight browser automation through Vercel's agent-browser CLI, using compact accessibility tree snapshots with element refs to cut token usage by roughly 90%. ## Core Features & Use Cases - Compact Snapshots: Capture interactive elements as short refs (@e1, @e2) instead of full DOM dumps, keeping context small. - Ref-Based Interaction: Click, fill, hover, and select elements by ref, then re-snapshot to verify state changes. - Visual & Console Verification: Capture screenshots for PR evidence and inspect console output for JS errors and Vue warnings. - Parallel Sessions: Run named sessions to compare default and modified states side by side. - Use Case: After changing a button component, open the dev server, snapshot the page, click the button via its ref, screenshot the result, and check the console for errors — all before manual QA. ## Quick Start Use agent-browser to open http://localhost:5173, take an interactive snapshot, click the main button, and capture a screenshot of the result.

Frequently Asked Questions about agent-browser

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate browser testing with agent-browser?▼

Install agent-browser globally via npm, run agent-browser install to download Chromium, then open your dev server URL with agent-browser open. Use snapshot -i to get element refs, interact via click or fill commands, and capture screenshots to verify results.

What is the difference between agent-browser and Playwright?▼

agent-browser uses compact accessibility tree snapshots with element refs, consuming roughly 90% fewer tokens than Playwright MCP's full DOM dumps. Playwright is better for full E2E suites with parallel browsers and complex assertions; agent-browser suits quick visual QA on dev servers.

Can agent-browser run multiple browser sessions in parallel?▼

Yes, agent-browser supports named sessions via the --session flag. You can open the same URL in separate sessions, interact with each independently, and capture screenshots for side-by-side comparison of different application states.

When should I not use agent-browser for testing?▼

Avoid agent-browser for unit or integration tests (use Vitest), full E2E suites (use Playwright directly), complex network mocking, and production debugging. It is designed specifically for lightweight checks against local dev servers.

Why do element refs stop working after a page interaction?▼

Refs change whenever the page updates, so refs captured before a click or navigation become stale. Re-run agent-browser snapshot -i after each interaction to get fresh refs for the current page state.