Guide · Agent skill
How to use the Browser Harness agent skill (browser-harness)
Updated · written with AI from the project's own documentation and checked against our catalogue data
The browser-harness skill lets an AI agent control a real Chrome or Chromium browser through the Chrome DevTools Protocol (CDP). It handles clicks, typing, navigation and screenshots on pages that need interaction, JavaScript rendering, your logged-in session, or that block simple fetches. This guide explains what the skill does, how to install it, how to trigger it, and what to watch for before you let an agent act in your browser.
Quick start
- 1Download the skill. Download the ZIP from this page and unzip it so the browser-harness folder contains SKILL.md.
- 2Place the skill. Move the folder into ~/.claude/skills/ for personal use or into .claude/skills/ in a project. Alternatively, upload it in the Claude apps under Settings → Capabilities → Skills.
- 3Install the CLI. Follow install.md to install the browser-harness CLI and its Python tooling, as described in pyproject.toml.
- 4Connect Chrome. Make sure Chrome or Chromium is running with remote debugging available, and approve any connection prompt that appears.
- 5Test the connection. Ask the agent to read the current page title with a short script. If it fails, run browser-harness --doctor.
- 6Make a request. Describe a task that needs clicks, typing, logged-in access or JavaScript rendering, and let the agent load the skill.
What is an agent skill, and what does browser-harness make the agent do?
An agent skill is a folder containing a SKILL.md file that tells an AI agent when and how to perform a task. The agent reads the skill's description and loads its instructions when a request matches.
The browser-harness skill (skill name: browser-harness) teaches the agent to drive a real browser. Once installed, the agent can attach to your running Chrome or Chromium instance and perform clicks, typing, navigation and screenshots.
- Interacting with pages that need clicks, typing or form submission
- Working on JavaScript-rendered pages
- Using your logged-in browser session
- Reaching pages that block simple HTTP fetches
Install the browser-harness skill
Option 1: download the ZIP from this page and unzip it into your personal skills folder, ~/.claude/skills/, or into a project's .claude/skills/ folder so it applies only to that project.
Option 2: in the Claude apps, open Settings, go to Capabilities, and upload the skill under Skills.
The skill's own install guide (install.md) covers installing the browser-harness CLI and connecting it to a browser. The skill depends on that CLI, so complete that setup too.
- Personal: ~/.claude/skills/browser-harness/
- Project: .claude/skills/browser-harness/ inside your project
- Claude apps: Settings → Capabilities → Skills
Check what you need before you start
The skill needs Google Chrome or Chromium with remote debugging available, plus Python tooling and the browser-harness CLI. The setup steps are in install.md and pyproject.toml in the skill files.
Browser Use Cloud is optional. It is only needed for remote browsers. macOS users may need to grant Accessibility permission to the mac-approve helper.
- Google Chrome or Chromium with remote debugging
- Python tooling and the browser-harness CLI (see install.md and pyproject.toml)
- Optional: Browser Use Cloud account and API access for remote browsers
- macOS only, if needed: Accessibility permission for the mac-approve helper
How to trigger the skill with natural requests
You do not need special syntax. Describe a task that needs a real browser and the agent will pick the skill when it matches. Name the site and the action you want.
For plain reads of public pages or APIs, the skill tells the agent to use curl or a basic fetch first. It only opens the browser if those fail or return a shell page, so you do not need to ask for curl explicitly.
- "Log into my dashboard on the billing site and download this month's invoice."
- "Fill in the signup form on this page and take a screenshot of the confirmation."
- "This page is JavaScript-heavy. Open it and read the table that loads after the page renders."
Basic usage the agent follows
The agent runs browser-harness with a heredoc script. The helpers are pre-imported, so a short script can read the current page. The first navigation for a task opens a new tab, and the agent is told to reuse a matching tab where possible.
The agent is instructed to keep the browser in the background. It does not bring Chrome to the foreground unless you explicitly ask to see a tab. If a site needs focus, the agent is told to enable focus emulation temporarily and disable it afterwards.
- Tabs are reused per task or site, not duplicated
- Tabs the agent created are closed at task completion when no longer needed
- Tabs you did not create are not closed
browser-harness <<'PY'
print(page_info())
PYSafety notes: scripts and network access
This skill runs scripts and uses the network. The agent acts with your logged-in session, so anything it can do in that browser (including changing data) it can do on your behalf.
Keep sensitive accounts such as banking or email out of agent control unless you can supervise closely. Chrome may also show remote-debugging Allow prompts; you should approve them only for sessions you intend.
Domain skills are off by default. Enable them only if you want the agent to read and write site-specific notes, by setting BH_DOMAIN_SKILLS=1.
- Runs scripts: yes
- Uses network: yes
- The agent uses your logged-in session, so it can change data
- Keep banking and email under close supervision
Tips for reliable results
Let the agent use curl for public reads. Browser control is slower and riskier, so reserve it for interaction or logged-in work.
If the connection fails, ask the agent to run the diagnostics command. Use the default local connection rather than creating extra named sessions, since each new one can trigger another Chrome Allow prompt.
On macOS, if Chrome asks for remote-debugging permission, the agent may use the mac-approve helper. On Linux or Windows, click Allow yourself when Chrome shows the dialog.
- Prefer curl or a basic fetch for public pages and APIs
- Use the default local connection for sequential work
- Run browser-harness --doctor when the connection fails
- Use Browser Use Cloud only when you need remote or parallel browsers
browser-harness --doctorWhat people use it for
- Filling and submitting a multi-step form on a site that requires interaction
- Reading content that only appears after JavaScript renders the page
- Taking screenshots of a page inside your logged-in session
- Working on a bot-protected page that blocks plain fetch requests
- Running browser tasks in the background without Chrome jumping to the foreground
Frequently asked questions
How do I install the browser-harness skill?
Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder. You can also upload it in the Claude apps under Settings → Capabilities → Skills. Then follow install.md to set up the browser-harness CLI.
Is browser-harness free?
The project is released under the MIT licence. Browser Use Cloud is optional and only needed for remote browsers, so check its terms separately if you use it.
What do I need to run browser-harness?
You need Google Chrome or Chromium with remote debugging available, Python tooling, and the browser-harness CLI described in install.md and pyproject.toml. Browser Use Cloud and API access are only needed for remote browsers, and macOS users may need Accessibility permission for mac-approve.
When should I use curl instead of browser-harness?
Use curl or a basic fetch for plain reads of public pages, docs or APIs. The skill itself says a browser is unnecessary for these and only recommends one when a direct fetch fails or returns a shell page.
Is it safe to let an agent use my logged-in browser?
The agent acts with your logged-in session, so it can change data in any account you are signed into. Avoid using it on banking or email unless you can supervise each step closely.
Why does Chrome show an Allow prompt, and what should I do?
Chrome asks for approval when remote debugging connects. On macOS the agent may use the mac-approve helper; on Linux or Windows, click Allow yourself. Avoid creating extra named sessions, since each one can trigger another prompt.
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
Use browser-harness if you are a developer or power user who needs an agent to click, type, or act inside a logged-in or JavaScript-heavy site. Pick curl or a plain fetch for public pages and APIs, and avoid giving agents access to banking or email without close supervision.
Download the skill