Chrome Browser Control (CDP)
Control Chrome via CDP protocol to automate browser tasks and reuse login sessions.
Installation
- Make sure Claude is on your device and in your terminal.
Skills load from
~/.claude/skills/when Claude Code starts up β so you need it on your machine first. If you don't have it yet, install it once with the command below, then runclaudein any terminal to verify.One-time setupnpm i -g @anthropic-ai/claude-codeAlready have it? Skip ahead.
- Paste into Claude Code or into your terminal.
This copies the whole skill folder into
~/.claude/skills/browser-cdp-worldwonderer/β the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Safe default: works for every skill.Faster alternative (instruction-only skills)
Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates β they won't be downloaded and the skill will fail when it tries to load them.
Quick install (SKILL.md only)Sign up to copy - Restart Claude Code.
Quit and reopen Claude Code (or any other agent that loads from
~/.claude/skills/). New skills are picked up on startup. - Just ask Claude.
Skills auto-activate when your request matches the skill's description β no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the βWhat this skill doesβ section above.
Prefer to read the source first? Open on GitHub.
When Claude uses it
Use when you need to drive a Chrome browser over the DevTools Protocol (CDP) while reusing your existing login sessions β launching Chrome in debug mode, opening pages, waiting for loads, running JavaScript, taking snapshots, and extracting auth tokens.
What this skill does
Chrome Browser Control (CDP)
Automate Chrome browser tasks over the DevTools Protocol (CDP) while reusing your existing login sessions. This skill launches Chrome in debug mode, opens pages, waits for loads, runs JavaScript, takes snapshots, and extracts authentication tokens. It manages the browser lifecycle safely, detecting existing Chrome instances and asking for consent before terminating them.
What it does
- Detect and reuse CDP state β Check if Chrome is already running in debug mode (port 9222) without modifying anything
- Safe Chrome launch β Start Chrome in debug mode with user consent if existing processes will be terminated
- Navigate and wait β Open URLs and pause for page loads
- Execute JavaScript β Run eval commands to extract data, tokens, or page state; supports complex scripts via base64 or stdin
- Interactive snapshots β Capture interactive elements, click, and type text into page controls
- Login session persistence β Reuse stored login credentials across multiple automation runs; reset if sessions expire
How to use it
Before any automation, run the detection script to check the current state: node {SKILL_DIR}/scripts/setup-cdp-chrome.js 9222 --detect-only. If CDP is ready, use agent-browser --cdp 9222 commands directly (open, wait, eval, snapshot, click, type). If Chrome is running and will be killed, ask the user for consent, then start with --yes. Common workflows: navigate with open "<URL>" and wait 3000, extract text or tokens with eval, interact with snapshot -i and click, and clean up by closing the debug window.
Note: this skill's internal instructions are written in Chinese. Claude reads them natively and will work with you in English.
Related skills
Documentation Co-Authoring
anthropics
Guide structured workflows for writing docs, proposals, and technical specs collaboratively.
MCP Server Builder
anthropics
Build protocol servers that connect language models to external APIs and services.
Skill Builder & Optimizer
anthropics
Create, edit, and optimize Claude skills with performance testing and benchmarking.
Multi-Component Web Artifacts
anthropics
Build complex React artifacts with Tailwind CSS and shadcn/ui components.