```
╔════════════════════════════════════════════════════════╗
║ ║
║ O P · B R O W S E T H E W E B ║
║ ║
║ agent-browser → playwright → chrome ║
║ ║
╚════════════════════════════════════════════════════════╝
```
### Autonomous web browsing for Claude Code. For $0.
**One skill file. Two free CLI tools. No subscriptions, no API keys, no MCP server.**
[](LICENSE)
[](https://docs.claude.com/en/docs/claude-code/skills)
[](#why-this-exists)
[](#token-discipline)
---
## Why this exists
Claude Code cannot browse the web out of the box. The usual fixes cost money or context:
| The usual way | The problem |
|---|---|
| Paid browser-automation SaaS | a subscription for something your machine can already do |
| A hosted MCP browser server | another running service, another key, another failure mode |
| Naive Playwright dumps | one full-page snapshot can eat thousands of tokens |
Browse Op is the boring answer: **a skill file that teaches Claude Code to drive two CLI tools it can already install for free** — with a strict token budget and a defined fallback ladder, so it degrades instead of dying.
## What you get
- **A three-tier ladder.** Fast path first, graceful fallback, human escape hatch.
- **Token discipline baked into the instructions**, not left to vibes: interactive-only compact snapshots, `get text` instead of re-snapshotting, re-snapshot only after real DOM changes.
- **A 288-line command reference** covering navigation, semantic locators, waits, cookies, network, auth vault, sessions, tabs, batch, and diff.
- **Explicit non-triggers**, so the skill stays out of the way when you want to watch a real browser instead.
## The ladder
```
Tier 1 agent-browser ← default. Rust-native daemon, persists between commands.
│ ~200-400 tokens per compact snapshot.
├─ fails? fresh session retry
▼
Tier 2 Playwright CLI ← fallback. Cross-browser (Firefox / WebKit),
│ open + screenshot + pdf + codegen.
├─ still failing?
▼
Tier 3 Claude in Chrome ← last resort, ASKS FOR CONSENT FIRST.
Your real, visible, logged-in browser.
```
Tier 3 is never entered silently. The skill is instructed to stop and ask.
## Install
```bash
# 1. the fast path (Tier 1)
npm i -g agent-browser
# 2. the fallback (Tier 2) — no install needed, npx fetches on demand
npx playwright --version
# 3. the skill itself
git clone https://github.com/vb-tyagi/OP-browse-the-web-skill.git
mkdir -p ~/.claude/skills/browse-op
cp OP-browse-the-web-skill/skill/*.md ~/.claude/skills/browse-op/
```
Restart Claude Code. Ask it to open a URL. That's the whole setup.
> **PATH note:** Claude Code's default shell often can't see Homebrew binaries, so every command in the skill is prefixed with
> `export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"`. Adjust for your platform if you install elsewhere.
## Token discipline
The reason this skill exists in a repo instead of a one-line prompt. The rules that keep browsing affordable:
- `snapshot -i -c` — interactive elements only, compact. Not the full DOM.
- `get text [` for specific content, instead of taking another snapshot.
- Chain with `&&` when intermediate output isn't needed.
- Re-snapshot **only** after a click, navigation, or form submit.
## What it can do
Navigate, read, click, fill, select, hover, press keys, wait on load states or specific elements, screenshot (plain or annotated for vision), save PDFs, run JavaScript, manage tabs, read and set cookies, inspect network requests, persist sessions, and diff two page states.
Full reference: [`skill/BROWSER_REFERENCE.md`](skill/BROWSER_REFERENCE.md).
## Credits
This skill is a **thin orchestration layer**. The heavy lifting belongs to others:
- **[agent-browser](https://github.com/vercel-labs/agent-browser)** by **Vercel Labs** (Apache-2.0) — the Rust-native browser CLI built for AI agents. Tier 1 is entirely its work.
- **[Playwright](https://playwright.dev)** by **Microsoft** (Apache-2.0) — the cross-browser fallback.
- **[Claude Code](https://docs.claude.com/en/docs/claude-code)** by **Anthropic** — the host this skill plugs into.
If Browse Op is useful to you, star those projects too. They did the hard part.
## License
MIT — see [LICENSE](LICENSE). The credited upstream tools keep their own licenses (Apache-2.0).
]