
Chrome Cdp
A lean CDP client that lets Claude inspect and control your actual Chrome tabs without spinning up Puppeteer or a headless browser. You run commands to list open tabs, grab screenshots, dump accessibility trees, or eval JavaScript against whatever's already running locally. Works across 100+ tabs, instant WebSocket connection. The coordinate system is worth noting: screenshots are at native resolution (CSS pixels times DPR) but click commands take CSS pixels, so you'll divide by DPR when translating positions. Useful when you want Claude to debug a live page, grab state from an existing session, or automate something in a tab you already have open. Chrome shows a one-time allow prompt per tab, then a daemon keeps the session alive.
- skills.sh installs
- 2.1K
- GitHub stars
- 3.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add pasky/chrome-cdp-skill --skill chrome-cdp --agent claude-codeInstalls into .claude/skills of the current project.
Files
Chrome CDP
Lightweight Chrome DevTools Protocol CLI. Connects directly via WebSocket — no Puppeteer, works with 100+ tabs, instant connection.
Prerequisites
- Chrome (or Chromium, Brave, Edge, Vivaldi) with remote debugging enabled: open
chrome://inspect/#remote-debuggingand toggle the switch - Node.js 22+ (uses built-in WebSocket)
- If your browser's
DevToolsActivePortis in a non-standard location, setCDP_PORT_FILEto its full path
Commands
All commands use scripts/cdp.mjs. The <target> is a unique targetId prefix from list; copy the full prefix shown in the list output (for example 6BE827FA). The CLI rejects ambiguous prefixes.
List open pages
scripts/cdp.mjs list
Take a screenshot
scripts/cdp.mjs shot <target> [file] # default: screenshot-<target>.png in runtime dir
Captures the viewport only. Scroll first with eval if you need content below the fold. Output includes the page's DPR and coordinate conversion hint (see Coordinates below).
Accessibility tree snapshot
scripts/cdp.mjs snap <target>
Evaluate JavaScript
scripts/cdp.mjs eval <target> <expr>
Sponsors
Details
- Repository
- github.com/pasky/chrome-cdp-skill
- Categories
- Debugging, Automation & Workflows