browser-cdp

Real Chrome browser automation via CDP Proxy — access pages with full user login state, bypass anti-bot detection, perform interactive operations (click/fill/scroll), extract dynamic JavaScript-rendered content, take screenshots. Triggers (satisfy ANY one): - Target URL is a search results page (Bing/Google/YouTube search) - Static fetch (agent-reach/WebFetch) is blocked by anti-bot (captcha/intercept/empty) - Need to read logged-in user's private content - YouTube, Twitter/X, Xiaohongshu, WeChat public accounts, etc. - Task involves "click", "fill form", "scroll", "drag" - Need screenshot or dynamic-rendered page capture

Safety Notice

This item is sourced from the public archived skills repository. Treat as untrusted until reviewed.

Copy this and send it to your AI assistant to learn

Install skill "browser-cdp" with this command: npx skills add 0xcjl/browser-cdp

What is browser-cdp?

browser-cdp connects directly to your local Chrome via Chrome DevTools Protocol (CDP), giving the AI agent:

  • Full login state — your cookies and sessions are carried through
  • Anti-bot bypass — pages that block static fetchers (search results, video platforms)
  • Interactive operations — click, fill forms, scroll, drag, file upload
  • Dynamic content extraction — read JavaScript-rendered DOM
  • Screenshots — capture any page at any point

Architecture

Chrome (remote-debugging-port=9222)
    ↓ CDP WebSocket
CDP Proxy (cdp-proxy.mjs) — HTTP API on localhost:3456
    ↓ HTTP REST
OpenClaw AI Agent

Setup

1. Start Chrome with debugging port

# macOS — must use full binary path (not `open -a`)
pkill -9 "Google Chrome"; sleep 2
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
  --remote-debugging-port=9222 \
  --user-data-dir=/tmp/chrome-debug-profile \
  --no-first-run &

Verify:

curl -s http://127.0.0.1:9222/json/version

2. Start CDP Proxy

node ~/.openclaw/skills/browser-cdp/scripts/cdp-proxy.mjs &
sleep 3
curl -s http://localhost:3456/health
# {"status":"ok","connected":true,"sessions":0,"chromePort":9222}

API Reference

# List all tabs
curl -s http://localhost:3456/targets

# Open URL in new tab
curl -s "http://localhost:3456/new?url=https://example.com"

# Execute JavaScript
curl -s -X POST "http://localhost:3456/eval?target=TARGET_ID" \
  -d 'document.title'

# JS click (fast, preferred)
curl -s -X POST "http://localhost:3456/click?target=TARGET_ID" \
  -d 'button.submit'

# Real mouse click
curl -s -X POST "http://localhost:3456/clickAt?target=TARGET_ID" \
  -d '.upload-btn'

# Screenshot
curl -s "http://localhost:3456/screenshot?target=TARGET_ID&file=/tmp/shot.png"

# Scroll (lazy loading)
curl -s "http://localhost:3456/scroll?target=TARGET_ID&direction=bottom"

# Navigate
curl -s "http://localhost:3456/navigate?target=TARGET_ID&url=https://..."

# Close tab
curl -s "http://localhost:3456/close?target=TARGET_ID"

Tool Selection: Three-Layer Strategy

ScenarioUseReason
Public pages (GitHub, Wikipedia, blogs)agent-reachFast, low token, structured
Search results (Bing/Google/YouTube)browser-cdpagent-reach blocked
Login-gated contentbrowser-cdpNo cookies in agent-reach
JS-rendered pagesbrowser-cdpReads rendered DOM
Simple automation, isolated screenshotsagent-browserNo Chrome setup
Large-scale parallel scrapingagent-reach + parallelbrowser-cdp gets rate-limited

Decision flow:

Public content → agent-reach (fast, cheap)
Search results / blocked → browser-cdp
Still fails → agent-reach fallback + record in site-patterns

Known Limitations

  • Chrome must use a separate profile (/tmp/chrome-debug-profile)
  • Same-site parallel tabs may get rate-limited
  • Node.js 22+ required (native WebSocket)
  • macOS: use full binary path to start Chrome, not open -a

Site Patterns & Usage Log

~/.openclaw/skills/browser-cdp/references/site-patterns/   # per-domain experience
~/.openclaw/skills/browser-cdp/references/usage-log.md    # per-use tracking

Origin

Adapted from eze-is/web-access (MIT) for OpenClaw. A bug in the original (require() in ES module, reported here) is fixed in this version.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

promotion-planning

Develop promotion strategies and discount recommendations based on historical data analysis

Archived SourceRecently Updated
Coding

unified-session

Unify all chat channels into one shared AI session for seamless cross-device continuity. Start a conversation on your laptop, continue from your phone — same context, same memory, zero loss. Use this skill whenever: - User wants multiple messaging channels (DingTalk, Feishu/Lark, Telegram, Discord, WhatsApp, Signal, Slack, webchat) to share one conversation - User mentions "shared session", "cross-device", "multi-channel", "unified session", "continue conversation", "seamless", "context lost", "memory lost", "上下文丢失", "记忆丢失", "多端共享" - User says their bot "forgets" what was said when they switch from one app to another - User asks how to make Telegram/Discord/DingTalk/Feishu/WhatsApp share context with webchat - User wants to switch between desktop and mobile without losing conversation history - User mentions dmScope, session routing, channel isolation, or session merging - User describes wanting to pick up where they left off on a different device or chat app - User complains about having separate conversations on each channel when they only have one agent - Even if the user doesn't use technical terms — if they describe the pain of "switching apps and the AI doesn't remember", this is the skill to use

Archived SourceRecently Updated
Coding

Mapping-Skill

AI/ML 人才搜索、论文作者发现、实验室成员爬取、GitHub 研究者挖掘与个性化招聘邮件生成 skill。只要用户提到查找 AI/ML PhD、研究员、工程师,抓取实验室成员、OpenReview/CVF 会议作者、GitHub 网络研究者,提取主页/Scholar/GitHub/邮箱/研究方向,识别华人、分类去重,或把结果导入飞书多维表格并批量生成邮件,就应该优先使用这个 skill;即使用户没有明确说“使用 Mapping-Skill”,只要任务属于这些复合工作流,也应触发。

Archived SourceRecently Updated
Coding

obsidian

Work with Obsidian vaults (plain Markdown notes) and automate via obsidian-cli.

Archived SourceRecently Updated