eddie-292/grapwork/agent-browser
Claude Code and agent skill by eddie-292/grapwork
- community
Checking that the SKILL.md file is still in the repository.
Browser automation for AI agents. Triggers on requests to open websites, fill forms, click buttons, take screenshots, scrape data, test web apps, login to sites, or automate browser tasks.
Install
npx vskill@latest install eddie-292/grapwork/agent-browserSKILL.md
Browser Automation with agent-browser
First-Time Setup (Important!)
Before using agent-browser for the first time, you MUST install the CLI tool and browser binary:
You only need to do this once.
Session Requirement (Critical!)
Always specify a session name when using agent-browser. Without it, you may encounter the error:
"Browser not launched. Call launch first."
There are two ways to specify a session:
- Environment variable (recommended for chained commands):
- Command-line flag:
The session name can be any string (e.g., taobao, google, test1). Using consistent session names allows you to maintain browser state across multiple commands.
Browser Mode
Mode Selection Rules:
- Virtual Machine / Remote Server: Use
--headlessmode (no display available) - Local Machine (Default): Use
--headedmode (visible browser window for better debugging) - User Request: Follow user's explicit preference (headless/无头模式 or headed/有头模式)
How to detect environment:
- Check
<env>section in system context for platform info - VM indicators: Linux without display, SSH session, Docker container, cloud server
- If uncertain, try
--headedfirst; if it fails with display error, fallback to--headless
Options:
--headed: Visible browser window (default for local machines)--headless: Invisible browser (default for VMs/servers, or when user requests)
Core Workflow
Every browser automation follows this pattern:
- Setup session:
export AGENT_BROWSER_SESSION=mysite - Navigate:
agent-browser --headed 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
Essential Commands
Note: All commands below assume you have set AGENT_BROWSER_SESSION or use --session <name>.
Common Patterns
Form Submission
Authentication with State Persistence
Data Extraction
Parallel Sessions
Headless Mode (Only When Requested)
Debugging Tools
iOS Simulator (Mobile Safari)
Requirements: macOS with Xcode, Appium (npm install -g appium && appium driver install xcuitest)
Real devices: Works with physical iOS devices if pre-configured. Use --device "<UDID>" where UDID is from xcrun xctrace list devices.
Ref 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)
Semantic Locators (Alternative to Refs)
When refs are unavailable or unreliable, use semantic locators:
Deep-Dive Documentation
| Reference | When to Use | |
|---|---|---|
| references/commands.md | Full command reference with all options | |
| references/snapshot-refs.md | Ref lifecycle, invalidation rules, troubleshooting | |
| references/session-management.md | Parallel sessions, state persistence, concurrent scraping | |
| references/authentication.md | Login flows, OAuth, 2FA handling, state reuse | |
| references/video-recording.md | Recording workflows for debugging and documentation | |
| references/proxy-support.md | Proxy configuration, geo-testing, rotating proxies |
Ready-to-Use Templates
| Template | Description | |
|---|---|---|
| templates/form-automation.sh | Form filling with validation | |
| templates/authenticated-session.sh | Login once, reuse state | |
| templates/capture-workflow.sh | Content extraction with screenshots |
Troubleshooting
"Browser not launched. Call launch first."
This error can occur due to two reasons:
Reason 1: No session specified
Fix by setting the session environment variable or using the --session flag:
Or:
Reason 2: Stale/zombie sessions (more common)
If you've specified a session but still get this error, there may be stale sessions from previous runs where the browser process has terminated but the session record remains. This is the most common cause.
First, check for existing sessions:
If you see sessions listed, close them before starting a new one:
Recommended pattern for reliable startup:
Browser binary not found
Run the install command first:
Other Issues
If agent-browser encounters issues (installation problems, display errors, compatibility issues), suggest the user to:
Alternative: Enable Browser MCP Server
The built-in Browser MCP server provides similar browser automation capabilities through MCP tools. Guide the user to:
- Open Settings > MCP Servers
- Find and enable the Browser MCP server
- Use the MCP browser tools (
mcp__browser-use__*) instead ofagent-browserCLI
This is especially useful when:
agent-browserCLI is not installed or has dependency issues- Running in environments where CLI tools are restricted
- User prefers MCP-based browser automation
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingfrontend/skills/examples/agent-browser/SKILL.md
Popularity
- Repository stars
- 50
- Repository forks
- 8
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/eddie-292/grapwork/agent-browser)