Skip to content
Skill

cdp

by browser-use

AI Summary

Custom codegen'd CDP SDK (every method from browserprotocol.json + jsprotocol.json gets a typed wrapper) plus a tiny HTTP server that holds one persistent CDP . The CLI auto-starts the server on first use and forwards JS snippets to it. The SDK lives in the skill's directory. In the rest of this d

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to install the "cdp" skill in my project.

Please run this command in my terminal:
# Install skill into your project
mkdir -p .claude/skills/browser-harness-js && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/browser-harness-js/SKILL.md "https://raw.githubusercontent.com/browser-use/browser-harness-js/main/SKILL.md"

Then restart Claude Code (or reload the window in Cursor) so the skill is picked up.

Description

Drive Chrome via the DevTools Protocol from JavaScript. Run JS snippets through the `browser-harness-js` CLI — it auto-spawns a long-lived bun HTTP server holding a fully-typed CDP `Session`, and every call (`browser-harness-js 'await session.Page.navigate(...)'`) executes against the same persistent connection. Session, active target, and globals survive across calls. Use when the user wants to automate, script, or inspect a Chrome browser via CDP — single tab or multi-tab, attach to existing Chrome or to a new one launched with --remote-debugging-port.

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: `bash

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

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted 2mo ago
Active
Adoption100+ stars on GitHub
464 ★ · Growing
DocsREADME + description
Well-documented

GitHub Signals

Stars464
Forks29
Issues1
Updated2mo ago
View on GitHub
MIT License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Claude Code
Cursor