cdp

Drive Chrome via typed CDP SDK wrappers over a persistent session.

476|34|Updated Apr 18, 2026
One-click install
npx skills add https://github.com/browser-use/browser-harness-js --skill cdp-browser-use
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cdp
Source: https://github.com/browser-use/browser-harness-js/tree/main
Command: npx skills add https://github.com/browser-use/browser-harness-js --skill cdp-browser-use

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Drive Chrome via the DevTools Protocol from JavaScript. The skill provides a thinnest possible bridge to Chrome with a fully typed, code-generated SDK and a tiny HTTP server that maintains a single persistent CDP Session for reliable automation.

Core Features & Use Cases

  • Typed CDP SDK with 56 domains and 652 wrappers, enabling direct access to Chrome's methods without bespoke helpers.
  • One persistent WebSocket connection and a codegen-driven surface that regenerates bindings from the upstream protocol JSON.
  • CLI integration and routing: a Bun-based server that forwards snippets to Chrome, with events, target routing, and session management.
  • Reuse across tasks and targets: attach to existing browsers or launch new ones, driving single-tab or multi-tab automation.
  • See interaction-skills/ for recipes and the ethos of pure CDP access (no click/goto helpers).

Quick Start

Install the skill, start the server, connect to a running or new Chrome instance, and drive CDP methods with typed wrappers (for example navigate to a URL).

Frequently Asked Questions about cdp

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate Chrome browser control using the DevTools Protocol in JavaScript?

Use a typed CDP SDK that maintains a single persistent WebSocket session for deterministic automation. You access browser methods directly through generated wrappers like session.Page.navigate without needing bespoke helpers.

What is a typed CDP SDK for browser automation and how does it work?

A typed CDP SDK provides codegen-generated bindings from browser_protocol.json and js_protocol.json, exposing 56 domains and 652 typed wrappers. It connects through a Bun-based HTTP server that forwards snippets to Chrome.

Can I attach to an existing Chrome instance for multi-tab automation?

Yes, you can attach to an existing running Chrome instance or launch a new one to drive single-tab or multi-tab automation. The server handles target routing and session management across CDP domains.

Do I need bespoke helpers or click and goto functions for CDP automation?

No, this approach provides pure CDP access without click or goto helpers. You interact directly with Chrome's methods using typed session wrappers, offering the thinnest possible bridge to the DevTools Protocol.

What is the best way to ensure deterministic browser automation across CDP domains?

Maintain a single persistent CDP session over one WebSocket connection. This ensures deterministic automation across 56 domains by routing all operations through a stable, codegen-driven typed surface.

Why use codegen-generated bindings for Chrome DevTools Protocol instead of manual wrappers?

Codegen generates typed bindings directly from upstream protocol JSON files, ensuring full coverage of 652 wrappers across 56 domains. This regenerable surface prevents drift and provides direct, typed access without manual maintenance.