Guide · Agent skill
How to use the agent-browser skill for browser automation
Updated · written with AI from the project's own documentation and checked against our catalogue data
The agent-browser skill teaches an AI agent to control a real web browser through a command-line tool called agent-browser. This guide is for readers who have never used an agent skill: it explains what the skill does, how to install it, how to ask for things in plain language, and what to watch for. By the end you will know how to set up the skill, make the agent open pages, fill forms, click buttons and take screenshots, and where the risks are.
Quick start
- 1Install the agent-browser CLI. Install the external agent-browser command-line tool, since the skill does not include it. Follow that tool's own documentation because the source does not give these steps.
- 2Download and unzip the skill. Download the skill ZIP from this page and unzip it so you have the agent-browser folder containing SKILL.md.
- 3Place the skill in the right folder. Move the folder to ~/.claude/skills/ for personal use, or to a project's .claude/skills/ folder for one project. Alternatively, upload it under Settings → Capabilities → Skills in the Claude apps.
- 4Ask for a browser task in plain language. Describe the site, the action and the result you want, such as filling a form or taking a screenshot.
- 5Check each step with a snapshot. Ask the agent to take a snapshot with snapshot -i after each page change, so it uses current element references.
- 6Save state only where it is safe. Use state save only for test accounts, and keep the resulting auth.json file protected because it is stored as plain text.
What is the agent-browser skill and what does it let the agent do?
An agent skill is a folder of instructions that an AI agent loads when a task matches the skill's description. The agent-browser skill is described as a browser automation CLI for AI agents. Its main file, SKILL.md, tells the agent how to use the agent-browser command-line tool to interact with websites.
Once the skill is in place and the agent-browser CLI is installed, the agent can open pages, read the clickable elements on them, fill in forms, click buttons, wait for pages to load, take screenshots or PDFs, and pull text out of pages. The skill also covers saving login state, running several browser sessions at once, and driving an iOS simulator for mobile Safari testing.
Install the agent-browser skill
Download the skill ZIP from this page and unzip it. Then put the skill folder in one of these places, depending on how you use Claude:
Option 1: place it in your personal skills folder at ~/.claude/skills/ so it is available across your projects.
Option 2: place it in a project's .claude/skills/ folder so it is available only to that project.
Option 3: upload the skill in the Claude apps under Settings → Capabilities → Skills.
- The skill only describes commands. It does not include the agent-browser CLI, so you must install that separately.
- The source does not give installation instructions for the agent-browser CLI itself. Check the tool's own documentation for that step.
- The skill's allowed-tools setting is Bash(agent-browser:*), so the agent needs Bash access to run these commands.
Know the requirements before you start
The skill needs the agent-browser CLI, which is an external tool and not part of the skill files. The agent also needs Bash access limited to agent-browser commands. The skill runs scripts and uses the network.
For iOS simulator testing you need macOS with Xcode, plus Appium. The source gives this setup command for Appium: npm install -g appium && appium driver install xcuitest. Real iOS devices also work if they are pre-configured, and you pass their UDID with --device.
npm install -g appium && appium driver install xcuitestTrigger the skill with natural requests
You do not need to type commands yourself. Describe the task in plain language and the agent should load the skill when the request matches its description. The skill lists trigger phrases such as open a website, fill out a form, click a button, take a screenshot, scrape data from a page, test this web app, login to a site, and automate browser actions.
Be specific about the site, the goal and the result you want. For example, say which page to open, which fields to fill, and what to report back.
- Open https://example.com/form, fill in the email field with my test address, and tell me what the confirmation message says.
- Take a full-page screenshot of https://example.com/pricing and save it.
- Test this web app's signup flow and tell me which step fails.
Understand the core workflow: navigate, snapshot, interact, re-snapshot
Every browser task follows the same pattern. The agent opens a URL, takes a snapshot that lists interactive elements with references such as @e1 and @e2, uses those references to click or fill, and then takes a new snapshot to check the result.
Refs are tied to the current page. The skill says they become invalid when the page changes, so the agent must take a fresh snapshot after navigation, form submission, or dynamic content such as dropdowns and modals.
- Navigate: agent-browser open <url>
- Snapshot: agent-browser snapshot -i
- Interact: click, fill or select using refs such as @e1
- Re-snapshot after any page change
agent-browser open https://example.com/form
agent-browser snapshot -i
agent-browser fill @e1 "user@example.com"
agent-browser fill @e2 "password123"
agent-browser click @e3
agent-browser wait --load networkidle
agent-browser snapshot -iExamples of common tasks
The skill includes patterns for form submission, login with saved state, data extraction, parallel sessions, visual debugging, local files and iOS simulator use. Reading the examples helps you judge what to ask for.
For data extraction, the agent can read a single element's text, dump all page text to a file, or output JSON with the --json flag. For parallel work, each site can run in its own named session.
- Form submission: open a signup page, fill fields, choose a dropdown option, tick a checkbox and submit.
- Data extraction: get the text of a specific element or the whole body, optionally saving it to page.txt.
- Parallel sessions: run --session site1 and --session site2 at once, then list them with agent-browser session list.
- Visual debugging: run with --headed to see the browser, highlight an element, or record a session to a .webm file.
- Local files: open file:// URLs for PDFs or HTML, using the --allow-file-access flag.
- Mobile testing: list iOS simulators with agent-browser device list, then launch Safari with -p ios and a device name.
agent-browser --session site1 open https://site-a.com
agent-browser --session site2 open https://site-b.com
agent-browser session listSafety notes on scripts, network and saved login state
The skill runs scripts and uses the network, so review what the agent will do before letting it run unattended on sites that matter to you. Use test accounts where possible.
Saved login state is stored as a plain file, for example auth.json, created with agent-browser state save. Anyone who can read that file may be able to use the session. Do not use this skill with sensitive accounts such as banking or email, because the agent would act with your credentials.
The proxy reference covers rotating proxies. Only use proxy features on sites whose terms of service allow automation. Scraping sites that forbid automation carries legal and ethical risk.
- Avoid banking and email accounts.
- Store auth.json securely or delete it after use.
- Check a site's terms of service before scraping or automating it.
What people use it for
- Testing a web app's signup, login or checkout flow and reporting which step fails.
- Filling out the same routine form repeatedly with different values.
- Checking that a page loads and shows expected text or a screenshot after a change.
- Extracting text from specific pages for a data-gathering task on sites that permit it.
- Checking how a mobile web page looks in Safari on an iOS simulator.
Frequently asked questions
How do I install the agent-browser skill?
Download the skill ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder. You can also upload it in the Claude apps under Settings → Capabilities → Skills. You still need to install the separate agent-browser CLI, which the source does not include instructions for.
What are the requirements for the agent-browser skill?
You need the agent-browser CLI, Bash access for the agent limited to agent-browser commands, and network access. The skill runs scripts. For iOS simulator testing you also need macOS with Xcode and Appium.
Is the agent-browser skill free?
The skill is listed under the MIT licence. The source does not mention pricing for the skill or the agent-browser CLI, so check those tools' own pages for cost details.
Why does the agent say my element reference is invalid?
Refs such as @e1 are invalidated when the page changes, for example after a navigation, form submission or a dropdown or modal loads. Ask the agent to take a new snapshot with snapshot -i and use the new refs. If refs are unreliable, the skill offers semantic locators such as find label or find role.
Can I watch what the agent does in the browser?
Yes. The skill describes running with the --headed flag so you can see the browser, plus highlighting elements and recording a session to a .webm file for debugging.
Is it safe to let the agent log into my accounts?
Not for sensitive accounts such as banking or email. The skill can save login state to a plain file such as auth.json, and the agent would act with your credentials. Use test accounts and protect any saved state file.
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
This skill suits developers who want an agent to test their web app in a real browser, people repeating routine web tasks, and anyone gathering text from pages that allow automation. It is a poor fit for sensitive accounts, for sites whose terms forbid automation, and for anyone who does not want to install the separate agent-browser CLI, since the skill cannot run a browser on its own.
Download the skill