Chrome CDP Skill
Give your AI agent eyes into your live Chrome session — the tabs you already have open, the accounts you’re already logged into, the tools you use every day.
Most browser tools launch a fresh, empty browser that has to log in from scratch. This one connects directly to Chrome you’re already running. No extra setup. No re-authentication. One toggle to enable.
$ pi install git:github.com/bcharleson/chrome-cdp-skillor clone the repo and copy skills/chrome-cdp/ to your agent skills directory
Setup in 2 Steps
Enable Chrome Remote Debugging
Open Chrome, go to this URL, and flip the toggle. That’s the only Chrome configuration needed. Chrome will show a one-time “Allow debugging” modal the first time each tab is accessed — after that, the skill holds the connection open silently.
chrome://inspect/#remote-debuggingInstall the Skill
For pi-based CLI agents (one command):
pi install git:github.com/bcharleson/chrome-cdp-skillFor other agents (Claude Code, Amp, Cursor, etc.) — clone and copy the skills directory:
git clone https://github.com/bcharleson/chrome-cdp-skill
# Copy skills/chrome-cdp/ to wherever your agent loads skills from
# Requires Node.js 22+ — no npm install neededVerify It Works
scripts/cdp.mjs list
# Returns a list of all open Chrome tabs
# Copy the targetId prefix for any tab you want to interact withThe targetId is an ID like 6BE827FA. You only need a unique prefix — 6-8 chars is usually enough.
Why This Is Different From Other Browser Tools
Other browser automation tools
- Launch a fresh, empty browser — no cookies, no sessions, not logged in to anything
- Require you to pass credentials, set cookies, or manage session tokens just to reach gated pages
- LinkedIn, HubSpot, Gmail, Notion — all block or break under headless browser traffic
- Can time out or lose sessions with many tabs open
- Reconnect on every command — Chrome modal can re-appear repeatedly
Chrome CDP Skill
- Connects to the Chrome you already have open — all sessions, all logins, all tabs intact
- No credential management — your agent inherits your authenticated state automatically
- LinkedIn, HubSpot, Gmail, your internal tools — all readable because you are already logged in
- Holds a persistent daemon per tab — handles 100+ tabs without timeouts
- Chrome modal fires once per tab, then the connection stays open silently
Real Use Cases
From non-technical GTM workflows to advanced browser automation — here is how this changes the game.
Pre-Call LinkedIn Research
GTM / SalesAgent Prompt
“Read my prospect's LinkedIn profile and pull their current role, recent posts, and company news before my call.”
You're already logged into LinkedIn. Your agent reads the profile tab you have open — no LinkedIn API, no scraping blocks, no rate limits. Just real data from your live session.
scripts/cdp.mjs listFind your LinkedIn tab targetId
scripts/cdp.mjs snap <target>Get accessibility tree of the profile page
scripts/cdp.mjs html <target> ".pv-top-card"Extract structured profile card HTML
Extract Data from Your CRM
GTM / RevOpsAgent Prompt
“Pull the top 10 open opportunities from my HubSpot pipeline and summarize deal stage, size, and last activity.”
Most CRM scraping is blocked or requires API keys with complex setup. With Chrome CDP, your agent reads your HubSpot dashboard exactly as you see it — no API, no config.
scripts/cdp.mjs listFind your HubSpot tab
scripts/cdp.mjs shot <target>Screenshot the pipeline view
scripts/cdp.mjs snap <target>Extract deal data via accessibility tree
Monitor Outbound Campaigns Live
GTM / OutboundAgent Prompt
“Check my Instantly campaign stats right now — open rates, reply rates, bounces — and flag anything that looks off.”
Your agent reads your Instantly or Smartlead dashboard in real time. No API polling, no export CSV, no waiting — it sees exactly what you see on screen.
scripts/cdp.mjs snap <target>Snapshot the campaign stats table
scripts/cdp.mjs eval <target> "document.querySelector('.stats-table').innerText"Extract stats as text
scripts/cdp.mjs shot <target>Capture a screenshot for visual reference
Automated Form Filling & Clicks
GTM / OperationsAgent Prompt
“Fill in this contact form on our partner portal and submit it — I'm already logged in.”
Agent clicks into fields, types text, and submits forms in tools you're authenticated to. No cookies to steal, no session to set up — it uses your live session.
scripts/cdp.mjs click <target> "#first-name"Focus the first name field
scripts/cdp.mjs type <target> "Brandon"Type the value (works in iframes too)
scripts/cdp.mjs click <target> "button[type=submit]"Submit the form
Authenticated API Docs Extraction
TechnicalAgent Prompt
“Crawl our internal Notion workspace and extract the GTM runbook into structured markdown.”
Internal tools, Notion, Confluence, private GitHub repos — anything you're logged into. The agent reads it through your existing authenticated session via the CDP WebSocket.
scripts/cdp.mjs listFind the Notion tab
scripts/cdp.mjs html <target>Extract the page content as HTML
scripts/cdp.mjs nav <target> https://notion.so/next-pageNavigate to next page and repeat
Debug & Inspect Live Pages
TechnicalAgent Prompt
“Take a screenshot of what the agent is seeing, inspect the accessibility tree, and identify why the submit button isn't clickable.”
Full DevTools access from the terminal — screenshots at native resolution, accessibility tree, network timing, and raw CDP commands. The complete browser debugging toolkit.
scripts/cdp.mjs shot <target> /tmp/debug.pngScreenshot at native resolution with DPR
scripts/cdp.mjs net <target>Check network resource timing
scripts/cdp.mjs evalraw <target> "DOM.getDocument" '{}'Raw CDP command passthrough
Commands Reference
All commands use scripts/cdp.mjs. The <target> is a unique prefix of the targetId shown by list.
scripts/cdp.mjs listList every open Chrome tab with targetId, title, and URLscripts/cdp.mjs shot <target> [file]Screenshot the viewport → /tmp/screenshot.png (default). Prints DPR for coordinate mapping.scripts/cdp.mjs snap <target>Accessibility tree snapshot — compact, semantic. Preferred over raw HTML for page structure.scripts/cdp.mjs html <target> [".selector"]Full page HTML or scoped to a CSS selector.scripts/cdp.mjs eval <target> "expression"Run JavaScript in the page context and return the result.scripts/cdp.mjs nav <target> https://...Navigate the tab to a URL and wait for page load.scripts/cdp.mjs click <target> "selector"Click an element by CSS selector.scripts/cdp.mjs clickxy <target> <x> <y>Click at CSS pixel coordinates (divide screenshot pixel coords by DPR).scripts/cdp.mjs type <target> "text"Type at the focused element. Works in cross-origin iframes where eval cannot reach.scripts/cdp.mjs loadall <target> "selector" [ms]Click a "Load more" button repeatedly until it disappears. Default 1500ms between clicks.scripts/cdp.mjs net <target>Network resource timing entries — inspect what loaded and how long it took.scripts/cdp.mjs evalraw <target> <method> [json]Raw CDP command passthrough — send any DevTools Protocol method directly.scripts/cdp.mjs stop [target]Stop one or all background daemons.Coordinates tip: shot saves images at native resolution (CSS pixels × DPR). CDP events like clickxy take CSS pixels. Convert: CSS px = screenshot px / DPR. The shot command prints the DPR so you always know.
How It Works (Technical)
For the technically curious — what’s happening under the hood.
Direct CDP WebSocket
Connects to Chrome’s remote debugging WebSocket at localhost:9222 — no Puppeteer, no Playwright, no intermediary layer. Pure protocol, minimal overhead.
Persistent Daemon Per Tab
On first access to a tab, a lightweight background daemon is spawned to hold the session open. Chrome’s “Allow debugging” modal fires once — all subsequent commands reuse the daemon. Daemons auto-exit after 20 min of inactivity.
Cross-Origin Iframe Support
The type command uses Input.insertText via CDP directly, bypassing JavaScript sandbox restrictions. This works in embedded iframes where eval cannot reach — critical for forms inside third-party widgets.
Zero Dependencies
Uses Node.js 22+ built-in WebSocket — no npm install needed. Just clone, enable the toggle in Chrome, and run. That’s why it works as a drop-in skill for any agent.
100+ Tab Reliability
Tools built on Puppeteer often time out during target enumeration with many tabs open. Because chrome-cdp connects per-tab and holds daemons, it handles 100+ open tabs reliably — matching real power-user workflows.
Raw CDP Passthrough
evalraw lets you send any Chrome DevTools Protocol method directly — DOM.getDocument, Network.getCookies, Performance.getMetrics. The full DevTools API surface from the terminal.
Where It Fits in Our Stack
We use Chrome CDP as the live-session browser layer in our OpenClaw agent stack — complementing Firecrawl for public web scraping with authenticated, real-time browser access.
Public Web
Firecrawl CLI
Scrape any public URL, crawl sites, web search
Authenticated / Live
Chrome CDP Skill
Your logged-in Chrome session — LinkedIn, CRM, internal tools
Structured APIs
CLI Tools
Instantly, HubSpot, Close CRM, Clay — JSON-first
Three layers. Any data surface your agent needs to reach.
Get OpenClaw deployed for your GTM motion
Chrome CDP is one layer of the full OpenClaw agent stack — browser access, outbound automation, CRM integration, and enrichment pipelines, built and managed for you as a service.
The discovery call is the first step of our engagement process — we scope your use case, map the stack, and determine fit before anything else.
Agents-as-a-service starting at $5K/mo. Discovery call is how we determine fit.