A Claude Skill to give your agent the ability to use a web browser
Overview
A browser automation tool that lets AI agents and developers control browsers with sandboxed JavaScript scripts. - - Scripts run in a QuickJS WASM sandbox with no host access - - Navigate once, interact across multiple scripts - - Connect to your running Chrome or launch a fresh Chromium - - goto, click, fill, locators, evaluate, screenshots, and more https://github.com/user-attachments/assets/c6cf7fb9-b1dc-46ed-93b9-6e7240990c53 To attach to a running Chrome instance on Windows: Windows npm installs download the native dev-browser-windows-x64.exe release asset during postinstall, and the generated npm shims invoke that executable directly. After installing, tell your agent to run dev-browser --help — the help output includes the current LLM usage guide and API reference. For agents that discover local skills, install or refresh the embedded skill explicitly: Flags may be combined. With an interactive terminal, dev-browser install-skill prompts for targets.
README
Brought to you by Do Browser.
A browser automation tool that lets AI agents and developers control browsers with sandboxed JavaScript scripts.
Key features:
- Sandboxed execution - Scripts run in a QuickJS WASM sandbox with no host access
- Persistent pages - Navigate once, interact across multiple scripts
- Auto-connect - Connect to your running Chrome or launch a fresh Chromium
- Full Playwright API - goto, click, fill, locators, evaluate, screenshots, and more
Demo
https://github.com/user-attachments/assets/c6cf7fb9-b1dc-46ed-93b9-6e7240990c53
CLI Installation
npm install -g dev-browser
dev-browser install # installs Playwright + Chromium
Quick start
# Launch a headless browser and run a script
dev-browser --headless <<'EOF'
const page = await browser.getPage("main");
await page.goto("https://example.com", { waitUntil: "domcontentloaded" });
console.log(await page.title());
EOF
# Connect to your running Chrome (enable at chrome://inspect/#remote-debugging)
dev-browser --connect <<'EOF'
const tabs = await browser.listPages();
console.log(JSON.stringify(tabs, null, 2));
EOF
PowerShell (Windows)
@"
const page = await browser.getPage("main");
await page.goto("https://example.com", { waitUntil: "domcontentloaded" });
console.log(await page.title());
"@ | dev-browser
With --connect:
@"
const page = await browser.getPage("main");
console.log(await page.title());
"@ | dev-browser --connect
Windows notes
PowerShell install:
npm install -g dev-browser
dev-browser install
To attach to a running Chrome instance on Windows:
chrome.exe --remote-debugging-port=9222
dev-browser --connect
Windows npm installs download the native dev-browser-windows-x64.exe release asset during postinstall, and the generated npm shims invoke that executable directly.
Using with AI agents
After installing, tell your agent to run dev-browser --help — the help output includes the current LLM usage guide and API reference.
For agents that discover local skills, install or refresh the embedded skill explicitly:
dev-browser install-skill --codex # ~/.codex/skills/dev-browser/SKILL.md
dev-browser install-skill --claude # ~/.claude/skills/dev-browser/SKILL.md
dev-browser install-skill --agents # ~/.agents/skills/dev-browser/SKILL.md
Flags may be combined. With an interactive terminal, dev-browser install-skill prompts for targets. In non-interactive environments it updates all three locations, including Codex, so an older copied skill does not survive a CLI upgrade.
Script API
Scripts run in a sandboxed QuickJS runtime (not Node.js). Available globals:
// Browser control
browser.getPage(nameOrId) // Get/create named page, or connect to tab by targetId
browser.newPage() // Create anonymous page (cleaned up after script)
browser.listPages() // List all tabs: [{id, url, title, name}]
browser.closePage(name) // Close a named page
// File I/O (restricted to ~/.dev-browser/tmp/)
await saveScreenshot(buf, name) // Save screenshot buffer, returns path
await writeFile(name, data) // Write file, returns path
await readFile(name) // Read file, returns content
// Output
console.log/warn/error/info // Routed to CLI stdout/stderr
Pages are full Playwright Page objects — goto, click, fill, locator, evaluate, screenshot, and everything else, including page.snapshotForAI({ track?, depth?, timeout? }), which returns { full, incremental? } for AI-friendly page snapshots.
Every page also exposes two computer-use toolsets:
page.cua.*— pixel/vision tier:screenshot()saves a JPEG whose pixels map 1:1 onto CSS coordinates at any DPR and returns{ path, width, height };click,doubleClick,drag,move,scroll,keypress, andtypeact at those coordinates.page.domCua.*— DOM-id tier:getVisibleDom()snapshots visible interactive elements as pseudo-HTML lines withnode_id=N;click,doubleClick, andscrollact by node id (ids are only valid against the latest snapshot of the current document), plustypeandkeypressfor the focused element.
Benchmarks
| Method | Time | Cost | Turns | Success |
|---|---|---|---|---|
| Dev Browser | 3m 53s | $0.88 | 29 | 100% |
| Playwright MCP | 4m 31s | $1.45 | 51 | 100% |
| Playwright Skill | 8m 07s | $1.45 | 38 | 67% |
| Claude Chrome Extension | 12m 54s | $2.81 | 80 | 100% |
See dev-browser-eval for methodology.
License
MIT
Author
Recommended Tools
Try a different keyword or remove a filter.
Install
npx skillfish add sawyerhood/dev-browser