Skill: netanel-abergel/ai-pa-browser-clawdbot (version 1.0.0)

--- name: ai-pa-browser description: Headless browser automation CLI optimized for AI agents with accessibility tree snapshots and ref-based element selection metadata: {"clawdbot":{"emoji":"🌐","requires":{"commands":["agent-browser"]},"homepage":"https://github.com/vercel-labs/agent-browser"}} --- # Agent Browser Skill Fast browser automation via accessibility tree snapshots and ref-based element selection. ## When to Use **Use agent-browser (this skill) when:** - Automating multi-step web workflows - Need deterministic element selection - Working with complex SPAs or login flows - Need parallel sessions or video recording **Use built-in browser tool when:** - Need screenshots/PDFs for visual analysis - Browser extension integration needed ## Core Workflow ```bash agent-browser open <url> agent-browser snapshot -i --json # Get interactive elements with refs agent-browser click @e2 agent-browser fill @e3 "text" agent-browser wait --load networkidle agent-browser snapshot -i --json # Re-snapshot after navigation ``` ## Most Common Commands ```bash # Navigate agent-browser open <url> | back | forward | reload | close # Snapshot agent-browser snapshot -i --json # Always use these flags agent-browser snapshot -s "#main" -i # Scope to selector # Interact (use @refs from snapshot) agent-browser click @e1 agent-browser fill @e2 "text" agent-browser press Enter agent-browser select @e3 "value" agent-browser scroll down 500 # Wait agent-browser wait --load networkidle agent-browser wait --text "Success" agent-browser wait @e1 # State agent-browser state save auth.json agent-browser state load auth.json ``` ## Installation ```bash npm install -g agent-browser agent-browser install # Download Chromium agent-browser install --with-deps # Linux: + system deps ``` ## Full Reference For complete command list: read `skills/ai-pa-browser-clawdbot/references/commands.md` For examples: read `skills/ai-pa-browser-clawdbot/references/examples.md`

path: _meta.json
content: ownerId: kn7amrtkn0tjk2r2yxf3hjgp0s7zn6g4
slug: ai-pa-browser
version: 0.1.0
publishedAt: 1769032854381

path: references/commands.md
content: # Agent Browser — Full Command Reference

## Navigation
```bash
agent-browser open <url>
agent-browser back | forward | reload | close
```

## Snapshot
```bash
agent-browser snapshot -i --json          # Interactive elements, JSON output
agent-browser snapshot -i -c -d 5 --json  # Compact, depth limit
agent-browser snapshot -s "#main" -i      # Scope to CSS selector
```

## Interactions (Ref-based)
```bash
agent-browser click @e1
agent-browser dblclick @e1
agent-browser fill @e2 "text"       # Clear + type
agent-browser type @e2 "text"       # Type without clearing
agent-browser hover @e3
agent-browser check @e4 | uncheck @e4
agent-browser select @e5 "value"
agent-browser press Enter | "Control+a"
agent-browser scroll down 500
agent-browser drag @e6 @e7
agent-browser upload @e8 file.pdf
agent-browser scrollintoview @e1
```

## Get Information
```bash
agent-browser get text @e1 --json
agent-browser get html @e2 --json
agent-browser get value @e3 --json
agent-browser get attr @e4 "href" --json
agent-browser get title --json
agent-browser get url --json
agent-browser get count ".item" --json
agent-browser get box @e1 --json
```

## Check State
```bash
agent-browser is visible @e1 --json
agent-browser is enabled @e2 --json
agent-browser is checked @e3 --json
```

## Wait
```bash
agent-browser wait @e1                     # Wait for element
agent-browser wait 2000                    # Wait ms
agent-browser wait --text "Success"        # Wait for text
agent-browser wait --url "**/dashboard"    # Wait for URL pattern
agent-browser wait --load networkidle      # Wait for network idle
agent-browser wait --fn "window.ready"     # Wait for JS condition
```

## Sessions (Parallel Browsers)
```bash
agent-browser --session admin open site.com
agent-browser --session user open site.com
agent-browser session list
# Or via env: AGENT_BROWSER_SESSION=admin agent-browser ...
```

## State Persistence
```bash
agent-browser state save auth.json
agent-browser state load auth.json
```

## Screenshots & PDFs
```bash
agent-browser screenshot page.png
agent-browser screenshot --full page.png
agent-browser pdf page.pdf
```

## Video Recording
```bash
agent-browser record start ./demo.webm
agent-browser record stop
agent-browser record restart ./take2.webm
# Tip: Explore first, then record for smooth demos
```

## Mouse Control
```bash
agent-browser mouse move 100 200
agent-browser mouse down left | up left
agent-browser mouse wheel 100
```

## Semantic Locators (alternative to refs)
```bash
agent-browser find role button click --name "Submit"
agent-browser find text "Sign In" click
agent-browser find label "Email" fill "[REDACTED_SECRET]"
agent-browser find first ".item" click
agent-browser find nth 2 "a" text
```

## Browser Settings
```bash
agent-browser set viewport 1920 1080
agent-browser set device "iPhone 14"
agent-browser set geo 37.7749 -122.4194
agent-browser set offline on
agent-browser set headers '{"X-Key":"v"}'
agent-browser set credentials user pass
agent-browser set media dark
```

## Dialogs
```bash
agent-browser dialog accept [text]
agent-browser dialog dismiss
```

## JavaScript
```bash
agent-browser eval "document.title"
```

## Network Control
```bash
agent-browser network route "**/ads/*" --abort
agent-browser network route "**/api/*" --body '{"x":1}'
agent-browser network requests --filter api
agent-browser network unroute [url]
```

## Cookies & Storage
```bash
agent-browser cookies
agent-browser cookies set name value
agent-browser cookies clear
agent-browser storage local key
agent-browser storage local set key val
agent-browser storage local clear
```

## Tabs & Frames
```bash
agent-browser tab | tab new [url] | tab 2 | tab close
agent-browser window new
agent-browser frame "#iframe" | frame main
```

## Debugging
```bash
agent-browser open example.com --headed   # Show browser window
agent-browser console | console --clear
agent-browser errors | errors --clear
agent-browser highlight @e1
agent-browser trace start | trace stop trace.zip
agent-browser --cdp 9222 snapshot
```

## JSON Output
Add `--json` to any command for machine-readable output.

## Options
- `--session <name>` — isolated session
- `--json` — JSON output
- `--full` — full page screenshot
- `--headed` — show browser window
- `--timeout <ms>` — command timeout
- `--cdp <port>` — connect via CDP


path: references/examples.md
content: # Agent Browser — Examples

## Form Submission
```bash
agent-browser open https://example.com/form
agent-browser snapshot -i --json
# Snapshot shows: textbox "Email" [ref=e1], textbox "Password" [ref=e2], button "Submit" [ref=e3]
agent-browser fill @e1 "[REDACTED_SECRET]"
agent-browser fill @e2 "password123"
agent-browser click @e3
agent-browser wait --load networkidle
agent-browser snapshot -i --json
```

## Login with Saved State
```bash
# Login once, save state
agent-browser open https://app.example.com/login
agent-browser snapshot -i --json
agent-browser fill @e1 "username"
agent-browser fill @e2 "password"
agent-browser click @e3
agent-browser wait --url "/dashboard"
agent-browser state save auth.json

# Later sessions: skip login
agent-browser state load auth.json
agent-browser open https://app.example.com/dashboard
```

## Search and Extract
```bash
agent-browser open https://www.google.com
agent-browser snapshot -i --json
agent-browser fill @e1 "AI agents"
agent-browser press Enter
agent-browser wait --load networkidle
agent-browser snapshot -i --json
agent-browser get text @e3 --json
agent-browser get attr @e4 "href" --json
```

## Multi-Session (Admin + User)
```bash
agent-browser --session admin open app.com
agent-browser --session admin state load admin-auth.json
agent-browser --session admin snapshot -i --json

agent-browser --session user open app.com
agent-browser --session user state load user-auth.json
agent-browser --session user snapshot -i --json
```

## Record Demo Video
```bash
# Explore first (don't record yet)
agent-browser open https://app.com
agent-browser state load auth.json
agent-browser open https://app.com/dashboard

# Start recording, perform demo
agent-browser record start ./demo.webm
agent-browser click @e1
agent-browser fill @e2 "demo input"
agent-browser click @e3
agent-browser wait --load networkidle
agent-browser record stop
```

## Snapshot Output Format
```json
{
  "success": true,
  "data": {
    "snapshot": "...",
    "refs": {
      "e1": {"role": "heading", "name": "Example Domain"},
      "e2": {"role": "button", "name": "Submit"},
      "e3": {"role": "textbox", "name": "Email"}
    }
  }
}
```

## Best Practices
1. Always use `-i` flag — focus on interactive elements
2. Always use `--json` — easier to parse
3. Wait for stability — `agent-browser wait --load networkidle`
4. Save auth state — skip login with `state save/load`
5. Use sessions — isolate different browser contexts
6. Use `--headed` for debugging — see what's happening
7. Re-snapshot after every navigation — refs change on page load


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (CRITICAL)