claudegoodies
Skill

agent-browser

From slopus

Browser automation CLI for AI agents. Use this when asked to test something in a real browser.

Drives a persistent browser via agent-browser CLI: navigate, snapshot elements as refs, click/fill/select, screenshot, diff pages.

Use it when

  • Testing web forms or login flows end-to-end in a real browser
  • Extracting text or comparing page/screenshot states across runs
  • Automating multi-step UI interactions using element refs from snapshots
  • Saving/reloading auth state to skip repeated logins

Skip it if

  • Requires the agent-browser CLI (npx) installed and a background daemon running
  • Only works via shell/Bash tool calls, not a native API or library
  • Refs invalidate on navigation, requiring re-snapshot discipline

Facts

Repository
slopus/happy
Status
Actively maintained
Last commit
Declared tools
Bash(npx agent-browser:*), Bash(agent-browser:*)

Source preview

The instructions Claude Code reads when this skill runs.

# Browser Automation with agent-browser

## Core Workflow

Every browser automation follows this pattern:

1. **Navigate**: `agent-browser open <url>`
2. **Snapshot**: `agent-browser snapshot -i` (get element refs like `@e1`, `@e2`)
3. **Interact**: Use refs to click, fill, select
4. **Re-snapshot**: After navigation or DOM changes, get fresh refs

```bash
agent-browser open https://example.com/form
agent-browser snapshot -i
# Output: @e1 [input type="email"], @e2 [input type="password"], @e3 [button] "Submit"

agent-browser fill @e1 "[email protected]"
agent-browser fill @e2 "password123"
agent-browser click @e3
agent-browser wait --load networkidle
agent-browser snapshot -i  # Check result
```

## Command Chaining

Commands can be chained with `&&` in a single shell invocation. The browser persists between commands via a background daemon, so chaining is safe and more efficient than separate calls.

```bash
# Chain open + wait + snapshot in one call
agent-browser open https://example.com && agent-browser wait --load networkidle && agent-browser snapshot -i

# Chain multiple interactions
agent-browser fill @e1 "[email protected]" && agent-browser fill @e2 "password123" && agent-browser click @e3

# Navigate and capture
agent-browser open https://example.com && agent-browser wait --load networkidle && agent-browser screenshot page.png
```

**When to chain:** Use `&&` when you don
View full source on GitHub →

Other skills