agent-browser

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

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/antoncuranz/opencode-config --skill agent-browser-antoncuranz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-browser
Source: https://github.com/antoncuranz/opencode-config/tree/main/opencode/skills/agent-browser
Command: npx skills add https://github.com/antoncuranz/opencode-config --skill agent-browser-antoncuranz

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 entry is slow and error-prone. This Skill gives an AI agent full programmatic control of a Chrome/Chromium browser through the agent-browser CLI, so tasks like logging in, filling forms, clicking through flows, and capturing pages run as deterministic commands. ## Core Features & Use Cases - Snapshot-and-Ref Interaction: Get compact accessibility snapshots with element refs (@e1, @e2) and use them to click, fill, select, and scroll without parsing raw HTML. - Authentication & Sessions: Reuse login state via auth vault, persistent profiles, session names, or saved state files, including OAuth and 2FA flows. - Capture & Verification: Take screenshots (including annotated and full-page), save PDFs, record video, and diff page states to verify actions worked. - Use Case: Test a signup flow end-to-end by opening the page, snapshotting the form, filling each field by ref, submitting, and diffing the result against the baseline snapshot. ## Quick Start Ask the agent to open a website with agent-browser, take an interactive snapshot, and fill out and submit the login form using the discovered element refs.

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 agent-browser snapshot -i to get element refs, then use agent-browser fill with each ref and click the submit button. Finish with agent-browser wait --load networkidle to confirm submission.

How do I keep a browser session logged in between automation runs?

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

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

Yes. Use --auto-connect to discover a running Chrome with remote debugging enabled, or --cdp 9222 to connect to an explicit DevTools port. This lets you reuse existing logins by saving the session state.

Why does agent-browser report a ref not found error?

Refs are invalidated whenever the page changes, such as after navigation, form submission, or dynamic content updates. Run agent-browser snapshot -i again to get fresh refs before interacting further.

Does agent-browser support mobile or iOS testing?

Yes. Use set device for desktop device emulation, or -p ios with --device to drive Mobile Safari on an iOS simulator. iOS mode requires macOS with Xcode and Appium with the xcuitest driver installed.

What are the limitations of the Lightpanda engine in agent-browser?

Lightpanda runs faster with less memory than Chrome but does not support --extension, --profile, --state, or --allow-file-access. It is selected with --engine lightpanda and requires a separate installation.