首页龙虾技能列表 › Stable Browser — 技能工具

Stable Browser — 技能工具

v1.0.0

[自动翻译] Set up reliable browser automation using Chrome DevTools Protocol (CDP) instead of the flaky browser extension relay. Use when browser relay keeps dis...

0· 416·1 当前·1 累计
by @jarvis563·MIT-0
下载技能包
License
MIT-0
最后更新
2026/2/26
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
The skill's files and instructions match its stated purpose (switching OpenClaw from extension relay to a local Chrome CDP connection); it makes expected local changes (profile dir, OpenClaw config, optional macOS LaunchAgent) and does not request secrets or remote downloads.
评估建议
This skill appears coherent and implements what it promises, but review and consider the following before running: - Inspect scripts before running: scripts/setup-cdp.sh is local and will create ~/.chrome-debug-profile, update ~/.openclaw/openclaw.json, and on macOS create/load ~/Library/LaunchAgents/com.openclaw.chrome-cdp.plist. - Persistence: the LaunchAgent auto-starts Chrome at login (user-level). If you don't want that, skip the LaunchAgent step or remove the plist after setup. - Profile/c...
详细分析 ▾
用途与能力
The SKILL.md and setup script consistently implement a direct Chrome CDP setup for OpenClaw: creating a dedicated profile, launching Chrome with --remote-debugging-port, and updating ~/.openclaw/openclaw.json. Minor mismatch: the included setup script is macOS-centric (hard-coded Chrome path and creates a macOS LaunchAgent), while the documentation also documents Linux/Windows commands.
指令范围
Instructions stay within the stated purpose: they launch Chrome, create a separate profile, update OpenClaw config, and optionally install an auto-start agent. They do not access unrelated system files or network endpoints beyond localhost. Be aware the script instructs the user to sign into sites in the new profile, which will persist cookies and session tokens in the created profile directory (~/.chrome-debug-profile).
安装机制
No remote downloads or package installs. The skill is instruction-only with a local shell script; it writes files under the user's home (profile dir, OpenClaw config, LaunchAgents) and runs local commands only.
凭证需求
No environment variables, secrets, or external credentials are requested. The script modifies user-local config and creates a Chrome profile (where the user may choose to log into accounts), which is proportionate to the stated functionality.
持久化与权限
The script creates a per-user LaunchAgent (macOS) to auto-start Chrome and updates ~/.openclaw/openclaw.json. This is within scope for providing a persistent CDP endpoint, but it does grant persistent auto-start behavior—users should be aware and can opt out by not loading the LaunchAgent.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.02026/2/26

- Initial release of stable-browser skill. - Enables robust browser automation via Chrome DevTools Protocol (CDP), eliminating reliance on the flaky extension relay. - One-step setup script creates a dedicated Chrome profile and configures direct CDP connection. - Improves stability, eliminates WebSocket/port issues, and supports headless/headed automation for scraping, form filling, and more. - Provides usage instructions and troubleshooting guidance for seamless migration from the extension relay.

● 无害

安装命令 点击复制

官方npx clawhub@latest install stable-browser
镜像加速npx clawhub@latest install stable-browser --registry https://cn.clawhub-mirror.com

技能文档

Replace the unreliable browser extension relay with a direct Chrome DevTools Protocol connection.

The Problem

The OpenClaw browser extension relay (profile="chrome") frequently breaks:

  • WebSocket 403 errors
  • Port confusion (gateway port vs relay port)
  • Dropped connections mid-automation
  • "Can't reach browser control service" errors
  • Badge/tab attachment confusion

The Fix: Chrome CDP

Launch Chrome with a debug port and connect directly. No extension needed.

Quick Setup

Run the setup script to configure everything:

bash scripts/setup-cdp.sh

This will:

  • Create a dedicated Chrome profile at ~/.chrome-debug-profile
  • Add browser.cdpUrl to your OpenClaw config
  • Create a LaunchAgent (macOS) so Chrome starts on login
  • Verify the connection works

Manual Setup

If you prefer to set things up manually, see references/manual-setup.md.

Usage

After setup, always use profile="openclaw" (not profile="chrome"):

browser(action="snapshot", profile="openclaw")
browser(action="navigate", profile="openclaw", targetUrl="https://example.com")
browser(action="screenshot", profile="openclaw")

Key Differences from Extension Relay

FeatureExtension RelayCDP Direct
StabilityFrequent disconnectsRock solid
SetupInstall extension + attach tabOne-time script
Auth/CookiesShares your main ChromeDedicated profile
SpeedExtra hop through extensionDirect protocol
HeadlessNoOptional (--headless=new)

Dedicated Profile

The CDP browser uses ~/.chrome-debug-profile — a separate Chrome profile. This means:

  • Log into sites once, stays logged in
  • Your main Chrome is untouched
  • No extension conflicts
  • Survives Chrome updates

Tips

  • First run: Log into any sites you need (Google, GitHub, X, LinkedIn, etc.)
  • Multiple tabs: CDP manages all tabs — use targetId to pin a specific tab
  • Headless mode: Add --headless=new to the launch command for invisible operation
  • Port conflict: If port 9222 is taken, change it in both the launch command and config
  • Restart Chrome: pkill -f 'remote-debugging-port=9222' && sleep 1 && bash scripts/setup-cdp.sh

Troubleshooting

  • "Can't reach browser": Chrome isn't running with debug port. Run setup-cdp.sh or launch manually
  • Port 9222 in use: Another Chrome or process grabbed it. Kill it: lsof -i :9222
  • Stale session: Chrome crashed. Kill and restart: pkill -f chrome-debug-profile
  • Profile corruption: Delete ~/.chrome-debug-profile and re-run setup
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务