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-code

Installs into .claude/skills of the current project.

Files

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
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

More from shanraisshan/claude-code-best-practice

All 6
1levnikolaevich avatarln-402-task-reviewerlevnikolaevich/claude-code-skillsReviews task implementation for quality, code standards, and test coverage. Use when task is in To Review. Sets task Done or To Rework.378skills.sh installs
2vercel-labs avatargooglevercel-labs/emulateEmulated Google OAuth 2.0, OpenID Connect, Gmail, Calendar, and Drive for local development and testing. Use when the user needs to test Google sign-in locally,369skills.sh installs
3randroids-dojo avatargodotrandroids-dojo/skillsDevelop, test, build, and deploy Godot 4.x games. Use when working with Godot Engine, GDScript, GdUnit4 testing, PlayGodot automation, or exporting games to web365skills.sh installs
4hummingbot avatarhummingbot-developerhummingbot/skillsDeveloper skill for running Hummingbot and Gateway from source, building wheel and Docker images, and testing against Hummingbot API running from source. Use th363skills.sh installs
5manojbajaj95 avatarconversion-rate-optimizationmanojbajaj95/claude-gtm-pluginConversion rate optimization for marketing pages and lead-capture forms. Use when the user wants to improve conversions on a homepage, landing page, pricing pag355skills.sh installs
6patricio0312rev avatarvisual-regression-testerpatricio0312rev/skillsImplements visual regression testing with screenshot comparison, diff detection, and CI integration using Playwright or Chromatic. Use when users request "visua346skills.sh installs