← 返回 Skills 市场
zaviwayne

chrome-relay-browser

作者 ZaviWayne · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
545
总下载
2
收藏
1
当前安装
2
版本数
在 OpenClaw 中安装
/install chrome-relay-browser
功能描述
通过 Chrome Extension relay 控制浏览器。用于控制用户已在 Chrome 中打开并 attach 的标签页,无需启动新浏览器,用户可直接看到操作界面。触发条件:(1) 用户让我操作浏览器 (2) 需要复用用户已打开的页面 (3) 需要截图/填表/点击等操作
使用说明 (SKILL.md)

chrome-relay-browser

通过 Chrome Extension relay 控制已 attach 的浏览器标签页。

前置条件

  1. 配置 openclaw.json(确保 browser 部分已配置):

    "browser": {
      "enabled": true,
      "defaultProfile": "chrome-relay",
      "attachOnly": true
    }
    
  2. 安装 Chrome 扩展

    openclaw browser extension install
    openclaw browser extension path  # 获取安装路径
    

    然后在 Chrome 中加载:打开 chrome://extensions,开启开发者模式,加载上述路径

  3. 配置扩展(安装后需配置一次):

    • 点击扩展图标 → 设置
    • Relay port: 从 ~/.openclaw/secrets/browser-relay.env 读取 RELAY_PORT
    • Gateway token: 从 ~/.openclaw/secrets/browser-relay.env 读取 RELAY_TOKEN
  4. Attach 标签页

    • 在 Chrome 打开任意页面
    • 点击扩展图标 attach

使用方法

运行 scripts/ctl.js 控制浏览器:

cd ~/.openclaw/workspace/skills/chrome-relay-browser/scripts
node ctl.js \x3Ccommand> [args]

可用命令

命令 说明 示例
navigate \x3Curl> 打开 URL node ctl.js navigate https://baidu.com
screenshot [path] 截图 node ctl.js screenshot /tmp/abc.png
title 获取页面标题 node ctl.js title
url 获取当前 URL node ctl.js url
evaluate \x3Cjs> 执行 JS node ctl.js evaluate "document.title"

配置

Token 和 Port 存储在 ~/.openclaw/secrets/browser-relay.env,脚本自动读取:

  • RELAY_TOKEN - Gateway token
  • RELAY_PORT - Relay 端口号

故障排除

  • Unauthorized: 检查扩展设置的 Gateway token 是否与 secrets 中的 RELAY_TOKEN 一致
  • No tabs: 提醒用户先在 Chrome 中 attach 标签页
  • Connection refused: 重启 Gateway 或检查 RELAY_PORT 配置
安全使用建议
This skill appears to do what it says: control an already-attached Chrome tab via a local relay. Before installing, verify the Chrome extension and gateway you will use are from a trusted source (inspect their code if possible). Ensure Node.js is installed and the script's npm dependency ('ws') is installed (the SKILL.md does not declare this). Protect the secrets file (~/.openclaw/secrets/browser-relay.env) — anyone with RELAY_TOKEN and access to the relay port can control attached pages. Avoid attaching the relay to sensitive sites (banks, password managers) and consider rotating the token after use. If you need higher assurance, request an explicit install/packaging spec and dependency list from the skill author or review the extension/gateway source code and network exposure to ensure the relay is strictly local.
功能分析
Type: OpenClaw Skill Name: chrome-relay-browser Version: 1.0.1 This skill enables an AI agent to control a user's active Chrome session via a local WebSocket relay and the Chrome DevTools Protocol. The script `scripts/ctl.js` reads sensitive credentials from `~/.openclaw/secrets/browser-relay.env` and uses `Runtime.evaluate` to execute arbitrary JavaScript in the browser context, which is a high-risk capability vulnerable to injection. While the functionality aligns with the stated purpose of browser automation, the power to interact with a user's logged-in sessions and the lack of robust input sanitization pose a significant security risk.
能力评估
Purpose & Capability
Name/description, the SKILL.md, and scripts/ctl.js consistently implement control of an already-attached Chrome tab via a local relay. The required env vars (RELAY_TOKEN, RELAY_PORT) and the secrets path map directly to the relay/gateway model described.
Instruction Scope
Runtime instructions limit actions to connecting to a local relay, issuing Chrome DevTools Protocol commands (navigate, screenshot, evaluate, click, fill, etc.), and reading the declared secrets file. They do not instruct reading unrelated system files or contacting remote hosts beyond localhost.
Install Mechanism
No install spec (instruction-only) reduces installation risk. However, the included script requires Node.js and the 'ws' npm module, but the skill metadata does not declare Node or any required binaries/dependencies or provide installation steps for npm packages — an operational omission that may confuse users or lead to failed runs.
Credentials
Only RELAY_TOKEN and RELAY_PORT (plus the config file path) are required and those are proportional to a relay-based browser-control capability. No unrelated credentials or broad environment access are requested.
Persistence & Privilege
The skill does not request always:true and does not modify other skills or system-wide configs. It only reads its own secrets file and uses local HTTP/WebSocket connections; it does not persist additional system-wide privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install chrome-relay-browser
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /chrome-relay-browser 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
No functional or file changes detected in this release. - Version number updated to 1.0.1. - No content, documentation, or code changes made.
v1.0.0
chrome-relay-browser v1.0.0 - 首发版本,支持通过 Chrome Extension relay 控制已 attach 的标签页。 - 无需新开浏览器窗口,可直接操作用户在 Chrome 已打开的标签页。 - 支持基础命令:打开页面、截图、获取标题与 URL、执行自定义 JS。 - 脚本自动加载 token 和端口配置,简化使用流程。 - 提供详细的安装与故障排除指引。
元数据
Slug chrome-relay-browser
版本 1.0.1
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 2
常见问题

chrome-relay-browser 是什么?

通过 Chrome Extension relay 控制浏览器。用于控制用户已在 Chrome 中打开并 attach 的标签页,无需启动新浏览器,用户可直接看到操作界面。触发条件:(1) 用户让我操作浏览器 (2) 需要复用用户已打开的页面 (3) 需要截图/填表/点击等操作. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 545 次。

如何安装 chrome-relay-browser?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install chrome-relay-browser」即可一键安装,无需额外配置。

chrome-relay-browser 是免费的吗?

是的,chrome-relay-browser 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

chrome-relay-browser 支持哪些平台?

chrome-relay-browser 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 chrome-relay-browser?

由 ZaviWayne(@zaviwayne)开发并维护,当前版本 v1.0.1。

💬 留言讨论