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-code

Installs 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-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>

Sponsors

Details

Repository
github.com/pasky/chrome-cdp-skill
Categories
Debugging, Automation & Workflows

Recommended

More Debugging
1anthropics avatarclean-data-xlsanthropics/financial-servicesClean up messy spreadsheet data — trim whitespace, fix inconsistent casing, convert numbers-stored-as-text, standardize dates, remove duplicates, and flag mixed2.1Kskills.sh installs
2anthropics avatarsetup-zoom-oauthanthropics/knowledge-work-pluginsImplement Zoom authentication correctly. Use when setting up app credentials, choosing an OAuth grant, requesting scopes, handling token refresh, or debugging a2.1Kskills.sh installs
3anthropics avatarbuild-zoom-contact-center-appanthropics/knowledge-work-pluginsReference skill for Zoom Contact Center. Use after routing to a contact-center workflow when implementing app, web, or native integrations; engagement context a2.1Kskills.sh installs
4anthropics avatarbuild-zoom-virtual-agentanthropics/knowledge-work-pluginsReference skill for Zoom Virtual Agent. Use after routing to a virtual-agent workflow when implementing web embeds, Android or iOS wrapper integrations, knowled2.1Kskills.sh installs
5davila7 avatarsenior-frontenddavila7/claude-code-templatesComprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component sc2.1Kskills.sh installs
6mindrally avatarmachine-learningmindrally/skillsMachine learning development with JAX, functional programming patterns, and high-performance computing.2.1Kskills.sh installs