Browser CDP Automation
Drive an already-logged-in Chrome through the DevTools Protocol to open pages, run JavaScript, and extract data or auth tokens.
AutomationAdvanced★ 5,290⑂ 809AI score 7/10Last updated: Aug 8, 2026
What it does
Uses the agent-browser CLI over the Chrome DevTools Protocol (CDP) so Claude can automate a browser while reusing your existing login sessions.
- Detect or launch a debug-mode Chrome (
--detect-onlyis side-effect free) - Open URLs, wait for load, evaluate arbitrary JavaScript (
eval) - Extract page text, snapshot interactive elements (
snapshot -i), click and type - Pass tricky JS via base64 (
-b) or heredoc (--stdin) to dodge shell escaping - Pull auth tokens from localStorage / cookies
- Timeout wrappers:
timeouton macOS/Linux, PowerShell Jobs on Windows - Enforces an explicit consent step before killing a running Chrome (exit code 3 = consent required)
Who it's for
- Developers scraping or checking sites that require a logged-in session (internal admin, dashboards, social apps)
- Anyone blocked by captchas or session loss when using headless crawlers
- People who need to grab a Bearer token from the browser for follow-up API calls
- Intermediate/advanced users with Node.js 20+ and global npm install rights
Example uses
- Read a login-gated dashboard: "Use CDP to open our internal dashboard and dump the text" → run
--detect-only→ get consent, launch debug Chrome →open→wait 3000→eval 'document.body.innerText'. - Extract an API token:
eval 'localStorage.getItem("token") || document.cookie', then reuse the token in subsequent curl requests. - Paginated ranking scrape: wrap each page in
timeout 30 agent-browser --cdp 9222 eval ...so the session never blocks, and resume from the failed page.
· · · Install guide · · ·
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the skills/browser-cdp folder from the GitHub repo worldwonderer/oh-story-claudecode into my ~/.claude/skills/browser-cdp/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/worldwonderer/oh-story-claudecode.git && mkdir -p ~/.claude/skills && cp -r oh-story-claudecode/skills/browser-cdp ~/.claude/skills/ && npm install -g agent-browser⚠ This is a third-party skill. Check the source repository before installing.
- Prerequisites: install Google Chrome and Node.js 20 or newer.
- Install the CLI: run
npm install -g agent-browser. - Clone the repo:
git clone https://github.com/worldwonderer/oh-story-claudecode.git - Copy the skill:
mkdir -p ~/.claude/skills && cp -r oh-story-claudecode/skills/browser-cdp ~/.claude/skills/ - Verify: restart Claude Code and confirm
browser-cdpappears in your skills list. - First-run warning: save any open Chrome tabs/drafts — the initial launch may need to close your regular Chrome, and Claude should ask for permission first.
- Check CDP status:
node ~/.claude/skills/browser-cdp/scripts/setup-cdp-chrome.js 9222 --detect-only
View source on GitHub ↗License: MIT