闲社服务运行正常AI智能体自动化平台
s

稳定浏览器

技能标识:stable-browser

Set up reliable browser automation using Chrome DevTools Protocol (CDP) instead of the flaky browser extension relay. Use when browser relay keeps disconnecting, throwing WebSocket 403 errors, or when you need stable headless/headed browser control for web scraping, form filling, social media posting, or any browser automation task. Replaces profile="chrome" with a rock-solid CDP connection.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

稳定浏览器

Stable Browser

用直接的Chrome DevTools协议连接替代不可靠的浏览器扩展中继。

问题所在

OpenClaw浏览器扩展中继(profile=chrome)频繁出现故障:

  • - WebSocket 403错误
  • 端口混淆(网关端口与中继端口)
  • 自动化过程中连接中断
  • 无法访问浏览器控制服务错误
  • 徽章/标签页附件混乱

解决方案:Chrome CDP

通过调试端口启动Chrome并直接连接,无需扩展。

快速设置

运行设置脚本配置所有内容:

bash
bash scripts/setup-cdp.sh

该脚本将:

  1. 1. 在~/.chrome-debug-profile创建专用Chrome配置文件
  2. 将browser.cdpUrl添加到OpenClaw配置
  3. 创建LaunchAgent(macOS),使Chrome在登录时启动
  4. 验证连接是否正常

手动设置

如果更倾向于手动设置,请参阅references/manual-setup.md。

使用方法

设置完成后,始终使用profile=openclaw(而非profile=chrome):

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

与扩展中继的关键区别

特性扩展中继CDP直连
稳定性频繁断开坚如磐石
设置
安装扩展 + 附加标签页 | 一次性脚本 | | 认证/Cookie | 共享主Chrome | 专用配置文件 | | 速度 | 通过扩展额外跳转 | 直接协议 | | 无头模式 | 不支持 | 可选(--headless=new) |

专用配置文件

CDP浏览器使用~/.chrome-debug-profile——一个独立的Chrome配置文件。这意味着:

  • - 登录网站一次,保持登录状态
  • 主Chrome不受影响
  • 无扩展冲突
  • 可承受Chrome更新

提示

  • - 首次运行:登录所需的所有网站(Google、GitHub、X、LinkedIn等)
  • 多标签页:CDP管理所有标签页——使用targetId固定特定标签页
  • 无头模式:在启动命令中添加--headless=new实现无界面操作
  • 端口冲突:如果端口9222被占用,在启动命令和配置中更改
  • 重启Chrome:pkill -f remote-debugging-port=9222 && sleep 1 && bash scripts/setup-cdp.sh

故障排除

  • - 无法访问浏览器:Chrome未以调试端口运行。运行setup-cdp.sh或手动启动
  • 端口9222被占用:另一个Chrome或进程占用了该端口。终止它:lsof -i :9222
  • 会话过期:Chrome崩溃。终止并重启:pkill -f chrome-debug-profile
  • 配置文件损坏:删除~/.chrome-debug-profile并重新运行设置

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 stable-browser-1776297886 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 stable-browser-1776297886 技能

通过命令行安装

skillhub install stable-browser-1776297886

下载

⬇ 下载 stable-browser v1.0.0(免费)

文件大小: 4.88 KB | 发布时间: 2026-4-16 16:08

v1.0.0 最新 2026-4-16 16:08
- 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.
返回顶部