chrome-cdp is a skill that lets an AI coding agent connect to an already running Chrome session, including its open tabs, logged-in accounts, and current page state. It is for agents that need to inspect or interact with the browser a person is already using.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add pasky/chrome-cdp-skill --skill chrome-cdpgit clone --depth 1 https://github.com/pasky/chrome-cdp-skillWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/pasky/chrome-cdp-skill/chrome-cdp)<a href="https://agentmods.dev/skills/pasky/chrome-cdp-skill/chrome-cdp"><img src="https://agentmods.dev/badge/skills/pasky/chrome-cdp-skill/chrome-cdp/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/pasky/chrome-cdp-skill/chrome-cdp"><img src="https://agentmods.dev/badge/skills/pasky/chrome-cdp-skill/chrome-cdp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk warn
- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00033 | $0.00813 |
| Opus 5.5 | $0.00013 | $0.00325 |
| Sonnet 5.5 | $0.00007 | $0.00163 |
| Haiku 4.5 | $0.00003 | $0.00081 |
Grade A, and why
chrome-cdp scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
3 near-identical copies found in the catalogue:
- chrome-cdp — 100% identical, 0 lines differ
- chrome-cdp — 100% identical, 0 lines differ
- chrome-cdp — 86% identical, 7 lines differ
How it starts
The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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>
Watch out: avoid index-based selection (
querySelectorAll(...)[i]) across multipleevalcalls when the DOM can change between them (e.g. after clicking Ignore, card indices shift). Collect all data in oneevalor use stable selectors.
Other commands
scripts/cdp.mjs html <target> [selector] # full page or element HTML
scripts/cdp.mjs nav <target> <url> # navigate and wait for load
scripts/cdp.mjs net <target> # resource timing entries
scripts/cdp.mjs click <target> <selector> # click element by CSS selector
scripts/cdp.mjs clickxy <target> <x> <y> # click at CSS pixel coords
scripts/cdp.mjs type <target> <text> # Input.insertText at current focus; works in cross-origin iframes unlike eval
scripts/cdp.mjs loadall <target> <selector> [ms] # click "load more" until gone (default 1500ms between clicks)
scripts/cdp.mjs evalraw <target> <method> [json] # raw CDP command passthrough
scripts/cdp.mjs open [url] # open new tab (each triggers Allow prompt)
scripts/cdp.mjs stop [target] # stop daemon(s)
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 78 lines · 33 tokens per session scan A a682214143bd
chrome-cdp is a skill published in the GitHub repository pasky/chrome-cdp-skill (3,285 stars, last pushed 4mo ago), licensed MIT. It adds 33 tokens to every session and 813 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
chrome-cdp compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| chrome-cdppasky/chrome-cdp-skill | Skill | 3.3k | 4mo ago | MIT | A | 33 | Claude Code, Codex |
| interactive-loginyc-software/qm | Skill | 16k | today | MIT | A | 46 | Claude Code, Codex |
| pinchtab-mcppinchtab/pinchtab | Skill | 11k | 10d ago | MIT | A | 52 | Claude Code, Codex |
| azure-messaging-webpubsub-javamicrosoft/skills | Skill | 3.2k | yesterday | MIT | A | 43 | Claude Code |
| cua-driverdavidondrej/skills | Skill | 4.3k | 3d ago | MIT | A | 68 | Claude Code, Codex |
| open-design-browsercompozy/compozy | Skill | 2.8k | today | MIT | A | 56 | Claude Code, Codex |
| southwestborski/travel-hacking-toolkit | Skill | 895 | today | MIT | A | 40 | Claude Code |