agent-browser

Automate browser navigation, form filling, screenshots, and data extraction via a CLI.

Updated May 11, 2026
One-click install
npx skills add https://github.com/mmnavarr/harness --skill agent-browser-mmnavarr
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: agent-browser
Source: https://github.com/mmnavarr/harness/tree/main/skills/agent-browser
Command: npx skills add https://github.com/mmnavarr/harness --skill agent-browser-mmnavarr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires agent-browser, and includes references (resource) components.

What problem does it solve? Manually interacting with websites for testing, scraping, or repetitive form workflows is slow and error-prone. This Skill gives AI agents a command-line interface to control Chrome/Chromium via CDP, turning multi-step web interactions into scriptable commands. ## Core Features & Use Cases - Snapshot-and-Ref Interaction: Capture a compact accessibility tree with element refs (@e1, @e2) to click, fill, select, and scroll without parsing raw HTML. - Authentication & Session Management: Reuse login state via auth vault, persistent profiles, session names, or state files, including OAuth and 2FA flows. - Capture & Verification: Take annotated screenshots, save PDFs, record video, diff page states, and profile performance with Chrome DevTools traces. - Use Case: Test a web app's signup flow by navigating to the form, snapshotting to discover field refs, filling credentials, submitting, and diffing the result against a baseline screenshot. ## Quick Start Ask the agent to open a website with agent-browser, take an interactive snapshot, fill in the login form, and capture a screenshot of the result.

Frequently Asked Questions about agent-browser

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate filling out a web form from the command line?▼

Open the page with agent-browser open, run snapshot -i to get element refs like @e1, then use fill, select, and check commands on those refs before clicking submit. Re-snapshot after submission to verify the result.

How do I reuse a logged-in session across browser automation runs?▼

Save state after logging in with agent-browser state save auth.json, then restore it with state load or the --state flag. Alternatively use --session-name for automatic save/restore or the auth vault for encrypted credential storage.

Can agent-browser connect to an already running Chrome instance?▼

Yes. Start Chrome with --remote-debugging-port=9222, then use agent-browser --auto-connect or --cdp 9222 to attach. This lets you reuse existing login cookies from your normal browser session.

Why do element refs stop working after clicking a button?▼

Refs are invalidated whenever the page changes, including navigation, form submissions, and dynamic content updates. Always run snapshot -i again after any action that modifies the DOM to get fresh refs.

Does agent-browser support mobile or iOS testing?▼

Yes. Use -p ios with --device to drive Mobile Safari on iOS simulators via Appium, supporting tap, swipe, and fill gestures. Desktop device emulation is also available via set device for viewport and user agent spoofing.

How do I run JavaScript in the browser without shell quoting issues?▼

Use agent-browser eval --stdin with a heredoc for multiline scripts, or eval -b with base64-encoded code. These bypass shell interpretation of quotes, backticks, and special characters that corrupt complex expressions.