Guide · Agent skill
How to use the Agent Browser agent skill: setup, commands and examples
Updated · written with AI from the project's own documentation and checked against our catalogue data
The Agent Browser skill (agent-browser) lets an AI agent control a Chrome or Chromium browser through the agent-browser command-line tool. It is useful for developers testing web app flows, and for anyone who needs repetitive web tasks such as filling forms, pulling text from pages, or saving screenshots and PDFs. This guide explains what the skill does, how to install it, how to ask for it, and what to watch for.
Quick start
- 1Install prerequisites. Make sure Node.js and npm are installed, then install the CLI and Chromium with npm i -g agent-browser && agent-browser install.
- 2Add the skill. Download the ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/, or upload it under Settings → Capabilities → Skills in the Claude apps.
- 3Confirm the CLI is found. Run which agent-browser in your terminal to confirm the binary is on your path.
- 4Ask for a browser task. Describe the task in plain words, such as opening a page and filling a form, so the agent matches the skill.
- 5Review snapshots. Check the interactive elements the agent lists before it clicks or fills anything.
- 6Close sessions. Ask the agent to close sessions when finished, or run agent-browser close yourself.
What is an agent skill, and what does Agent Browser let the agent do?
An agent skill is a folder containing a SKILL.md file that tells an AI agent when and how to use a capability. The agent reads the description and loads the instructions when a request matches it.
With this skill, the agent can open web pages, read the clickable elements on a page, fill in forms, press buttons, scroll, extract text, save screenshots or PDFs, and keep logged-in sessions. Instead of guessing at a website, it works through the page step by step and re-checks it after each change.
- Navigate to URLs and read the page title and URL
- Fill, type into, select, and check form fields
- Click buttons and press keys such as Enter
- Extract text and run JavaScript on the page
- Take screenshots (including full page) and export PDFs
Install the Agent Browser skill
Download the ZIP from this page and unzip it into your personal skills folder, ~/.claude/skills/, or into a project's .claude/skills/ folder. Alternatively, in the Claude apps, go to Settings → Capabilities → Skills and upload the ZIP.
The skill also needs the agent-browser CLI, which is an npm package. The SKILL.md install line is shown below. The skill checks for the agent-browser binary and does not install it at runtime, so install it yourself beforehand.
- Requires Node.js and npm to install the CLI globally
- Requires Chromium, installed with the agent-browser install step
- Requires a Chrome or Chromium browser available in the environment
npm i -g agent-browser && agent-browser installCheck that the tool is available
The skill begins by verifying the tool. Before you rely on it, you can run the same check yourself. If the command is not found, the agent should tell you that browser automation needs the agent-browser CLI and Chromium, rather than trying to install them.
which agent-browserLearn the core workflow: open, snapshot, act, re-snapshot
The skill works in four steps. The agent opens a URL, takes a snapshot to list interactive elements with refs such as @e1 and @e2, acts on those refs, and then takes a new snapshot after any navigation or page change, because refs are invalidated by changes to the page.
Commands can be chained with && when you do not need intermediate output.
- open <url> navigates
- snapshot -i lists interactive elements with refs
- click, fill, type, select, check and press act on refs
- Re-snapshot after navigation or DOM changes
agent-browser open https://example.com/form
agent-browser snapshot -i
agent-browser fill @e1 "user@example.com"
agent-browser fill @e2 "secret"
agent-browser click @e3
agent-browser wait --load networkidle
agent-browser snapshot -iHandle logins safely
The skill can reuse login state so you do not log in on every run. There are four options: importing state from your running Chrome, using a persistent profile, using a named session that saves and restores state automatically, or using a state file you save and load.
Read the safety notes before using this on a shared machine. Saved state and the ability to fill in passwords mean credentials can be exposed.
- Option 1: --auto-connect state save imports from your running Chrome
- Option 2: --profile keeps a persistent profile across runs
- Option 3: --session-name auto-saves and restores state
- Option 4: state save and state load use a file you choose
agent-browser --session-name myapp open https://app.example.com/loginUse sessions, iframes and cleanup
Iframe content is inlined in snapshots, so you can interact with iframe refs directly without switching frames. You can run parallel sessions with --session and list them with session list. Always close sessions when you finish.
- Parallel sessions with --session name
- List sessions with session list
- Close sessions when done
agent-browser --session s1 closeWhat people use it for
- Testing a web app's sign-up or checkout form flow during development
- Filling repetitive web forms with known values
- Pulling text or links from a page with eval or get text
- Taking full-page screenshots or PDFs of a live page for records
Frequently asked questions
How do I install the Agent Browser skill?
Download the ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder. In the Claude apps you can instead upload it under Settings → Capabilities → Skills. You also need the agent-browser CLI, installed with npm i -g agent-browser && agent-browser install.
What do I need to run it?
You need Node.js and npm, the agent-browser npm package, Chromium installed through agent-browser install, and a Chrome or Chromium browser in the environment. The skill checks for the binary and does not install it at runtime.
Is Agent Browser free?
The skill is listed under the MIT licence. Check the licence file in the source repository for the full terms before using it commercially.
Why does the agent need to re-snapshot the page?
Element refs such as @e1 are invalidated after navigation or DOM changes, so the agent takes a fresh snapshot to get current refs before acting again.
Is it safe to use with my logins?
Use caution. The skill can save login state and fill in passwords, which creates a risk of credential exposure. Avoid it for sensitive logins or payments on shared machines.
What should I use instead if it does not fit?
If you cannot install Node.js, npm and Chromium, this tool cannot run. For sites that forbid automation in their terms of service or robots rules, do not scrape them with this skill. The source does not compare it with specific alternatives.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Agent Browser suits developers testing web app flows and people who need repeatable form, text or screenshot tasks on live pages, provided Node.js, npm and Chromium are available. Skip it for sensitive logins or payments on shared machines, for scraping sites that forbid automation, or for setups that cannot install the required tools.
Download the skill