This is a Chrome DevTools Protocol automation skill that keeps a persistent CDP session alive across multiple command line calls. Instead of reconnecting every time you want to script Chrome, you call `browser-harness-js` with a JavaScript snippet and it runs against the same WebSocket connection, session state, and globals you set previously. It auto-detects running Chrome instances by scanning profile directories (works across macOS, Linux, Windows), codegen's fully typed wrappers for all 652 CDP methods, and prints raw results to stdout without JSON envelope noise. Good for exploratory browser automation, multi-step scraping flows, or quick CDP experiments where you don't want to write a full Node script. The CLI spawns a Bun HTTP server in the background on first use and keeps it running until you explicitly stop it.

skills.sh installs
716
GitHub stars
498
last updated
Aug 21, 2026

Install

$ npx -y skills add browser-use/browser-harness-js --skill cdp --agent claude-code

Installs into .claude/skills of the current project.

Files

CDP — browser-harness-js skill

Custom codegen'd CDP SDK (every method from browser_protocol.json + js_protocol.json gets a typed wrapper) plus a tiny HTTP server that holds one persistent CDP Session. The browser-harness-js CLI auto-starts the server on first use and forwards JS snippets to it.

The SDK lives in the skill's sdk/ directory. In the rest of this doc, <skill-dir> refers to wherever npx skills add installed the skill (Claude Code: ~/.claude/skills/cdp; Cursor: ~/.cursor/skills/cdp; other agents vary). The CLI should be on PATH as browser-harness-js.

Setup (once, first use)

npx skills add drops the skill into your agent's skills directory but does NOT put the CLI on PATH. Before the first call, verify it's reachable and symlink it into any directory on your PATH if not:

# macOS (Apple Silicon + Homebrew)
command -v browser-harness-js >/dev/null || ln -sf <skill-dir>/sdk/browser-harness-js /opt/homebrew/bin/browser-harness-js

# macOS (Intel) / most Linux — may need sudo
command -v browser-harness-js >/dev/null || ln -sf <skill-dir>/sdk/browser-harness-js /usr/local/bin/browser-harness-js

Sponsors

Details

Repository
github.com/browser-use/browser-harness-js
Categories
Backend & APIs, Debugging, Automation & Workflows, CLI & Terminal
First seen
Jun 3, 2026
1everyinc avatardhh-rails-styleeveryinc/compound-engineering-pluginThis skill should be used when writing Ruby and Rails code in DHH's distinctive 37signals style. It applies when writing Ruby code, Rails applications, creating716skills.sh installs
2machina-sports avatarcbb-datamachina-sports/sports-skillsCollege Basketball (CBB) data via ESPN public endpoints and the NCAA's official endpoints — scores, standings, rosters, schedules, game summaries, play-by-play,705skills.sh installs
3syncfusion avatarsyncfusion-react-data-managersyncfusion/react-ui-components-skillsImplements Syncfusion DataManager for local/remote binding, CRUD, querying, caching, and middleware. Supports JsonAdaptor, ODataAdaptor, ODataV4Adaptor, UrlAdap702skills.sh installs
4mindrally avatarmonorepo-tamaguimindrally/skillsMonorepo development guidelines using Tamagui, Turbo, Next.js, Expo, Supabase, and cross-platform best practices.701skills.sh installs
5machina-sports avatarwnba-datamachina-sports/sports-skillsWNBA data via ESPN public endpoints — scores, standings, rosters, schedules, game summaries, play-by-play, win probability, injuries, transactions, futures, tea699skills.sh installs
6patricio0312rev avatarpostman-collection-generatorpatricio0312rev/skillsGenerates Postman collection JSON files from Express, Next.js, Fastify, Hono, or other API routes. Scans route definitions, extracts endpoints, methods, params,699skills.sh installs