chrome-cdp

chrome-cdp is a skill for Claude Code, Codex from MatrixAges/polywise. It costs 34 tokens per session (799 once invoked), scanned A, original, MIT.

A command-line tool that connects to Chrome or another Chromium browser through the Chrome DevTools Protocol, a built-in interface for inspecting and controlling browser pages.

In plain words
What is it for?
It is for listing open pages, taking viewport screenshots, viewing accessibility trees, and running JavaScript in selected pages.
Why use it?
It allows page inspection and interaction without adding a browser automation library such as Puppeteer.

Skill for Claude CodeCodex

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.

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

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/matrixages/polywise/chrome-cdp.svg)](https://agentmods.dev/skills/matrixages/polywise/chrome-cdp)
Your own site
<a href="https://agentmods.dev/skills/matrixages/polywise/chrome-cdp"><img src="https://agentmods.dev/badge/skills/matrixages/polywise/chrome-cdp.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 799 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00034 $0.00799
Opus 5 $0.00017 $0.00400
Sonnet 5 $0.00007 $0.00160
Haiku 4.5 $0.00003 $0.00080

Measured today against content hash acb2ac8d1b04, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 today.

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.

.opencode/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. Direct connection via WebSocket, no Puppeteer required, supports 100+ tabs, instant connection.

Prerequisites

  • Chrome (or Chromium, Brave, Edge, Vivaldi) with remote debugging enabled: open chrome://inspect/#remote-debugging and turn on the switch
  • Node.js 22+ (uses built-in WebSocket)
  • If the browser's DevToolsActivePort is in a non-standard location, set CDP_PORT_FILE to its full path

Commands

All commands use scripts/cdp.mjs. <target> is the unique targetId prefix from list output; copy the full prefix shown (e.g., 6BE827FA). CLI rejects ambiguous prefixes.

List Open Pages

scripts/cdp.mjs list

Screenshot

scripts/cdp.mjs shot <target> [file]    # Default: screenshot-<target>.png in runtime directory

Only captures the viewport. If content outside the viewport is needed, use eval to scroll first. Output includes page DPR and coordinate transformation hints (see Coordinates section below).

Accessibility Tree Snapshot

scripts/cdp.mjs snap <target>

Execute JavaScript

scripts/cdp.mjs eval <target> <expr>

Note: Avoid using index-based selections (querySelectorAll(...)[i]) across multiple eval calls, as DOM may change between calls (e.g., after ignoring clicks, 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 complete
scripts/cdp.mjs net     <target>               # Resource timing entries
scripts/cdp.mjs click   <target> <selector>    # Click element via CSS selector
scripts/cdp.mjs clickxy <target> <x> <y>       # Click at CSS pixel coordinates
scripts/cdp.mjs type    <target> <text>         # Type text at current focus; works in cross-origin iframes
scripts/cdp.mjs loadall <target> <selector> [ms]  # Repeatedly click "load more" until it disappears (default 1500ms interval)
scripts/cdp.mjs evalraw <target> <method> [json]  # Raw CDP command passthrough
scripts/cdp.mjs open    [url]                  # Open new tab (allows prompt per trigger)
scripts/cdp.mjs stop    [target>               # Stop daemon

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. today First seen · 78 lines · 34 tokens per session scan A acb2ac8d1b04

Subscribe to this mod's changes

chrome-cdp is a skill published in the GitHub repository MatrixAges/polywise (659 stars, last pushed 2mo ago), licensed MIT. It adds 34 tokens to every session and 799 once invoked, about $0.0002 per session on Opus 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-09-04.

Related

Other skills, from other repositories

computer-use

Read and drive native desktop applications through the accessibility layer — list on-screen apps, snapshot one window as a numbered element tree, then click / type / set a value / scroll / drag / run a named action, by element index or by screen coordinates. Use for work in a desktop app rather than a web page. Full…

kirodotdev/KiroCrew · 105 tokens

feature-demo-recording

Record a demo video of a web feature from a real browser. Two modes -- a NARRATED film where measured voiceover drives the timeline (designed slides, subtitles, punch-in camera, rendered from an HTML timeline), and a SILENT evidence clip for a PR or a QA pass. Use when the user asks to record a video, demo, or screen…

kirodotdev/KiroCrew · 90 tokens

web-browse

Open a REAL external web page so the user can see it in Kiro Crew's Browser panel. PRIMARY path is the browser MCP tool (drives the built-in native panel); playwright-cli is the fallback for remote/plain-browser sessions and for attached logged-in browsers. Use when the user wants to VIEW / verify / "show me" an…

kirodotdev/KiroCrew · 93 tokens

web-verify

Look at your OWN front-end change before claiming it works -- navigate the loopback URL of a dev server or pod you started, screenshot the surface you changed, read the image to judge it, and embed it in chat. Three capture backends: playwright-cli (the session the dashboard Browser panel shows), the agent-browser CLI…

kirodotdev/KiroCrew · 0 tokens

browser-auth

Browse sites that need a logged-in session with playwright-cli, using attach mode, saved storage state, or individual cookies. Use when a page is behind a login wall and a plain open lands on a sign-in screen.

kirodotdev/KiroCrew · 47 tokens

browser-recording

Record a browser flow as a video/GIF for evidence — animations, transitions, and multi-step interactions that a still screenshot cannot prove. Drives the project's own Playwright through a bundled runner, then converts to mp4 + GIF via ffmpeg. Use when the user asks to record a demo, capture a GIF or video of the UI…

kirodotdev/KiroCrew · 85 tokens