chrome-cdp-live-browser
chrome-cdp-live-browser — an installable skill for AI agents.
By reason-machines · 1,522 installs
npx skills add reason-machines/trending-skills --skill chrome-cdp-live-browser
Source repository · Upstream listing
chrome cdp: Live Chrome Session for AI Agents
Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.
chrome cdp connects your AI agent directly to your running Chrome browser via the Chrome DevTools Protocol (CDP). Unlike browser automation tools that spin up fresh isolated browsers, this connects to tabs you already have open — with your logins, cookies, and current page state intact.
What It Does
Live session access — reads and interacts with tabs you're already logged into
Persistent daemon — one WebSocket daemon per tab; the "Allow debugging" modal appears once, not on every command
No npm install — only Node.js 22+ required
100+ tab support — handles large numbers of open tabs reliably
Cross origin iframe support — type command works even inside cross origin iframes
Installation
As a pi skill
Manual (for Amp, Claude Code, Cursor, Codex, etc.)
Enable Remote Debugging in Chrome
1. Open Chrome and navigate to: chrome://inspect/ remote debugging
2. Toggle the "Enable remote debugging" switch
That's all. No flags, no relaunching Chrome.
The script auto detects Chrome, Chromium, Brave, Edge, and Vivaldi on macOS, Linux, and Windows. For non standard installs:
Key Commands
All commands use scripts/cdp.mjs as the entry point. <target is a unique prefix of the targetId shown by list .
List Open Tabs
Screenshot a Tab
Accessibility Tree (Semantic Snapshot)
Full HTML or Scoped HTML
Evaluate JavaScript
Navigate to URL
Network Resource Timing
Click an Element
Click at Coordinates
Type Text
Load More (Click Until Gone)
Open a New Tab
Stop Daemons
Raw CDP Command Passthrough
Common Patterns
Pattern: Read a Page You're Logged Into
Pattern: Fill and Submit a Form
Pattern: Extract Data with JavaScript
Pattern: Navigate and Wait
Pattern: Paginated Content
Pattern: Script Integration (Node.js)
Configuration
Environment Variable Purpose
CDP PORT FILE Path to DevToolsActivePort file for non standard browser installs
Daemons auto exit after 20 minutes of inactivity — no manual cleanup needed in normal use.
Troubleshooting
"Allow debugging" modal keeps appearing
This happens if daemons aren't persisting. Make sure you're using the same scripts/cdp.mjs entry point — it manages daemon lifecycle automatically. If you switched tools mid session, run stop and let daemons restart fresh.
Browser not detected
If auto detection fails, find your DevToolsActivePort file and set the env var:
Target not found / prefix ambiguous
Run list again — tab IDs change when tabs are closed/reopened. Use a longer prefix if multiple tabs share the same prefix characters.
Remote debugging toggle not visible
Ensure you're on chrome://inspect/ remote debugging (not just chrome://inspect/ ). The toggle is in the top right of the page.
Node.js version error
This project requires Node.js 22+ . Check with node version and upgrade if needed via [nvm](https://github.com/nvm sh/nvm) or your package manager.
Screenshots are blank or wrong size
The screenshot reflects the actual rendered viewport. If the tab is in a background window or the OS has display scaling, pixel coordinates for clickxy may need adjustment. Use snap or eval to inspect DOM state instead of relying solely on screenshots.
Architecture Notes
No Puppeteer, no Playwright, no intermediary — pure CDP WebSocket
One persistent daemon process per tab (auto spawned on first access)
Daemon reuse is why 100+ tabs work reliably (no timeout on target enumeration)
type uses CDP Input domain directly, bypassing iframe origin restrictions