browser-tool
Skill0 starsChanged 7 months agoMIT-0View on GitHub
Browser automation via agent-browser CLI. Navigate, snapshot, click, fill, screenshot, extract content. Use for JS-heavy sites, SPAs, login-required pages, and any task requiring real browser interaction.
- Installs packages
In this repository34 other files it gives its agents.
- autoresearchSkill
- claude-codeSkill
- code-search-toolSkill
- codex-cliSkill
- coding-agentSkill
- docxSkill
- electronSkill
- exec-toolSkill
- gemini-cliSkill
- geminiSkill
- githubSkill
- git-toolSkill
- gwsSkill
- healthcheckSkill
- himalayaSkill
- notionSkill
- obsidianSkill
- outlookSkill
- outlook-webSkill
- pdfSkill
- pptxSkill
- quipSkill
- Research AssistantSkill
- sherpa-onnx-ttsSkill
- Skill CreatorSkill
- sonosSkill
- spotify-playerSkill
- spotifySkill
- tmuxSkill
- video-framesSkill
- voice-callSkill
- weatherSkill
- web-fetch-toolSkill
- xlsxSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
When web_fetch returns mostly empty HTML with <script> tags
- Distinctive: line 32
Every browser automation follows this pattern:
- Distinctive: line 36
Interact: Use refs to click, fill, select
- Distinctive: line 37
Re-snapshot: After navigation or DOM changes, get fresh refs
- Very specific: line 59
When to chain: Use && when you don't need to read the output of an intermediate command.
- Distinctive: line 195
Always close sessions when done to avoid leaked Chrome processes:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Browser Automation with agent-browser
The CLI uses Chrome/Chromium via CDP directly. Install via npm i -g agent-browser or brew install agent-browser.
Provided Tools
browser- agent-browser CLI. Supports snapshot refs (@e1, @e2) for fast element selection. Use for JS-heavy sites, SPAs, login-required pages.browser_extension- Chrome extension-based browser control (uses real browser with logins). Preferred for authenticated access.
When to use browser (instead of web_fetch)
- JS-heavy sites (SPAs, React/Next.js/Astro apps that render client-side)
- Pages behind login or authentication
- Sites that need JavaScript to load content (pricing tables, dynamic data)
- When web_fetch returns mostly empty HTML with
<script>tags
When to use web_fetch (instead of browser)
- Static pages, REST APIs, documentation with server-rendered content
- RSS feeds, JSON endpoints
- Simple HTML pages that don't need JavaScript
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 resultCommand Chaining
Commands can be chained with && in a single shell invocation. The browser persists between commands via a background daemon.
agent-browser open https://example.com && agent-browser wait --load networkidle && agent-browser snapshot -iWhen to chain: Use && when you don't need to read the output of an intermediate command. Run commands separately when you need to parse the output first (e.g., snapshot to discover refs, then interact).
Essential Commands
# Navigation
agent-browser open <url> # Navigate
agent-browser close # Close browser
agent-browser close --all # Close all active sessions
# Snapshot
agent-browser snapshot -i # Interactive elements with refs (recommended)
agent-browser snapshot -s "#selector" # Scope to CSS selector
# Interaction (use @refs from snapshot)
agent-browser click @e1 # Click element
agent-browser fill @e2 "text" # Clear and type text
agent-browser type @e2 "text" # Type without clearing
agent-browser select @e1 "option" # Select dropdown option
agent-browser check @e1 # Check checkbox
agent-browser press Enter # Press key
agent-browser scroll down 500 # Scroll page
# Get information
agent-browser get text @e1 # Get element text
agent-browser get url # Get current URL
agent-browser get title # Get page title
# Wait
agent-browser wait @e1 # Wait for element
agent-browser wait --load networkidle # Wait for network idle
agent-browser wait --url "**/page" # Wait for URL pattern
agent-browser wait 2000 # Wait milliseconds
agent-browser wait --text "Welcome" # Wait for text to appear
# Capture
agent-browser screenshot # Screenshot to temp dir
agent-browser screenshot --full # Full page screenshot
agent-browser screenshot --annotate # Annotated with numbered element labels
agent-browser pdf output.pdf # Save as PDF
# Downloads
agent-browser download @e1 ./file.pdf # Click to trigger download
# Network
agent-browser network requests # Inspect tracked requests
agent-browser network requests --type xhr,fetch # Filter by type
# Viewport
agent-browser set viewport 1920 1080 # Set viewport size
agent-browser set device "iPhone 14" # Emulate deviceHandling Authentication
Option 1: Import auth from user's browser (fastest)
agent-browser --auto-connect state save ./auth.json
agent-browser --state ./auth.json open https://app.example.com/dashboardOption 2: Persistent profile (recurring tasks)
agent-browser --profile ~/.myapp open https://app.example.com/login
# ... login flow ... all future runs are authenticatedOption 3: Session name (auto-save/restore)
agent-browser --session-name myapp open https://app.example.com/login
# ... login flow ...
agent-browser close # State auto-saved
# Next time: state auto-restored
agent-browser --session-name myapp open https://app.example.com/dashboardOption 4: Auth vault (encrypted credentials)
echo "$PASSWORD" | agent-browser auth save myapp --url https://app.example.com/login --username user --password-stdin
agent-browser auth login myappCommon Patterns
Form Submission
agent-browser open https://example.com/signup
agent-browser snapshot -i
agent-browser fill @e1 "Jane Doe"
agent-browser fill @e2 "jane@example.com"
agent-browser select @e3 "California"
agent-browser click @e5
agent-browser wait --load networkidleWorking with Iframes
Iframe content is automatically inlined in snapshots. Refs inside iframes carry frame context, so interact directly.
Data Extraction
agent-browser open https://example.com/products
agent-browser snapshot -i
agent-browser get text @e5
agent-browser get text body > page.txtParallel Sessions
agent-browser --session site1 open https://site-a.com
agent-browser --session site2 open https://site-b.com
agent-browser session listVisual Debugging
agent-browser --headed open https://example.com
agent-browser highlight @e1
agent-browser inspect # Open Chrome DevToolsRef Lifecycle (Important)
Refs (@e1, @e2, etc.) are invalidated when the page changes. Always re-snapshot after:
- Clicking links or buttons that navigate
- Form submissions
- Dynamic content loading (dropdowns, modals)
Diffing (Verifying Changes)
agent-browser snapshot -i # Take baseline
agent-browser click @e2 # Perform action
agent-browser diff snapshot # See what changedSession Cleanup
Always close sessions when done to avoid leaked Chrome processes:
agent-browser close # Close default session
agent-browser close --all # Close all sessionsSecurity
--content-boundarieswraps output in markers for LLM safetyAGENT_BROWSER_ALLOWED_DOMAINSrestricts navigationAGENT_BROWSER_MAX_OUTPUTprevents context floodingAGENT_BROWSER_ACTION_POLICYgates destructive actions
References
- references/commands.md -- Full command reference
- references/snapshot-refs.md -- Ref lifecycle
- references/session-management.md -- Parallel sessions
- references/authentication.md -- Login flows
- references/video-recording.md -- Recording
- references/profiling.md -- DevTools profiling
- references/proxy-support.md -- Proxy config
Templates
- templates/form-automation.sh -- Form filling
- templates/authenticated-session.sh -- Login + reuse state
- templates/capture-workflow.sh -- Content extraction
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

