Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

browser · browserbase — Claude Code skill: what it does, how to install

Automates browser navigation via the browse CLI. Useful for data extraction, filling forms, and navigating sites behind bot protection.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add browserbase/skills --skill browser -a claude-code
Open on GitHub

What browser does

The skill drives web automation using the browse command-line utility. The agent navigates pages, reads the accessibility tree via browse snapshot instead of vision-heavy screenshots, clicks elements by reference, and fills forms. When low-level inspection is needed, it streams Chrome DevTools Protocol events directly into your terminal.

Two execution modes are supported. Local mode runs your machine's Chrome or Chromium instance, or attaches to an existing debug port. Remote mode routes traffic through Browserbase to handle residential proxies and automatic CAPTCHA solving. To run remotely, you need a BROWSERBASE_API_KEY set in your environment, plus the browse CLI installed globally.

Standard web automations break quickly on aggressive Cloudflare challenges. Running the remote session is the answer when local requests get blocked by anti-bot checks.

What it helps with

  • extract markdown content from dynamic web pages
  • automate form submissions and button clicks in the browser
  • bypass bot detection and CAPTCHAs via remote sessions
  • inspect streaming CDP network and console events

Example prompts for the agent

  • Open the target documentation page in local mode and get the markdown body
  • Inspect the accessibility snapshot and click the login button
  • Launch a remote session to extract data from a protected website

How to install browser

1Skills CLI (Vercel)

npx skills add browserbase/skills --skill browser -a claude-code

2Manually: put the files in place

~/.claude/skills/browser/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/browser/

From the same set3

The whole set →

Other versions of browser

Similar

e2e tester-army Writes, runs, and debugs web and mobile end-to-end tests with the e2e test runner, combining agent goals with exact Playwright assertions and device checks. Claude Code CX Codex Cursor +1 1,200installs exa-search K-Dense-AI Skill for searching scientific and technical content via Exa with text extraction from pages and PDFs in batches. Supports filtering by publication category and academic domains. Claude Code CX Codex Cursor +1 1,700installs chrome-cdp pasky Connects AI coding agents to an active Chrome browser session using DevTools Protocol. Useful for inspecting open tabs, clicking elements, and taking viewport screenshots. Claude Code CX Codex Cursor +1 2,100installs browseros-neo browseros-ai Routes website tasks to BrowserOS neo, using a browser with a persistent profile and active account sessions. Use it for forms, downloads, page checks, and account actions. Claude Code CX Codex Cursor +1 604installs tavily-best-practices tavily-ai This skill gives an agent guidance for Tavily web search, content extraction, site crawling, and research. Use it when adding current web data to an agent workflow or RAG system. Claude Code CX Codex Cursor +1 20,600installs firecrawl-build-scrape firecrawl This skill guides integration of Firecrawl /scrape into product code for single-page extraction. It applies when an app has a known URL and needs markdown, HTML, or metadata. Claude Code CX Codex Cursor +1 61,600installs agent-browser vercel-labs A CLI skill for browser control: it opens pages, fills forms, clicks buttons, and tests web apps. Use it when an agent needs to act inside a website. Claude Code CX Codex Cursor +1 1,200,000installs webapp-testing official anthropics This skill tests local web apps with Playwright, helping agents debug UI behavior, capture screenshots, and inspect browser logs. Claude Code Claude.ai 186,758installs

Questions about browser

How do I install browser in Claude Code?

Run npx skills add browserbase/skills --skill browser -a claude-code. You also need the CLI utility installed globally via npm install -g browse.

What does the browser skill do?

It provides natural language web automation, letting agents click elements, read accessibility trees, take screenshots, and manage tabs.

When should I use remote mode instead of local?

Local mode works best for localhost, reproducible tests, and standard docs. Remote mode is necessary for pages with bot detection, Cloudflare walls, or CAPTCHAs.

Source text

SKILL.md · MIT
---
name: browser
description: Automate web browser interactions using natural language via CLI commands. Use when the user asks to browse websites, navigate web pages, extract data from websites, take screenshots, fill forms, click buttons, or interact with web applications. Supports remote Browserbase sessions with Browserbase Identity, Verified browsers, automatic CAPTCHA solving, and residential proxies — ideal for protected websites and JavaScript-heavy pages.
compatibility: "Requires the browse CLI (`npm install -g browse`). Remote Browserbase sessions need `BROWSERBASE_API_KEY`. Local mode uses Chrome/Chromium on your machine."
license: MIT
allowed-tools: Bash
metadata:
  openclaw:
    requires:
      bins:
        - browse
    install:
      - kind: node
        package: "browse"
        bins: [browse]
    homepage: https://github.com/browserbase/skills
---

# Browser Automation

Automate browser interactions using the browse CLI with Claude.

## Setup check

Before running any browser commands, verify the CLI is available:

```bash
which browse || npm install -g browse
```

## Environment Selection (Local vs Remote)

The CLI supports explicit per-command environment flags. If you do nothing, the next session defaults to Browserbase when `BROWSERBASE_API_KEY` is set and to local otherwise.

### Local mode
- `browse open <url> --local` starts a clean isolated local browser
- `browse open <url> --auto-connect` attaches to an already-running debuggable Chrome; use `--local` when no debuggable Chrome is available
- `browse open <url> --cdp <port|url>` attaches to a specific CDP target
- Best for: development, localhost, trusted sites, and reproducible runs

### Remote mode (Browserbase)
- `browse open <url> --remote` starts a Browserbase session
- Without a local flag, Browserbase is also the default when `BROWSERBASE_API_KEY` is set
- Provides: Browserbase Identity, Verified browsers, automatic CAPTCHA solving, residential proxies, session persistence
- **Use remote mode when:** the target site has bot detection, CAPTCHAs, IP rate limiting, Cloudflare protection, or requires geo-specific access
- Get credentials at https://browserbase.com/settings

### When to choose which
- **Repeatable local testing / clean state**: `browse open <url> --local`
- **Reuse your local login/cookies**: `browse open <url> --auto-connect`
- **Simple browsing** (docs, wikis, public APIs): local mode is fine
- **Protected sites** (login walls, CAPTCHAs, anti-scraping): use remote mode
- **If local mode fails** with bot detection or access denied: switch to remote mode

## Commands

Most driver commands work across local, remote, and CDP sessions after the daemon starts.

### Navigation
```bash
browse open <url>                        # Go to URL
browse open <url> --local                # Go to URL in a clean local browser
browse open <url> --remote               # Go to URL in a Browserbase session
browse reload                            # Reload current page
browse back                              # Go back in history
browse forward                           # Go forward in history
```

### Page state (prefer snapshot over screenshot)
```bash
browse snapshot                          # Get accessibility tree with element refs (fast, structured)
browse screenshot --path <path>          # Take visual screenshot (slow, uses vision tokens)
browse get url                           # Get current URL
browse get title                         # Get page title
browse get text <selector>               # Get text content (use "body" for all text)
browse get html <selector>               # Get HTML content of element
browse get markdown [selector]           # Get page content as markdown (defaults to body)
browse get value <selector>              # Get form field value
```

Use `browse snapshot` as your default for understanding page state — it returns the accessibility tree with element refs you can use to interact. Only use `browse screenshot` when you need visual context (layout, images, debugging).

### Interaction
```bash
browse click <ref>                       # Click element by ref from snapshot (e.g., @0-5)
browse type <text>                       # Type text into focused element
browse fill <selector> <value>           # Fill input; add --press-enter if Enter is needed
browse select <selector> <values...>     # Select dropdown option(s)
browse upload <selector> <files...>      # Upload file(s) to <input type="file">
browse press <key>                       # Press key (Enter, Tab, Escape, Cmd+A, etc.)
browse mouse drag <fromX> <fromY> <toX> <toY>  # Drag from one point to another
browse mouse scroll <x> <y> <deltaX> <deltaY>  # Scroll at coordinates
browse highlight <selector>              # Highlight element on page
browse is visible <selector>             # Check if element is visible
browse is checked <selector>             # Check if element is checked
browse wait <type> [arg]                 # Wait for: load, selector, timeout
```

### CDP event tailing
```bash
browse cdp <url|port>                    # Stream CDP events as NDJSON from any target
browse cdp 9222                          # Attach to local Chrome on port 9222
browse cdp ws://localhost:9222/devtools/browser/...  # Full WebSocket URL
browse cdp <url> --domain Network        # Only Network events
browse cdp <url> --domain Network --domain Console  # Multiple domains
browse cdp <url> --pretty                # Human-readable output
browse cdp <url> > events.jsonl          # Pipe to file
browse cdp <url> | jq '.method'          # Filter with jq
```

The `cdp` command connects directly to any Chrome DevTools Protocol target and streams events. It does **not** use the daemon — it's a standalone, long-running process. Press Ctrl+C to stop. Default domains: Network, Console, Runtime, Log, Page.

### Session management
```bash
browse stop                              # Stop the browser daemon
browse status                            # Check daemon status and resolved mode
browse tab list                          # List all open tabs
browse tab switch <index-or-target-id>   # Switch to tab by index or target ID
browse tab close [index-or-target-id]    # Close tab
```

### Typical workflow
If the environment matters, put `--local`, `--remote`, `--auto-connect`, or `--cdp <port|url>` on the first browser command.

1. `browse open <url> --local` or `browse open <url> --remote` — navigate to the page
2. `browse snapshot` — read the accessibility tree to understand page structure and get element refs
3. `browse click <ref>` / `browse type <text>` / `browse fill <selector> <value>` — interact using refs from snapshot
4. `browse snapshot` — confirm the action worked
5. Repeat 3-4 as needed
6. `browse stop` — close the browser when done

## Quick Example

```bash
browse open https://example.com
browse snapshot                          # see page structure + element refs
browse click @0-5                        # click element with ref 0-5
browse get title
browse stop
```

## Mode Comparison

| Feature | Local | Browserbase |
|---------|-------|-------------|
| Speed | Faster | Slightly slower |
| Setup | Chrome required | API key required |
| Reuse existing local cookies | With `browse open <url> --auto-connect` | N/A |
| Verified browser | No | Yes (Browserbase Verified browser via Identity) |
| CAPTCHA solving | No | Yes (automatic reCAPTCHA/hCaptcha) |
| Residential proxies | No | Yes (201 countries, geo-targeting) |
| Session persistence | No | Yes (cookies/auth persist via contexts) |
| Best for | Development/simple pages | Protected sites, Browserbase Identity + Verified access, production scraping |

## Best Practices

1. **Choose the local strategy deliberately**: use `browse open <url> --local` for clean state, `browse open <url> --auto-connect` for existing local credentials, and `browse open <url> --remote` for protected sites
2. **Always `browse open` first** before interacting
3. **Use `browse snapshot`** to check page state — it's fast and gives you element refs
4. **Only screenshot when visual context is needed** (layout checks, images, debugging)
5. **Use refs from snapshot** to click/interact — e.g., `browse click @0-5`
6. **`browse stop`** when done to clean up the browser session and clear the env override

## Troubleshooting

- **"No active page"**: Run `browse stop`, then check `browse status`. If it still says running, kill the zombie daemon with `pkill -f "browse.*daemon"`, then retry `browse open`
- **Chrome not found**: Install Chrome, use `browse open <url> --auto-connect` if you already have a debuggable Chrome running, or switch to `browse open <url> --remote`
- **Action fails**: Run `browse snapshot` to see available elements and their refs
- **Browserbase fails**: Verify API key is set

## Switching to Remote Mode

Switch to remote when you detect: CAPTCHAs (reCAPTCHA, hCaptcha, Turnstile), bot detection pages ("Checking your browser..."), HTTP 403/429, empty pages on sites that should have content, or the user asks for it.

Don't switch for simple sites (docs, wikis, public APIs, localhost).

```bash
browse open <url> --local          # clean isolated local browser
browse open <url> --auto-connect   # attach to existing debuggable Chrome
browse open <url> --remote         # Browserbase session
```

Mode flags are applied when a session starts. After `browse stop`, the next start falls back to env-var-based auto detection. Use `browse status` to inspect the resolved mode and target while the daemon is running.

For detailed examples, see [EXAMPLES.md](EXAMPLES.md).
For API reference, see [REFERENCE.md](REFERENCE.md).

© browserbase · MIT · browserbase/skills

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor