Agent browser guide
Skill psylch/agent-browser-guide-skill/skills/agent-browser-guide
Browser automation using agent-browser CLI. Trigger when: browsing web pages, taking screenshots, extracting styles, auditing UI, checking web apps, scraping content, testing responsive design, or any task requiring a browser. Replaces Playwright MCP and claude-in-chrome MCP as the default browser tool.From its SKILL.md
npx -y skills add psylch/agent-browser-guide-skill --skill agent-browser-guideAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.7 KB, as published. Nobody here has run it
Agent Browser Guide
Language
Match user's language: Respond in the same language the user uses.
Overview
Use agent-browser CLI for all browser automation tasks. It runs as a daemon with session isolation, persistent login profiles, structured style extraction, and ref-based element interaction.
This is the default browser tool. Do not use Playwright MCP, claude-in-chrome MCP, or other browser tools unless the user explicitly requests them.
Prerequisites
Before first use, verify installation:
command -v agent-browser && agent-browser --version
If not installed:
npm install -g agent-browser
agent-browser install # Download Chromium (first time only)
Core Rules
1. Always Use Session Isolation
Every browser task MUST use --session or AGENT_BROWSER_SESSION env var.
# Single task
agent-browser --session <task-name> open <url>
# Subagent — env var so all commands inherit
AGENT_BROWSER_SESSION=<agent-name> agent-browser open <url>
Naming convention: <purpose>-<target>, e.g., audit-claude, dev-preview, scrape-docs.
2. Login State via Profile
For authenticated sites, use --profile:
agent-browser --session work --profile ~/.agent-browser/profiles/<site> open <url>
Standard profile locations:
~/.agent-browser/profiles/
├── github/ # GitHub
├── google/ # Google accounts
├── claude/ # Claude.ai
└── linear/ # Linear
First-time login:
# 1. Headed browser for manual login
agent-browser --profile ~/.agent-browser/profiles/<site> --headed open <login-url>
# 2. User logs in manually
# 3. Close — profile saved to disk
# 4. Future: headless with --profile, login state preserved
For public pages, omit --profile.
3. Interaction via @ref
Always snapshot first, then interact with @ref:
agent-browser --session X snapshot -i -c # Interactive elements with refs
agent-browser --session X click @e3 # Click by ref
agent-browser --session X fill @e5 "text" # Fill input by ref
Never guess pixel coordinates.
4. Style Extraction
agent-browser --session X get styles "<selector>" --json
Returns fontSize, fontFamily, fontWeight, color, backgroundColor, border, borderRadius, boxShadow, padding, and bounding box.
For uncovered properties (transition, animation, opacity, custom properties):
agent-browser --session X eval 'JSON.stringify(getComputedStyle(document.querySelector("<sel>")).<prop>)'
5. Screenshots Write to Local Files
agent-browser --session X screenshot output.png # Viewport
agent-browser --session X screenshot output.png --full # Full page
agent-browser --session X screenshot output.png --annotate # Numbered element markers
6. Scrolling — Use eval
scroll command can be unreliable. Prefer:
agent-browser --session X eval 'window.scrollTo(0, 2000)'
agent-browser --session X eval 'document.querySelector("<sel>").scrollIntoView({behavior:"smooth"})'
Common Workflows
Browse & Extract
agent-browser --session S open <url>
agent-browser --session S wait --load networkidle
agent-browser --session S snapshot -i -c
agent-browser --session S get styles "h1,h2,p,button,input" --json
agent-browser --session S screenshot page.png --full
Responsive Testing
agent-browser --session S set viewport 1920 1080 && agent-browser --session S screenshot desktop.png
agent-browser --session S set viewport 768 1024 && agent-browser --session S screenshot tablet.png
agent-browser --session S set device "iPhone 15 Pro" && agent-browser --session S screenshot mobile.png
Multi-Agent Parallel
Main Agent
├── spawn Agent-A (AGENT_BROWSER_SESSION=audit-site-a)
├── spawn Agent-B (AGENT_BROWSER_SESSION=audit-site-b)
└── spawn Agent-C (AGENT_BROWSER_SESSION=dev-preview)
Each agent gets full isolation: separate tabs, cookies, localStorage, network state.
Cleanup
Always close sessions when done:
agent-browser --session X close
Troubleshooting
| Symptom | Resolution |
|---|---|
command not found | npm install -g agent-browser && agent-browser install |
| First command slow (~3s) | Normal — daemon + Chromium cold start. Subsequent < 100ms |
scroll jumps to wrong tab | Use eval window.scrollTo(...) instead |
get count undercounts | Only viewport-visible. Use eval document.querySelectorAll("sel").length |
--allow-file-access ignored | Daemon already running. agent-browser close first, then reopen |
| Login state lost | Ensure --profile path is consistent. Daemon exit loses non-profiled sessions |
Advanced References (read on demand)
When your task involves these scenarios, read the corresponding reference doc:
| Scenario | Reference |
|---|---|
| API debugging, request interception/mocking, cookies/localStorage | references/network-and-storage.md |
| Rich text editors (Notion/Linear/Monaco), precise mouse control | references/rich-editors-and-low-level-input.md |
| Connecting to existing Chrome/Electron, proxy, extensions, launch args | references/cdp-proxy-and-extensions.md |
| Performance profiling, video recording, DOM diff, screenshot comparison | references/profiling-recording-and-diff.md |
| iOS Safari testing, cloud browsers, domain allowlists, action confirmation | references/ios-and-cloud-providers.md |