Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
aradotso avatar

Chrome Cdp Live Browser

  • 1.5k installs
  • 66 repo stars
  • Updated July 9, 2026
  • aradotso/trending-skills

Give AI agents access to your live Chrome session via CDP — interact with open tabs, logged-in accounts, and current page state

About

The chrome cdp live browser skill Give AI agents access to your live Chrome session via CDP - interact with open tabs, logged-in accounts, and current page state. Documentation covers workflows, commands, and guardrails agents should follow when users invoke this capability. Key documented areas include "control my chrome browser"; "interact with open chrome tabs"; "automate my live browser session"; "take a screenshot of a webpage". Reference commands include pi install git:github.com/pasky/chrome-cdp-skill@v1.0.1; git clone https://github.com/pasky/chrome-cdp-skill. Use when developers or agents need structured guidance for chrome cdp live browser tasks with evidence grounded in the bundled SKILL.md rather than generic advice. "control my chrome browser" "interact with open chrome tabs" "automate my live browser session" "take a screenshot of a webpage" "click elements on a webpage" "read content from a browser tab" "navigate to a URL in chrome" "use chrome devtools protocol" Give AI agents access to your live Chrome session via CDP — interact with open tabs, logged-in accounts, and current page state

  • "control my chrome browser"
  • "interact with open chrome tabs"
  • "automate my live browser session"
  • "take a screenshot of a webpage"
  • "click elements on a webpage"

Chrome Cdp Live Browser by the numbers

  • 1,501 all-time installs (skills.sh)
  • +8 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #214 of 2,742 Automation & Workflows skills by installs in the Skillselion catalog
  • Security screen: HIGH risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

chrome-cdp-live-browser capabilities & compatibility

Capabilities
"control my chrome browser" · "interact with open chrome tabs" · "automate my live browser session" · "take a screenshot of a webpage" · "click elements on a webpage"
npx skills add https://github.com/aradotso/trending-skills --skill chrome-cdp-live-browser

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1.5k
repo stars66
Security audit1 / 3 scanners passed
Last updatedJuly 9, 2026
Repositoryaradotso/trending-skills

How do I handle chrome cdp live browser tasks with agent guidance?

Give AI agents access to your live Chrome session via CDP — interact with open tabs, logged-in accounts, and current page state

Who is it for?

Teams needing documented chrome cdp live browser workflows.

Skip if: Developers who only need isolated CI headless runs, static HTML scraping, or environments where attaching to a personal browser session is disallowed.

When should I use this skill?

Give AI agents access to your live Chrome session via CDP — interact with open tabs, logged-in accounts, and current page state

What you get

Structured workflow from chrome cdp live browser documentation applied to the user request.

  • Live tab interactions and navigations
  • Page content reads and screenshots from authenticated sessions

By the numbers

  • Ships 8 documented trigger phrases for browser control, navigation, screenshots, and CDP usage

Files

SKILL.mdMarkdownGitHub ↗

chrome-cdp: Live Chrome Session for AI Agents

Skill by 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 supporttype command works even inside cross-origin iframes

Installation

As a pi skill

pi install git:github.com/pasky/chrome-cdp-skill@v1.0.1

Manual (for Amp, Claude Code, Cursor, Codex, etc.)

git clone https://github.com/pasky/chrome-cdp-skill
# Copy the skills/chrome-cdp/ directory to wherever your agent loads context from

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:

export CDP_PORT_FILE=/path/to/DevToolsActivePort

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

node scripts/cdp.mjs list
# Output:
# A1B2C3  https://github.com/pasky/chrome-cdp-skill  chrome-cdp-skill
# D4E5F6  https://mail.google.com/mail/u/0/           Gmail

Screenshot a Tab

node scripts/cdp.mjs shot A1B2
# Saves screenshot to runtime dir, prints the file path

Accessibility Tree (Semantic Snapshot)

node scripts/cdp.mjs snap A1B2
# Returns compact, semantic accessibility tree — best for understanding page structure

Full HTML or Scoped HTML

node scripts/cdp.mjs html A1B2                    # full page HTML
node scripts/cdp.mjs html A1B2 ".main-content"    # scoped to CSS selector
node scripts/cdp.mjs html A1B2 "#article-body"    # scoped to ID

Evaluate JavaScript

node scripts/cdp.mjs eval A1B2 "document.title"
node scripts/cdp.mjs eval A1B2 "window.location.href"
node scripts/cdp.mjs eval A1B2 "document.querySelectorAll('a').length"

Navigate to URL

node scripts/cdp.mjs nav A1B2 https://example.com
# Navigates and waits for page load

Network Resource Timing

node scripts/cdp.mjs net A1B2
# Shows network resource timing for the current page

Click an Element

node scripts/cdp.mjs click A1B2 "button.submit"
node scripts/cdp.mjs click A1B2 "#login-btn"
node scripts/cdp.mjs click A1B2 "[data-testid='confirm']"

Click at Coordinates

node scripts/cdp.mjs clickxy A1B2 320 480
# Clicks at CSS pixel coordinates (x=320, y=480)

Type Text

node scripts/cdp.mjs type A1B2 "Hello, world!"
# Types at the currently focused element — works in cross-origin iframes

Load More (Click Until Gone)

node scripts/cdp.mjs loadall A1B2 "button.load-more"
# Keeps clicking the selector until it disappears from the DOM

Open a New Tab

node scripts/cdp.mjs open
node scripts/cdp.mjs open https://example.com
# Note: triggers Chrome's "Allow" prompt

Stop Daemons

node scripts/cdp.mjs stop          # stop all daemons
node scripts/cdp.mjs stop A1B2     # stop daemon for specific tab

Raw CDP Command Passthrough

node scripts/cdp.mjs evalraw A1B2 "Page.getFrameTree"
node scripts/cdp.mjs evalraw A1B2 "Runtime.evaluate" '{"expression":"1+1"}'

Common Patterns

Pattern: Read a Page You're Logged Into

# List tabs to find your target
node scripts/cdp.mjs list

# Grab the accessibility tree for a semantic view
node scripts/cdp.mjs snap D4E5

# Or get scoped HTML for a specific section
node scripts/cdp.mjs html D4E5 ".email-list"

Pattern: Fill and Submit a Form

# Click the input field
node scripts/cdp.mjs click A1B2 "input[name='search']"

# Type into it
node scripts/cdp.mjs type A1B2 "my search query"

# Click submit
node scripts/cdp.mjs click A1B2 "button[type='submit']"

# Take a screenshot to verify result
node scripts/cdp.mjs shot A1B2

Pattern: Extract Data with JavaScript

# Get all link hrefs on a page
node scripts/cdp.mjs eval A1B2 "Array.from(document.querySelectorAll('a')).map(a => a.href)"

# Get text content of a specific element
node scripts/cdp.mjs eval A1B2 "document.querySelector('.price').textContent.trim()"

# Get table data as JSON
node scripts/cdp.mjs eval A1B2 "
  Array.from(document.querySelectorAll('table tr')).map(row =>
    Array.from(row.querySelectorAll('td,th')).map(cell => cell.textContent.trim())
  )
"

Pattern: Navigate and Wait

# Navigate and then immediately read the page
node scripts/cdp.mjs nav A1B2 https://news.ycombinator.com
node scripts/cdp.mjs snap A1B2

Pattern: Paginated Content

# Keep loading content until "Load More" button disappears
node scripts/cdp.mjs loadall A1B2 "button[data-action='load-more']"

# Then extract all loaded content
node scripts/cdp.mjs eval A1B2 "document.querySelectorAll('.item').length"

Pattern: Script Integration (Node.js)

import { execFile } from 'node:child_process';
import { promisify } from 'node:util';

const exec = promisify(execFile);
const CDP = (...args) => exec('node', ['scripts/cdp.mjs', ...args]);

async function getPageTitle(tabPrefix) {
  const { stdout } = await CDP('eval', tabPrefix, 'document.title');
  return stdout.trim();
}

async function takeScreenshot(tabPrefix) {
  const { stdout } = await CDP('shot', tabPrefix);
  return stdout.trim(); // returns file path
}

async function navigateAndSnap(tabPrefix, url) {
  await CDP('nav', tabPrefix, url);
  const { stdout } = await CDP('snap', tabPrefix);
  return stdout;
}

// Usage
const tabs = (await CDP('list')).stdout;
console.log(tabs);

Configuration

Environment VariablePurpose
CDP_PORT_FILEPath 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:

# macOS Chrome example
export CDP_PORT_FILE="$HOME/Library/Application Support/Google/Chrome/Default/DevToolsActivePort"

# Linux Chrome example
export CDP_PORT_FILE="$HOME/.config/google-chrome/Default/DevToolsActivePort"

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 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

Related skills

How it compares

Pick chrome-cdp-live-browser when session fidelity matters more than isolated CI reproducibility.

FAQ

What does chrome cdp live browser do?

Give AI agents access to your live Chrome session via CDP — interact with open tabs, logged-in accounts, and current page state

When should I invoke chrome cdp live browser?

Give AI agents access to your live Chrome session via CDP — interact with open tabs, logged-in accounts, and current page state

What are key capabilities?

"control my chrome browser"

Is Chrome Cdp Live Browser safe to install?

skills.sh reports 1 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.