chrome-cdp

Inspect and control local Chrome tabs via the DevTools Protocol over WebSocket.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/alex-jordan547/agent-setup --skill chrome-cdp-alex-jordan547
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: chrome-cdp
Source: https://github.com/alex-jordan547/agent-setup/tree/main/skills/chrome-cdp
Command: npx skills add https://github.com/alex-jordan547/agent-setup --skill chrome-cdp-alex-jordan547

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Debugging or interacting with a page already open in your local Chrome normally requires heavy automation frameworks like Puppeteer that launch their own browser instance. This Skill connects directly to your running Chrome session over the DevTools Protocol, letting you inspect, screenshot, and interact with any of 100+ open tabs without restarting the browser. ## Core Features & Use Cases - Page Inspection: List open tabs, capture viewport screenshots, dump accessibility trees, and extract full or selector-scoped HTML. - Browser Interaction: Navigate to URLs, click elements by CSS selector or coordinates, type text (including into cross-origin iframes), and auto-click "load more" buttons until content is exhausted. - JavaScript & Network Access: Evaluate arbitrary JS expressions, read resource timing entries, and send raw CDP commands for anything not covered by built-in commands. - Use Case: You are debugging a broken layout on a page already open in Chrome. List the tabs, take a screenshot to see the rendering, snapshot the accessibility tree to find the faulty element, and evaluate a JS expression to inspect its computed styles — all without leaving your session. ## Quick Start Ask the agent to list your open Chrome tabs and take a screenshot of the page you want to inspect. Note: requires Chrome with remote debugging enabled (chrome://inspect/#remote-debugging) and Node.js 22+; each tab prompts for one-time debugging approval in the browser.

Frequently Asked Questions about chrome-cdp

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect to an already open Chrome tab for debugging?

Enable remote debugging at chrome://inspect/#remote-debugging, then run the list command to see open pages with their target IDs. Subsequent commands attach to a tab by its unique target prefix through a persistent per-tab daemon.

How to take a screenshot of a Chrome page using the DevTools Protocol?

Run the shot command with a target prefix to capture the viewport as a PNG at native resolution. The output reports the device pixel ratio so you can convert screenshot pixels to CSS pixels for coordinate-based clicks.

Does this work without Puppeteer or Playwright?

Yes, it communicates with Chrome using raw CDP over the built-in WebSocket client in Node.js 22+, with no npm dependencies. It attaches to your existing browser session instead of launching a new controlled instance.

Which browsers support Chrome DevTools Protocol remote debugging?

Chrome, Chromium, Brave, Edge, and Vivaldi are supported across macOS, Linux, Flatpak, and Windows. The tool locates the DevToolsActivePort file automatically, or you can set CDP_PORT_FILE for non-standard locations.

Why does Chrome show an Allow debugging prompt for each tab?

Chrome requires one-time user approval per tab when a debugger first attaches. A background daemon holds the session open afterward, so later commands need no further approval, and daemons exit after 20 minutes idle.

How do I type text into a cross-origin iframe in Chrome?

Focus the field with click or clickxy, then use the type command, which sends Input.insertText at the current focus. This works in cross-origin iframes where eval-based DOM manipulation is blocked.