chrome-cdp skill
A skill for Amp, Claude Code and Cursor: the agent drives your live Chrome with its open tabs and signed-in accounts through a single debugging toggle
- 3,284 ★ on the repository
- Last commit
- MIT
Broad access
Why this level
- The agent gets access to tabs where you are signed in to mail, GitHub and work services and sees their content
- The eval, click and type commands run code and actions on real pages with your rights
- Enabled Chrome remote debugging opens a port through which the browser can be controlled while it is on
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/chrome-cdpDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- The agent gets access to tabs where you are signed in to mail, GitHub and work services and sees their content
- The eval, click and type commands run code and actions on real pages with your rights
- Enabled Chrome remote debugging opens a port through which the browser can be controlled while it is on
This is third-party code. Review the repository files before installing.
What it does
chrome-cdp is a skill with a small command-line tool, cdp.mjs, that connects straight to Chrome's remote debugging WebSocket and gives the agent access to the tabs you have open right now. No separate browser starts, Puppeteer is not needed and you do not sign in again: the agent sees pages where you are already authorized and the state mid-workflow. It works with Chrome, Chromium, Brave, Edge and Vivaldi on macOS, Linux and Windows. The tool commands: list shows tabs, shot captures a viewport screenshot, snap returns a compact accessibility tree, html returns page or fragment markup, eval runs JavaScript, nav navigates to a URL, click and clickxy click by selector or coordinates, type enters text, loadall presses load more until it disappears and evalraw passes raw CDP commands through. Each tab gets a background process that holds the session. Chrome's allow-debugging prompt appears once per tab, and the process exits after 20 minutes of inactivity.
Who it is for. For developers and testers who need the agent to debug a page in their working browser, where sign-in and setup are already done.
Good fit when
- You need to inspect a page that is only available after sign-in: Gmail, GitHub or an internal tool
- You need the live state of a page mid-scenario, not after a clean reload
- You have over a hundred tabs open and Puppeteer-based tools hang while enumerating them
- You need a tab accessibility tree or network timings for debugging
- You need to press load more on a long feed until it is exhausted
Not a fit when
- You need an isolated browser without your sign-ins: this skill connects to your live session
- You need headless automation in CI: the skill expects a running Chrome with debugging enabled
- The agent must not see mail and work services open in other tabs
- Node.js 22 is unavailable: the tool uses the built-in WebSocket
Example request
List my open Chrome tabs, find the admin dashboard tab and take an accessibility snapshot to locate the export buttonLimitations
Needs Node.js 22 or later and remote debugging enabled at chrome://inspect/#remote-debugging. A screenshot captures only the viewport, so for content below the fold you scroll first with eval. If the browser DevToolsActivePort file is in a non-standard place, set its path in the CDP_PORT_FILE variable. The SKILL.md allows browser work only with explicit user approval, and before touching a tab the agent waits for the confirmation in Chrome's prompt. The description covers installation through pi; for other agents you copy the skill by hand.
How to disable. Delete the skills/chrome-cdp folder from the agent skills directory and switch the toggle off at chrome://inspect/#remote-debugging. Background processes exit on their own after 20 minutes of inactivity; the stop command ends them right away.
FAQ
How do I connect an agent to an already open Chrome?
Open chrome://inspect/#remote-debugging and switch the toggle on. Nothing else needs installing except Node.js 22 or later. The tool finds Chrome, Chromium, Brave, Edge and Vivaldi on macOS, Linux and Windows by itself.
How do I install chrome-cdp in Claude Code?
Copy or clone the skills/chrome-cdp directory to wherever the agent loads skills from. For pi there is pi install git:github.com/pasky/chrome-cdp-skill@v1.0.1. No npm install is needed.
How is chrome-cdp different from chrome-devtools-mcp?
Chrome-devtools-mcp reconnects on every command, so the allow-debugging prompt can reappear repeatedly and tab enumeration times out with many tabs. Chrome-cdp keeps one background process per tab: the prompt fires once and 100+ tabs run reliably.
What can the agent see?
Any tab you have allowed: pages with your sign-ins, the live DOM and network timings. Access to each tab is requested separately in a Chrome prompt, but once approved the agent can run code on the page.
How do I stop the background processes?
The cdp.mjs stop command ends the processes for all tabs, or for one tab if you name it. Otherwise they exit on their own after 20 minutes without commands.
Discussion
No questions or reviews yet.
Related
SkillsA Claude Code plugin that drives your Chrome over the DevTools Protocol: tabs, forms, page extraction and screenshots with no third-party dependencies
A CLI, skill and MCP server for driving Chrome with short Puppeteer scripts, with tabs that keep state between calls
The cdp skill: an agent drives your Chrome straight through the DevTools protocol, with 652 typed methods and no ready-made click or goto helpers
A skill and CLI from Browser Use: the agent drives your real Chrome over the DevTools Protocol, logged in as you, and writes any missing helper itself
An MCP and CLI that let an agent control your real Chrome, with its own logins and extensions, through Playwright
A CLI and MCP server that lets an agent drive your real Chrome with its logged-in sessions: 103 commands across 36 platforms plus browser automation
Comparison with similar tools
Entries that share the main search query, and how they differ.
| Entry | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| chrome-cdp (this entry) | no | 3,284 | ||
| Chrome MCP Server | no | not required | 12,502 | a Chrome extension with an MCP server installed into the browser as an add-on |
| Browser MCP | yes | not required | 7,213 | an MCP server and extension that let the agent drive your open browser |
| Chrome DevTools MCP (benjaminr) | no | not required | 312 | a Python Chrome MCP |
README in short
The description explains the idea: the agent sees and uses a live Chrome session without a separate browser or fresh sign-in. The install section shows the command for pi and a manual install for other agents, and asks for Node.js 22 and the debugging toggle. It then lists the tool commands, the comparison with chrome-devtools-mcp and how background processes per tab work.
README badge
Original SKILL.md
--- name: chrome-cdp description: 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) --- # 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 ```bash scripts/cdp.mjs list ``` ### Take a screenshot ```bash 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 ```bash scripts/cdp.mjs snap <target> ``` ### Evaluate JavaScript ```bash 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 ```bash