chrome-cdp

chrome-cdp is a skill for Claude Code, Codex from pasky/chrome-cdp-skill. It costs 33 tokens per session (813 once invoked), scanned A, original, MIT.

A command-line tool for inspecting and controlling pages in a local Chrome-based browser session through Chrome DevTools Protocol.

In plain words
What is it for?
Use it to list pages, take viewport screenshots, view accessibility information, and run JavaScript in a selected page.
Why use it?
It lets an agent work with already-open browser pages without adding a browser automation framework. Remote debugging must be enabled first.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

not rated 3.3krepo +2 4mo ago A scan Socket: passSnyk: warnSkillSpector: pass 33 tokens original MIT

Good fit Use it to list pages, take viewport screenshots, view accessibility information, and run JavaScript in a selected page.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pasky/chrome-cdp-skill/chrome-cdp
About the project

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.

pasky/chrome-cdp-skill · 3,285 stars · on GitHub

Install

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.

Any agent
npx skills add pasky/chrome-cdp-skill --skill chrome-cdp
Clone the repo
git clone --depth 1 https://github.com/pasky/chrome-cdp-skill

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for chrome-cdp

README.md
[![agentmods](https://agentmods.dev/badge/skills/pasky/chrome-cdp-skill/chrome-cdp/github.svg)](https://agentmods.dev/skills/pasky/chrome-cdp-skill/chrome-cdp)
Your own site
<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.

agentmods 80×15 button for chrome-cdp

Your own site · 80×15
<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>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 813 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 16 Sept 2026
  • Snyk warn 16 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 2mo ago against content hash a682214143bd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/cdp.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Origin

Copies of this mod

3 near-identical copies found in the catalogue:

skills/chrome-cdp/SKILL.md · 78 lines

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-debugging and toggle the switch
  • Node.js 22+ (uses built-in WebSocket)
  • If your browser's DevToolsActivePort is in a non-standard location, set CDP_PORT_FILE to 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 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.

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)

Read the full file on GitHub · 78 lines

Files

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.

Changes

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.

  1. 2mo ago First seen · 78 lines · 33 tokens per session scan A a682214143bd

Subscribe to this mod's changes

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.

Related

chrome-cdp compared with skills from other repositories

chrome-cdp next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
chrome-cdppasky/chrome-cdp-skillSkill3.3k4mo agoMITA33Claude Code, Codex
interactive-loginyc-software/qmSkill16ktodayMITA46Claude Code, Codex
pinchtab-mcppinchtab/pinchtabSkill11k10d agoMITA52Claude Code, Codex
azure-messaging-webpubsub-javamicrosoft/skillsSkill3.2kyesterdayMITA43Claude Code
cua-driverdavidondrej/skillsSkill4.3k3d agoMITA68Claude Code, Codex
open-design-browsercompozy/compozySkill2.8ktodayMITA56Claude Code, Codex
southwestborski/travel-hacking-toolkitSkill895todayMITA40Claude Code