agent-browser
- Repo stars 10,611
- Author updated Live
- Author repo emdash
- Domain
- AI
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 88 / 100 · community maintained
- Author / version / license
- @emdash-cms · no license declared
- Token usage
- Lean
- Setup complexity
- Plug-and-play
- External API key
- Not required
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- No special requirements
- Permissions
-
- Read-only
- Write / modify
- Network behavior
- Local-only
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: agent-browser
description: Browser automation for testing and verification. Use when you need to interact with web UIs, ver…
category: ai
runtime: no special runtime
---
# agent-browser output preview
## PART A: Task fit
- Use case: Browser automation for testing and verification. Use when you need to interact with web UIs, verify visual changes, fill forms, or capture screenshots. Fast browser automation CLI for AI agents. Use this to verify web UI changes, test interactions, and capture screenshots. runs entirely locally. Works with Claude Code, Cursor, Cline and 23 more..
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “When to Use / Core Workflow / 1. Open a URL” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “Browser automation for testing and verification. Use when you need to interact with web UIs, verify visual changes, fill forms, or capture screenshots. Fast browser automation CLI for AI agents. Use this to verify web UI changes, test interactions, and capture screenshots. runs entirely locally. Works with Claude Code, Cursor, Cline and 23 more.”.
- **02** When the source has headings, the agent prioritizes “When to Use / Core Workflow / 1. Open a URL” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files; mostly runs locally; usually needs no extra API key.
## Running Rules
- read files, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source does not require a stable slash command. After installation, invoke the skill by name and describe the task.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files.
Start with a small task and check whether the result follows “When to Use / Core Workflow / 1. Open a URL”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: agent-browser
description: Browser automation for testing and verification. Use when you need to interact with web UIs, ver…
category: ai
source: emdash-cms/emdash
---
# agent-browser
## When to use
- Browser automation for testing and verification. Use when you need to interact with web UIs, verify visual changes, fi…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “When to Use / Core Workflow / 1. Open a URL” and keep inference separate from source facts.
- read files, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "agent-browser" {
input -> user goal + target files + boundaries + acceptance criteria
context -> When to Use / Core Workflow / 1. Open a URL
rules -> SKILL.md triggers / order / output contract
runtime -> no special runtime | read files, write/modify files | mostly runs locally
guardrails -> usually needs no extra API key + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} Agent Browser Skill
Fast browser automation CLI for AI agents. Use this to verify web UI changes, test interactions, and capture screenshots.
When to Use
- Verify visual changes after modifying frontend code
- Test form interactions and user flows
- Capture screenshots for documentation or debugging
- Inspect rendered HTML/accessibility tree
- Debug why something isn't working in the browser
Core Workflow
1. Open a URL
agent-browser open http://localhost:4321/
2. Take a Snapshot
The snapshot command returns an accessibility tree with refs (@e1, @e2, etc.) that you can use for interactions:
agent-browser snapshot -i # -i = interactive elements only (recommended)
agent-browser snapshot -c # -c = compact (removes empty structural elements)
agent-browser snapshot -i -c # Both flags work together
3. Interact Using Refs
Use the @ref values from the snapshot to interact with elements:
agent-browser click @e5 # Click element
agent-browser fill @e3 "hello" # Clear and type
agent-browser type @e3 "world" # Type without clearing
agent-browser select @e7 "option" # Select dropdown
agent-browser check @e9 # Check checkbox
4. Screenshot
agent-browser screenshot # Viewport only
agent-browser screenshot --full # Full page
agent-browser screenshot output.png # Save to file
ALWAYS check the image size before attempting to load. If it is larger than 2MB, process it using a tool such as sips or ImageMagick to reduce the size. Large files cannot be loaded by your tools.
Common Patterns
Form Verification
agent-browser open http://localhost:4321/_emdash/api/setup/dev-bypass?redirect=/_emdash/admin/content/posts/new
agent-browser snapshot -i # Check what fields are visible
agent-browser fill @e3 "Test Title"
agent-browser fill @e5 "Test content here"
agent-browser click @e7 # Save button
Get Element Info
agent-browser get text @e1 # Get text content
agent-browser get html @e1 # Get inner HTML
agent-browser get value @e2 # Get input value
agent-browser get url # Current URL
agent-browser get title # Page title
agent-browser get count "button" # Count matching elements
Check Element State
agent-browser is visible @e1
agent-browser is enabled @e2
agent-browser is checked @e3
Find by Role/Label
agent-browser find role button click --name "Submit"
agent-browser find label "Email" fill "test@example.com"
agent-browser find placeholder "Search..." type "query"
Sessions
Sessions keep browser state (cookies, storage) between commands:
# Use named session (persists until closed)
agent-browser --session mytest open http://localhost:4321
agent-browser --session mytest snapshot -i
# Or set via environment
export AGENT_BROWSER_SESSION=mytest
agent-browser open http://localhost:3000
Useful Options
| Option | Description |
|---|---|
--session <name> |
Isolated browser session |
--headed |
Show browser window (not headless) |
--json |
JSON output for programmatic use |
--full |
Full page screenshot |
-i |
Snapshot: interactive elements only |
-c |
Snapshot: compact output |
-d <n> |
Snapshot: limit tree depth |
Debugging
agent-browser --headed open http://localhost:3000 # See what's happening
agent-browser console # View console logs
agent-browser errors # View page errors
agent-browser highlight @e5 # Highlight element
agent-browser eval "document.title" # Run JS
Tips
- Always snapshot first - Get refs before interacting
- Use
-iflag - Interactive-only snapshots are much cleaner - Wait when needed - Use
wait <ms>orwait <selector>after actions that trigger loading - Sessions for auth - Use named sessions to persist login state
- Headed for debugging - Use
--headedwhen things aren't working as expected
Decide Fit First
Design Intent
How To Use It
Boundaries And Review