
Agent Browser
This is a proper browser automation CLI designed for AI agents to interact with websites. It uses a snapshot and reference workflow where you navigate to a page, grab snapshots that assign refs like @e1 and @e2 to interactive elements, then use those refs to click, fill forms, and extract data. The refs invalidate when the page changes, so you snapshot again after navigation. It handles the usual automation tasks like login flows with state persistence, parallel sessions, screenshots, and even iOS simulator testing. The workflow is clean and the ref system makes it easy for an agent to target elements without brittle selectors, though you need to remember to re-snapshot after DOM changes or you'll be working with stale references.
- skills.sh installs
- 379
- GitHub stars
- 68.9K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add shanraisshan/claude-code-best-practice --skill agent-browser --agent claude-codeInstalls into .claude/skills of the current project.
Files
Browser Automation with agent-browser
Core Workflow
Every browser automation follows this pattern:
- Navigate:
agent-browser open <url> - Snapshot:
agent-browser snapshot -i(get element refs like@e1,@e2) - Interact: Use refs to click, fill, select
- Re-snapshot: After navigation or DOM changes, get fresh refs
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 "user@example.com"
agent-browser fill @e2 "password123"
agent-browser click @e3
agent-browser wait --load networkidle
agent-browser snapshot -i # Check result
Essential Commands
# Navigation
agent-browser open <url> # Navigate (aliases: goto, navigate)
agent-browser close # Close browser
# Snapshot
agent-browser snapshot -i # Interactive elements with refs (recommended)
agent-browser snapshot -i -C # Include cursor-interactive elements (divs with onclick, cursor:pointer)
agent-browser snapshot -s "#selector" # Scope to CSS selector
Sponsors
Details
- Repository
- github.com/shanraisshan/claude-code-best-practice
- Categories
- Testing & QA, Code Review & Quality, AI & Agent Building, Automation & Workflows, Design & UI/UX, CLI & Terminal
- License
- MIT
- First seen
- Jun 3, 2026