← 返回 Skills 市场
275
总下载
2
收藏
12
当前安装
1
版本数
在 OpenClaw 中安装
/install 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...
使用说明 (SKILL.md)
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
| Scenario | Use | Reason |
|---|---|---|
| Public pages (GitHub, Wikipedia, blogs) | agent-reach |
Fast, low token, structured |
| Search results (Bing/Google/YouTube) | browser-cdp |
agent-reach blocked |
| Login-gated content | browser-cdp |
No cookies in agent-reach |
| JS-rendered pages | browser-cdp |
Reads rendered DOM |
| Simple automation, isolated screenshots | agent-browser |
No Chrome setup |
| Large-scale parallel scraping | agent-reach + parallel |
browser-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.
安全使用建议
This skill does what it says: it attaches to your local Chrome to access pages with your cookies and perform clicks/eval/screenshots. That capability is powerful but sensitive. Before installing: 1) Ensure you run it only on trusted machines and use a dedicated Chrome profile (SKILL.md already recommends a separate user-data-dir). 2) Use Node.js 22+ as documented. 3) Confirm the proxy binds only to localhost (not 0.0.0.0) so other hosts cannot access the HTTP API. 4) Be aware that any use of this skill can read content you are logged into (email, social media, paywalled sites) and can execute arbitrary JS in those pages — limit its use and agent permissions accordingly. 5) The registry metadata should be updated to list Node and Chrome requirements; if you need stronger guarantees, review the full cdp-proxy.mjs to ensure there are no additional network exfiltration paths and consider running the proxy inside a confined environment or container.
功能分析
Type: OpenClaw Skill
Name: browser-cdp
Version: 1.0.0
The skill bundle provides a CDP (Chrome DevTools Protocol) proxy that allows an AI agent to control a local Chrome instance, including access to logged-in user sessions and private data. While aligned with its stated purpose of browser automation, the `cdp-proxy.mjs` script contains high-risk capabilities such as an unvalidated arbitrary file write vulnerability via the `/screenshot?file=` endpoint and a `/setFiles` endpoint that allows the agent to upload local files to remote websites. The script also aggressively attempts to discover and connect to existing Chrome debugging ports across various system paths, which could grant the agent unauthorized access to the user's primary browser profile beyond the intended debug environment.
能力评估
Purpose & Capability
The skill's code and SKILL.md match the declared purpose: it implements a local CDP→HTTP proxy to drive a Chrome instance (cookies, interactive ops, screenshots). However the registry metadata lists no required binaries while the instructions and code require Node.js 22+ and a locally-launched Chrome with --remote-debugging-port. The omission of those runtime requirements in the metadata is an incoherence that should be corrected.
Instruction Scope
The runtime instructions and the included cdp-proxy.mjs explicitly read browser state (DevToolsActivePort discovery), attach to browser pages, execute arbitrary JS in pages (eval endpoint) and can save screenshots to local file paths. That behaviour is necessary for the stated tasks (reading login-gated content, interacting with pages), but it gives the skill full access to any logged-in sites in the user's Chrome profile and lets an HTTP client trigger arbitrary page JS/eval. This is high-sensitivity access — verify you only run it on machines and profiles you trust and that local HTTP endpoints are not exposed to untrusted networks.
Install Mechanism
No install spec or remote downloads are present; the skill is instruction-first with a bundled JS script. That lowers supply-chain risk. The script uses only core Node APIs (with optional fallback to the 'ws' module).
Credentials
The skill declares no required env variables, and the code only optionally reads CDP_PROXY_PORT. However the practical requirement to access the user's Chrome profile (cookies/sessions) is implicit and very sensitive. Requesting access to the browser's debugging port and profile data is proportional to the feature (login-gated automation) but is privacy-critical — treat it like granting access to all logged-in accounts in that browser profile.
Persistence & Privilege
The skill does not request always:true and appears to run only when invoked. It writes/refs files under a per-skill directory (~/.openclaw/skills/browser-cdp/references), which is expected. One implementation detail to verify: the server likely listens on the configured port but the code sample does not force binding to localhost; if it binds to all interfaces it could expose the proxy to the LAN. Confirm server binding is restricted to localhost.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install browser-cdp - 安装完成后,直接呼叫该 Skill 的名称或使用
/browser-cdp触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release
元数据
常见问题
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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 275 次。
如何安装 browser-cdp?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install browser-cdp」即可一键安装,无需额外配置。
browser-cdp 是免费的吗?
是的,browser-cdp 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
browser-cdp 支持哪些平台?
browser-cdp 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 browser-cdp?
由 Jialin(@0xcjl)开发并维护,当前版本 v1.0.0。
推荐 Skills