agentsclimarketplace

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

Install
npx -y skills add psylch/agent-browser-guide-skill --skill agent-browser-guide

Assembled 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

SymptomResolution
command not foundnpm install -g agent-browser && agent-browser install
First command slow (~3s)Normal — daemon + Chromium cold start. Subsequent < 100ms
scroll jumps to wrong tabUse eval window.scrollTo(...) instead
get count undercountsOnly viewport-visible. Use eval document.querySelectorAll("sel").length
--allow-file-access ignoredDaemon already running. agent-browser close first, then reopen
Login state lostEnsure --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:

ScenarioReference
API debugging, request interception/mocking, cookies/localStoragereferences/network-and-storage.md
Rich text editors (Notion/Linear/Monaco), precise mouse controlreferences/rich-editors-and-low-level-input.md
Connecting to existing Chrome/Electron, proxy, extensions, launch argsreferences/cdp-proxy-and-extensions.md
Performance profiling, video recording, DOM diff, screenshot comparisonreferences/profiling-recording-and-diff.md
iOS Safari testing, cloud browsers, domain allowlists, action confirmationreferences/ios-and-cloud-providers.md

Keep looking

Skills are one crate of 607,533. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.