Interact with local Chrome browser session (only on explicit user approval after being asked to inspect, debug, or interact with a page open in Chrome)
The chrome-cdp skill provides direct access to Chrome browser sessions through the Chrome DevTools Protocol (CDP). It enables AI agents to inspect, debug, and interact with web pages currently open in your local Chrome browser, but only with explicit user approval. This lightweight CLI tool connects directly via WebSocket without requiring heavy dependencies like Puppeteer, making it fast and capable of working with 100+ open tabs simultaneously.
The skill offers comprehensive browser automation capabilities including taking screenshots of the viewport, capturing accessibility tree snapshots, evaluating JavaScript in page context, extracting HTML content, navigating to URLs, monitoring network activity, and simulating user interactions like clicking elements and typing text. It handles both CSS selector-based interactions and coordinate-based clicks, with built-in support for high-DPI displays. The tool maintains persistent daemon sessions per tab to avoid repeated authorization prompts while automatically cleaning up inactive sessions after 20 minutes.
This skill is ideal for developers debugging web applications, QA engineers automating browser testing, accessibility specialists auditing page structures, and anyone needing programmatic access to browser state without heavyweight automation frameworks. It's particularly useful for quick inspections, one-off automations, and situations where you need to interact with already-open browser tabs rather than launching new browser instances.
The skill works with Chrome, Chromium, Brave, Edge, and Vivaldi. You must enable remote debugging by opening chrome://inspect/#remote-debugging and toggling the switch. Node.js 22+ is also required.
Chrome shows this security modal once per tab when first accessed. After approval, a background daemon keeps the session alive so subsequent commands don't require further authorization. Daemons automatically exit after 20 minutes of inactivity.
Screenshots are saved at native resolution (CSS pixels × DPR). To convert screenshot coordinates to CSS pixels for clickxy commands, divide by the DPR value printed by the shot command. For example, on Retina displays (DPR=2), divide coordinates by 2.
The type command uses Input.insertText and works in cross-origin iframes where eval cannot access the DOM. First use click or clickxy to focus the element, then use type to enter text.
Screenshots only capture the visible viewport. To capture content below the fold, first use the eval command to scroll the page, then take the screenshot. The same applies for interacting with off-screen elements.
Quick Setup:
.claude/skills/Repository
pasky/chrome-cdp-skill