| name | agent-browser |
| description | Browser automation skill using the agent-browser CLI for EXTERNAL WEBSITES via Chrome/CDP. Use this skill when the user asks you to interact with websites, fill forms, scrape pages, take screenshots, or test web apps in Chrome. Trigger on phrases like "open this URL", "click the button", "fill the form", "screenshot the page", "scrape the site", "test the login flow", or "browse to". ⚠️ NOT for Clawfirm app UI — use browser-agent (clawfirm-test skill) for that. ⚠️ NOT the same as browser-agent — these are two completely different tools. |
agent-browser
⚠️ This skill is for external websites via Chrome/CDP.
To automate the Clawfirm app UI (WKWebView), use browser-agent instead — see the clawfirm-test skill.
agent-browser ≠ browser-agent: different binaries, different protocols, different targets.
A browser automation skill powered by the agent-browser CLI. It controls Chrome/Chromium via CDP and uses compact element refs for fast, token-efficient interactions.
Prerequisites
Install agent-browser if not already available:
npm install -g agent-browser && agent-browser install
Or via Homebrew: brew install agent-browser
Core Workflow
Every browser automation follows this pattern:
- Open a URL:
agent-browser open <url>
- Snapshot interactive elements:
agent-browser snapshot -i
- Interact using refs from the snapshot:
agent-browser click @e1, agent-browser fill @e2 "text"
- Re-snapshot after any page change to get fresh refs
Commands persist via a background daemon — chain them with && in a single bash call or run them sequentially.
Quick Examples
Navigate and extract text
agent-browser open https://example.com
agent-browser snapshot -i
agent-browser get text @e1
Fill a form
agent-browser open https://example.com/login
agent-browser snapshot -i
agent-browser fill @e3 "user@example.com"
agent-browser fill @e4 "password123"
agent-browser click @e5
agent-browser wait --load networkidle
agent-browser snapshot -i
Take a screenshot
agent-browser open https://example.com
agent-browser wait --load networkidle
agent-browser screenshot ./capture.png
agent-browser screenshot --full ./full-page.png
Scrape data
agent-browser open https://example.com
agent-browser snapshot -i
agent-browser get text body
Key Commands
| Command | Description |
|---|
open <url> | Navigate to URL |
snapshot -i | Get interactive elements with @refs |
click @ref | Click an element |
fill @ref "text" | Clear field and type text |
type @ref "text" | Type without clearing |
select @ref "value" | Select dropdown option |
check @ref / uncheck @ref | Toggle checkbox |
press Enter | Press a key |
scroll down 500 | Scroll the page |
get text @ref | Get element text |
get url | Get current URL |
get title | Get page title |
screenshot [path] | Capture screenshot |
wait @ref | Wait for element |
wait --load networkidle | Wait for network idle |
wait --text "Success" | Wait for text to appear |
close | Close browser session |
Important Rules
- Always snapshot before interacting — refs don't exist until you snapshot
- Re-snapshot after navigation — refs are invalidated when the page changes
- Re-snapshot after dynamic changes — clicking a button that opens a dropdown requires a new snapshot to see the new elements
- Use
wait for slow pages — wait --load networkidle before snapshot on heavy pages
- Close sessions when done —
agent-browser close to prevent leaked processes
References
For the full command reference, read references/commands.md.
For snapshot/ref details, read references/snapshot-refs.md.
For authentication patterns, read references/authentication.md.
For session management, read references/session-management.md.