browser-automation
Original:🇺🇸 English
Not Translated
Headless browser automation using Vercel's agent-browser CLI. 93% less context than Playwright MCP. Snapshot + refs workflow with element references. Use when automating browser tasks, web scraping, form filling, or content capture.
3installs
Added on
NPX Install
npx skill4agent add yonatangross/skillforge-claude-plugin browser-automationSKILL.md Content
Browser Automation with agent-browser
Headless browser CLI by Vercel. Full upstream docs: github.com/vercel-labs/agent-browser
Installation
bash
npm install -g agent-browser
agent-browser install # Download Chromium
agent-browser install --with-deps # With system dependencies (Linux)
# Optional: npx skills add vercel-labs/agent-browserQuick Start
bash
agent-browser open <url> # Navigate to page
agent-browser snapshot -i # Get interactive elements with refs
agent-browser click @e1 # Click element by ref
agent-browser fill @e2 "text" # Fill input by ref
agent-browser close # Close browserCore Concept: Snapshot + Refs
Run to get interactive elements tagged , , etc. Use these refs for all subsequent interactions. Re-snapshot after navigation or significant DOM changes. This yields 93% less context than full-DOM approaches.
agent-browser snapshot -i@e1@e2When to Use
- Web scraping from JS-rendered / SPA pages
- Form automation and multi-step workflows
- Screenshot capture and visual verification
- E2E test generation and debugging
- Content capture from authenticated pages
Key Commands
| Command | Purpose |
|---|---|
| Navigate to URL |
| Interactive elements with refs |
| Click element |
| Clear + type into input |
| Extract element text |
| Wait for SPA render |
| Save screenshot |
| Persist cookies/storage |
| Restore session |
| Run JavaScript |
| Start video recording |
| Stop recording |
| Isolate parallel sessions |
| Show browser window |
Run for the full 60+ command reference.
agent-browser --helpOrchestKit Integration
Safety hook — blocks destructive patterns (credential exfil, recursive spawning) automatically via pretool hook.
agent-browser-safety.tsSessions — Use to run isolated parallel browsers within a single Claude Code session.
--session <name>Environment variables:
bash
AGENT_BROWSER_SESSION="my-session" # Default session name
AGENT_BROWSER_PROFILE="/path" # Persistent browser profile
AGENT_BROWSER_PROVIDER="browserbase" # Cloud provider (browserbase | kernel | browseruse)
AGENT_BROWSER_HEADED=1 # Run headedUpstream Documentation
- GitHub: vercel-labs/agent-browser
- CLI help:
agent-browser --help - Skills add:
npx skills add vercel-labs/agent-browser
Related Skills
- — Content extraction patterns using agent-browser
browser-content-capture - — E2E testing with Playwright test framework
webapp-testing - — End-to-end testing patterns
e2e-testing