Tooluck logoTooluck
SKILL.md

chrome-cdp

Agent skill frompasky/chrome-cdp-skill

Interact with local Chrome browser session (only on explicit user approval after being asked to inspect, debug, or interact with a page open in Chrome)

How to install chrome-cdp

install chrome-cdp
# install the chrome-cdp-skill pack with the skills CLI
npx skills add pasky/chrome-cdp-skill

# or add only this skill to Claude Code: copy the folder

skills/chrome-cdp/

# into

~/.claude/skills/chrome-cdp/ (all projects)

.claude/skills/chrome-cdp/ (one project)

skills/chrome-cdp/SKILL.md

MITFull file
1# Chrome CDP
2
3Lightweight Chrome DevTools Protocol CLI. Connects directly via WebSocket — no Puppeteer, works with 100+ tabs, instant connection.
4
5## Prerequisites
6
7- Chrome (or Chromium, Brave, Edge, Vivaldi) with remote debugging enabled: open `chrome://inspect/#remote-debugging` and toggle the switch
8- Node.js 22+ (uses built-in WebSocket)
9- If your browser's `DevToolsActivePort` is in a non-standard location, set `CDP_PORT_FILE` to its full path
10
11## Commands
12
13All 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.
14
15### List open pages
16
17```bash
18scripts/cdp.mjs list
19```
20
21### Take a screenshot
22
23```bash
24scripts/cdp.mjs shot <target> [file] # default: screenshot-<target>.png in runtime dir
25```
26
27Captures 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).
28
29### Accessibility tree snapshot
30
31```bash
32scripts/cdp.mjs snap <target>
33```
34
35### Evaluate JavaScript
36
37```bash
38scripts/cdp.mjs eval <target> <expr>
39```
40
41> **Watch out:** avoid index-based selection (`querySelectorAll(...)[i]`) across multiple `eval` calls when the DOM can change between them (e.g. after clicking Ignore, card indices shift). Collect all data in one `eval` or use stable selectors.
42
43### Other commands
44
45```bash
46…

Excerpt shown under the repository's MIT license.

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates