mgiovani/cc-arsenal/skills/agent-browser/SKILL.md
agent-browser
Headless browser automation CLI optimized for AI agents: drives a real browser via accessibility-tree snapshots and @e1-style refs for ~93% less context than raw DOM tools. Use whenever a task needs to interact with a live web page: click, fill forms, log in, extract text or data, take screenshots, test a running web app, or scrape a site. Triggers on 'automate the browser', 'fill this form', 'click the button', 'take a screenshot of the page', 'log into', 'scrape this site', 'test my web app',
- Source repository stars
- 6
- Declared platforms
- 0
- Static risk flags
- 2
- Last source update
- 2026-08-04
- Source checked
- 2026-08-04
Decision brief
What it does—and where it fits
Headless browser automation CLI optimized for AI agents: drives a real browser via accessibility-tree snapshots and @e1-style refs for ~93% less context than raw DOM tools. Use whenever a task needs to interact with a live web page: click, fill forms, log in, extract text or data, take screenshots, test a running web app, or scrape a site.
Not for
- Tasks that require unconfirmed production actions or broad system permissions.
- Environments where the pinned source and install steps cannot be inspected.
Compatibility matrix
Platform support, with evidence labels
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
Inspect first. Install second.
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/mgiovani/cc-arsenal --skill "skills/agent-browser"Inspect the Agent Skill "agent-browser" from https://github.com/mgiovani/cc-arsenal/blob/410f2649860bb1892ee8c66721f57462eeefcf13/skills/agent-browser/SKILL.md at commit 410f2649860bb1892ee8c66721f57462eeefcf13. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
What the source asks the agent to do
- 01
Quick Start
Review the “Quick Start” section in the pinned source before continuing.
Review and apply the “Quick Start” source section. - 02
Basic Workflow
Review the “Basic Workflow” section in the pinned source before continuing.
Review and apply the “Basic Workflow” source section. - 03
Installation
Review the “Installation” section in the pinned source before continuing.
Review and apply the “Installation” source section. - 04
macOS (preferred — managed by Homebrew)
brew install agent-browser
brew install agent-browser - 05
Linux / fallback
Review the “Linux / fallback” section in the pinned source before continuing.
Review and apply the “Linux / fallback” source section.
Permission review
Static risk signals and limitations
Runs scripts
The documentation asks the agent to run terminal commands or scripts.
npm install -g agent-browserNetwork access
The documentation includes network, browsing, or remote request actions.
agent-browser open https://example.comNetwork access
The documentation includes network, browsing, or remote request actions.
agent-browser --session "$(basename "$PWD")" open https://app.comRuns scripts
The documentation asks the agent to run terminal commands or scripts.
python3 -m http.server 3111 --directory ./dist & # note the PIDEvidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 89/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 6 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Provenance and original SKILL.md
- Repository
- mgiovani/cc-arsenal
- Skill path
- skills/agent-browser/SKILL.md
- Commit
- 410f2649860bb1892ee8c66721f57462eeefcf13
- License
- MIT
- Collected
- 2026-08-04
- Default branch
- main
View the original SKILL.md
agent-browser
Overview
agent-browser is an open-source browser automation CLI from Vercel Labs, built for LLM interaction with a snapshot + refs system: instead of a full DOM, snapshot returns an accessibility tree of just the interactive elements (buttons, inputs, links) with semantic labels, each tagged with a stable @e1-style ref. Full DOM dumps run 5000+ nodes / 200KB of context; an accessibility-tree snapshot is 50-100 elements / ~10KB, roughly a 93% reduction. Refs also survive re-renders, so they don't need re-deriving after every DOM tweak the way CSS selectors do.
See When to Use vs Playwright for when this CLI beats DOM-based tools.
Installation
# macOS (preferred — managed by Homebrew)
brew install agent-browser
# Linux / fallback
npm install -g agent-browser
# Install browser binaries after either method
agent-browser install
# Linux: also install system dependencies
agent-browser install --with-deps
# Verify health
agent-browser doctor
Quick Start
Basic Workflow
# 1. Navigate to a page
agent-browser open https://example.com
# 2. Get snapshot with refs
agent-browser snapshot -i
# Output shows:
# textbox "Email" [ref=e1]
# textbox "Password" [ref=e2]
# button "Submit" [ref=e3]
# 3. Interact using refs
agent-browser fill @e1 "[email protected]"
agent-browser fill @e2 "password123"
agent-browser click @e3
# 4. Wait and verify
agent-browser wait --load networkidle
agent-browser snapshot -i
Refs are invalidated whenever the page changes (navigation, dropdown opening,
DOM re-render). Re-run snapshot -i after any action that could change the
page before reusing a ref: an ref from before the action may now point at a
different element or nothing at all.
Session Management
Always pass --session: one named session per project prevents stale
daemons from accumulating across parallel agent sessions.
# Use project name as session (run this pattern everywhere)
agent-browser --session "$(basename "$PWD")" open https://app.com
# Authenticated flows: add persistent profile (gitignored)
agent-browser --session "$(basename "$PWD")" --profile .claude/browser-profile open https://app.com/login
# Stateless scraping/extraction: use Lightpanda instead (10x less memory)
agent-browser --session "$(basename "$PWD")" --engine lightpanda open https://public-site.com
# List all active sessions
agent-browser session list
# Diagnose + clean stale sockets (run when things feel wrong)
agent-browser doctor --fix
# Close this project's session only (never use --all with parallel projects)
agent-browser close --session "$(basename "$PWD")"
Engine Choice
| Task | Engine | Why |
|---|---|---|
| Testing your own app, screenshots, React/SPA | chrome (default) | Full rendering, CDP, JS |
| Authenticated flows needing saved login | chrome + --profile | Persistent storage state |
| Bulk scraping / data extraction from public pages | lightpanda | 10x less memory, 10x faster |
Paginated crawls, get text at scale | lightpanda | Ephemeral, no cache buildup |
| Extensions, headed mode, file access | chrome (required) | Lightpanda can't do these |
Rule: if it only reads public pages and needs no login or screenshot → Lightpanda. Otherwise Chrome.
Command Cheat Sheet
agent-browser --session "$(basename "$PWD")" open <url> # navigate
agent-browser snapshot -i # get @refs
agent-browser click @e1 # click
agent-browser fill @e2 "text" # fill a field
agent-browser wait --load networkidle # wait for load
agent-browser get text @e3 # read element
agent-browser is visible @e1 # verify state
agent-browser screenshot page.png # capture
agent-browser close --session "$(basename "$PWD")" # cleanup
Full command surface (navigation, all interactions, find semantic
locators, waits, screenshots/video, tabs, network, cookies, auth, MCP server,
global flags) lives in references/commands.md.
Verify Before You Claim
Browser automation's core failure mode is confidently reporting page state nobody actually read. Before writing any claim into your final report:
- Every claimed value traces to a command. A total, a heading, a success
banner: read it with
get text/get value(or asnapshotthat covers it) and quote the exact string returned. Never restate a value from the test plan or a product label as if it were observed on the page. snapshot -ihides non-interactive content. Totals, prices, and confirmation banners often live in a<span>/<div>, not a button or input:-iwon't surface them. Use plainsnapshotorget text <selector>to reach them.- A screenshot filename is a claim. Confirm you're on the expected page
(
get urlor a snapshot heading) immediately before callingscreenshot, and name the file after what you just confirmed, not what you set out to capture. - Own every process you start. If the task needs a local server to test against, announce it when you start it (command, port, PID) and stop it before finishing: state the kill explicitly. "Closed the browser session" is not the same claim as "shut down the app."
Worked Examples
Login and verify
agent-browser --session myapp open https://app.example.com/login
agent-browser snapshot -i
agent-browser fill @e1 "[email protected]"
agent-browser fill @e2 "password123"
agent-browser click @e3
agent-browser wait --load networkidle
agent-browser get url # confirm redirected off /login
agent-browser close --session myapp
Scrape a public listing (stateless)
agent-browser --session catalog --engine lightpanda open https://shop.example.com/catalog
agent-browser get count ".product-card"
agent-browser snapshot -i -s ".product-card"
agent-browser close --session catalog
Verify state before asserting success
agent-browser --session checkout open http://localhost:3000/cart
agent-browser snapshot -i
agent-browser click @e4 # Add to cart
agent-browser get text .cart-total # read the total — e.g. "$9.99" — don't assume it changed
agent-browser click @e9 # Checkout
agent-browser wait --url "**/confirmation"
agent-browser get text @e2 # read the confirmation heading
agent-browser close --session checkout
Report only the strings those two get text calls actually returned, not
a number copied from the test plan.
Test an app you started locally
python3 -m http.server 3111 --directory ./dist & # note the PID
echo "started static server on :3111, pid $!"
agent-browser --session localtest open http://localhost:3111
agent-browser snapshot -i
agent-browser get url # confirm you're on the expected page first
agent-browser screenshot cart-page.png # name matches what get url just confirmed
agent-browser close --session localtest
kill %1 # stop the server you started, before declaring done
echo "stopped server on :3111"
When to Use vs Playwright
| Need | Use | Why |
|---|---|---|
| AI agent driving a browser, CLI-first, minimal tokens | agent-browser | ~93% less context via accessibility-tree snapshots, zero config, @e1 refs survive DOM changes |
| Multiple isolated sessions in parallel | agent-browser | Built-in --session isolation |
| Full JS API, service workers, device emulation, CDP internals | Playwright (direct) | agent-browser doesn't expose the full programmatic API |
| Reusing an existing Playwright test suite | Playwright (direct) | Don't rewrite working tests to switch tools |
| Interacting with the user's already-open, logged-in Chrome tab | claude-in-chrome | agent-browser drives its own separate browser instance, not the user's live session |
Reference File Guide
Detailed reference material lives in bundled files, loaded on-demand, and is
regenerated from the CLI's own agent-browser skills get core --full so it
stays in sync with the installed version. Load each only when the task
needs it:
- references/commands.md: load when you need a command signature, flag, or alias not covered by the cheat sheet above (navigation, interaction,
find, wait, screenshot/video, settings, tabs, frames, network/console, MCP server, global flags). - references/advanced.md: load for session-state persistence, authentication (login flows, OAuth, 2FA, cookie import), trust-boundary safety rules, proxy configuration, or Chrome DevTools profiling.
- references/workflows.md: load for the snapshot + ref model in depth, or video-recording patterns.
If these ever drift from the installed CLI, regenerate with
agent-browser skills get core --full and re-split (see git history of this
file for the split points).
Resources
Official Documentation
- GitHub: https://github.com/vercel-labs/agent-browser
- AGENTS.md: AI agent integration guide, bundled with the CLI
- CLI source:
npx opensrc vercel-labs/agent-browser(fetches the actual source for reference: there is no vendored copy in this skill)
Environment Variables
AGENT_BROWSER_IDLE_TIMEOUT_MS # Auto-close daemon after N ms idle (set 300000 in dotfiles)
AGENT_BROWSER_SESSION # Default session name (set per-project in your agent config file)
AGENT_BROWSER_ENGINE # Default engine: chrome | lightpanda
AGENT_BROWSER_EXECUTABLE_PATH # Custom browser binary path
AGENT_BROWSER_EXTENSIONS # Comma-separated extension paths
AGENT_BROWSER_PROVIDER # Cloud provider (browseruse, browserbase, browserless)
AGENT_BROWSER_ENCRYPTION_KEY # AES-256-GCM key for session state files (64-char hex)
AGENT_BROWSER_STREAM_PORT # WebSocket port for streaming
AGENT_BROWSER_HOME # Installation directory
Operational Rules
- Always pass
--session <project-name>: prevents stale-socket accumulation across parallel sessions (can cause daemon OOM) - Never run
agent-browser close --allor kill the browser process globally: breaks other projects' parallel sessions - Persistent profile directories (e.g.
.claude/browser-profile/) must be in.gitignore: they contain plaintext cookies and login tokens - Omit
--profilefor stateless work: persistent profiles accumulate browser cache; idle-timeout only reclaims RAM, not disk cache - Run
agent-browser doctor --fixwhen sessions feel stuck: cleans stale sockets without killing active sessions - A test-target server you started is your process to stop:
agent-browser closeonly tears down the browser session, not an app server; kill it explicitly and say so (see Verify Before You Claim) - For the authoritative, version-matched command reference:
agent-browser skills get core --full
Alternatives
Compare before choosing
shanraisshan/claude-code-best-practice
agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.
nexu-io/open-design
agent-browser
Browser automation CLI for AI agents. Use when the user needs to inspect, test, or automate browser behavior: navigating pages, filling forms, clicking buttons, taking screenshots, extracting page data, reading selected Open Design browser-tab context, testing web apps, dogfooding Open Design previews, QA, bug hunts, or reviewing app quality. Prefer local Open Design preview URLs unless the user explicitly asks for external browsing.
AI-Unified-Process/marketplace
browserless-test
Creates Vaadin Browserless server-side unit tests for Vaadin views covering navigation, component interactions, form validation, grid operations, and notifications. Use when the user asks to "write Browserless tests", "write Vaadin UI unit tests", "unit test a Vaadin view without a browser", "create view tests with the official Vaadin testing framework", or mentions Browserless testing, SpringBrowserlessTest, browserless-test-junit6, UI Unit Testing, or server-side Vaadin testing.
mgiovani/cc-arsenal
team-review
Multi-agent review team: architecture, security, performance, testing, style, docs/UX, plus an adversary that cross-examines the other 6, for security-sensitive, architectural, or large PRs (15+ files) where a single-agent pass risks missing cross-cutting issues. Use for auth/payments/PII changes, schema/pattern changes, compliance sign-off, or when asked to 'get the review team on this' / 'multi-agent review' / 'thorough review before merge'. For a standard PR or a quick pre-merge check, use /r