# Browser Harness

Controls a real browser over CDP for logged-in and bot-protected pages.

- Repository: https://github.com/browser-use/browser-harness (18805 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add browser-use/browser-harness --skill browser-harness -g -a claude-code -y`
Codex: `npx skills add browser-use/browser-harness --skill browser-harness -g -a codex -y`
Cursor: `npx skills add browser-use/browser-harness --skill browser-harness -g -a cursor -y`
Gemini CLI: `npx skills add browser-use/browser-harness --skill browser-harness -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add browser-use/browser-harness`

## Description

Control a real browser via CDP: clicking, typing, navigation, logged-in sessions, JS-rendered or bot-protected pages. Not for plain HTTP fetches of public content - use curl for those.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# browser-harness

Direct browser control via CDP. For task-specific edits, use `agent-workspace/agent_helpers.py`. For setup, install, or connection problems, read https://github.com/browser-use/browser-harness/blob/main/install.md.

## When Not to Use

A basic fetch of public information needs no browser. If a plain HTTP request can read it, a public page, an API, docs, use `curl` or your fetch tool, and leave the browser alone. Use browser-harness when the task needs interaction (click, type, navigate), the user's logged-in session, JS rendering, or a bot-protected page. If a direct fetch fails or returns a shell page, then escalate to the browser.

Domain skills are off by default. Set `BH_DOMAIN_SKILLS=1` to enable them; see the bottom section.

**If `BH_DOMAIN_SKILLS=1` and the task is site-specific, read every file in the matching `$BH_AGENT_WORKSPACE/domain-skills/<site>/` directory before inventing an approach.**

## Usage

```bash
browser-harness <<'PY'
print(page_info())
PY
```

The rest: https://github.com/browser-use/browser-harness/blob/HEAD//SKILL.md
