← 返回 Skills 市场
i-am-rad

Chrome Extension Relay Helper - Mac

作者 Jacob Radcliffe · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
498
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install chrome-extension-relay-helper-mac
功能描述
Attach the OpenClaw Browser Relay Chrome extension to a live tab so the browser tool (profile="chrome") works. Use this skill before any browser automation t...
使用说明 (SKILL.md)

OpenClaw Chrome Relay Helper - Mac

Automates attaching the OpenClaw Browser Relay Chrome extension to a live tab on macOS. Once attached, the browser(profile="chrome") tool works — you can navigate, snapshot, click, and scrape using your real Chrome session.

macOS only. Requires Peekaboo (macOS UI automation CLI).

Quickstart

bash \x3Cskill-dir>/scripts/attach.sh

Outputs one of:

  • ALREADY_ATTACHED — already connected, nothing to do
  • ATTACHED — freshly connected, ready to use
  • FAILED: \x3Creason> — check ~/.openclaw/media/relay-attach-fail.png for a debug screenshot

Then navigate and automate:

browser(action="navigate", profile="chrome", targetUrl="https://example.com")
browser(action="snapshot", profile="chrome", compact=True)  # read page content

Typical wall time: ~29s on a clean launch.

Prerequisites

1. Peekaboo (macOS UI automation CLI)

brew install steipete/tap/peekaboo

Peekaboo reads Chrome's accessibility tree to find the extension icon by description — no pixel coordinates needed.

2. Accessibility permission for node

Go to System Settings → Privacy & Security → Accessibility and add your node binary. Without this, Peekaboo cannot send click events.

Find your node path with: which node

3. openclaw.json browser profile

Add this to your ~/.openclaw/openclaw.json:

"browser": {
  "profiles": {
    "chrome": {
      "cdpUrl": "http://127.0.0.1:18792",
      "driver": "extension",
      "color": "#FF5A36"
    }
  }
}

Restart the gateway after editing: openclaw gateway restart

4. Extension loaded and pinned in Chrome

The OpenClaw Browser Relay extension must be loaded as an unpacked extension in Chrome. It's included with OpenClaw at:

~/.openclaw/browser/chrome-extension

Load it via chrome://extensionsDeveloper mode ONLoad unpacked.

The extension must also be pinned to the toolbar. The script finds the icon via Chrome's accessibility tree, which only exposes toolbar-pinned extensions — not icons hidden inside the Extensions panel. To pin: click the puzzle-piece icon → click the pin icon next to "OpenClaw Browser Relay".

How it works

The script finds the extension icon using Chrome's accessibility tree — not pixel coordinates. The icon's description changes based on state:

  • Detached: "OpenClaw Browser Relay (click to attach/detach)"
  • Attached: "OpenClaw Browser Relay: attached (click to detach)"

Peekaboo scans for a pop-up button element whose description starts with "OpenClaw Browser Relay", determines state, and clicks to attach if needed. Retries up to 8× (every 2s) to handle slow Chrome startup.

Window maximize is required before scanning — Chrome's toolbar icons are not visible in the accessibility tree on a small or default-sized window.

What the script does (step by step)

  1. Fast path — if Chrome is running and badge already shows "attached", exits immediately (~2s)
  2. Kill any running Chrome instance
  3. Patch ~/Library/Application Support/Google/Chrome/Default/Preferences to suppress the "Restore Pages?" dialog on relaunch
  4. Open Chrome to https://info.cern.ch/ — the world's first website, a 428-byte static HTML file with zero anti-bot tech, JS, cookies, or Cloudflare
  5. Maximize the window via Peekaboo (required for toolbar visibility)
  6. Scan accessibility tree for the extension icon (retries up to 8×, 2s apart)
  7. Click the icon to attach
  8. Verify state changed to "attached" before returning

Known pitfalls

Approach Why it doesn't work
Hardcoded pixel coordinates Breaks at any screen size other than what they were measured on
AppleScript keystroke with Ctrl+Shift Modifier keys are silently dropped — only the bare key fires
Chrome extension keyboard shortcut The extension manifest has no commands — shortcuts don't trigger attach
Vision model to locate icon Not reliable enough for toolbar UI at any resolution
Skipping window maximize Toolbar icons don't appear in the accessibility tree on a small window
Extension not pinned to toolbar Unpinned extensions are hidden inside the Extensions panel — not visible in the accessibility tree
Wrong profile name or port in config browser(profile="chrome") requires the profile named exactly chrome pointing to port 18792

Token efficiency tips

# ✅ Use snapshot for reading page content (~3k tokens)
browser(action="snapshot", profile="chrome", compact=True)

# ❌ Avoid screenshot + vision for UI element detection
# → Unreliable for toolbar/coordinate identification
# → 10–50x more expensive than snapshot

Integration pattern

Any skill that needs Chrome relay should call this first:

# 1. Attach
bash \x3Cpath-to-chrome-relay>/scripts/attach.sh

# 2. Navigate
browser(action="navigate", profile="chrome", targetUrl="https://target.com")

# 3. Automate
browser(action="snapshot", profile="chrome", compact=True)
browser(action="act", profile="chrome", request={kind: "click", ref: "..."})
安全使用建议
This skill appears to do exactly what it says, but it performs intrusive actions that you should accept knowingly: it will kill any running Chrome processes (pkill -9), modify your Chrome Default Preferences file to suppress restore prompts, and write debug screenshots to ~/.openclaw/media. Before using it: (1) back up your Chrome profile (~/Library/Application Support/Google/Chrome) if you have unsaved tabs or important state, (2) inspect the brew tap/package before installing Peekaboo, (3) confirm you are comfortable granting Accessibility permission to your node binary (required so Peekaboo can send clicks), (4) ensure the OpenClaw extension is loaded and pinned at ~/.openclaw/browser/chrome-extension as documented, and (5) run the script manually the first time so you can observe its behavior (it is not auto-installed). If any of these operations are unacceptable (killing Chrome or modifying preferences), do not install or run the skill.
功能分析
Type: OpenClaw Skill Name: chrome-extension-relay-helper-mac Version: 1.0.0 The skill is classified as suspicious due to its use of powerful and sensitive system interactions, even though the stated purpose is functional. Specifically, the `scripts/attach.sh` script forcefully kills the Google Chrome process (`pkill -9 -f "Google Chrome"`) and directly modifies the user's Chrome preferences file (`~/Library/Application Support/Google/Chrome/Default/Preferences`) to suppress a dialog. While these actions are explained in `SKILL.md` and are intended to facilitate browser automation, the capability to programmatically kill applications and alter application configuration files without explicit, granular user consent for each modification represents a significant risk and could be leveraged for malicious purposes if the skill's intent were different. Additionally, the skill relies on `peekaboo`, a UI automation tool that requires broad Accessibility permissions, further highlighting the elevated privileges involved.
能力评估
Purpose & Capability
The name/description match the included script and instructions: the skill locates and clicks the OpenClaw Relay extension icon via the macOS accessibility tree so the browser(profile="chrome") relay can be attached. Required tools (Peekaboo) and the node Accessibility permission are explained and reasonably related to the task.
Instruction Scope
The instructions and script do several system-level things that are explicitly documented: kill Chrome (pkill -9), patch ~/Library/Application Support/Google/Chrome/Default/Preferences to suppress restore dialogs, open and maximize Chrome, inspect the accessibility tree, click the extension icon, and save a debug screenshot to ~/.openclaw/media. All of these are within the skill's stated goal, but they are intrusive operations that affect the user's Chrome state and could cause data loss if unsaved tabs/windows exist.
Install Mechanism
This is an instruction-only skill with a shell script; no install spec is run by the skill itself. The README suggests installing Peekaboo via a Homebrew tap (steipete/tap/peekaboo). Using a third-party Homebrew tap is an explicit user instruction and not executed automatically by the skill; users should audit that tap before installing, but the install suggestion is coherent with the documented dependency.
Credentials
The skill requests no secrets or environment variables. It does require granting Accessibility permission to the node binary (to allow Peekaboo to send UI events), and it reads/writes the Chrome Preferences JSON and writes diagnostic screenshots to ~/.openclaw/media. Those accesses are proportionate to the task but touch sensitive browser state (Preferences) and user files, so users should be aware and back up Chrome state if needed.
Persistence & Privilege
The skill is not always-enabled and does not request persistent platform privileges. It does not modify other skills or system configurations beyond the documented per-user Chrome Preferences patch and writing to ~/.openclaw/media; those changes are self-contained and described in the SKILL.md.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install chrome-extension-relay-helper-mac
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /chrome-extension-relay-helper-mac 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
What it does: When OpenClaw needs to control your real Chrome browser, it requires the OpenClaw Browser Relay extension to be active on a tab. Without a reliable attach method, agents fall back to pixel-coordinate clicking and screenshot-based targeting — both of which break across screen sizes and are expensive in tokens. This skill solves that with a single script that: 1) Launches Chrome to a known safe page Uses Peekaboo (macOS accessibility API) to find the extension icon by its description — not coordinates 2) Clicks it to attach 3) Confirms the relay is live before returning The result is a consistent, reproducible attach sequence that works regardless of screen resolution, window size, or where the icon happens to be in the toolbar. Use this skill as the first step in any workflow that needs browser(profile="chrome").
元数据
Slug chrome-extension-relay-helper-mac
版本 1.0.0
许可证
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Chrome Extension Relay Helper - Mac 是什么?

Attach the OpenClaw Browser Relay Chrome extension to a live tab so the browser tool (profile="chrome") works. Use this skill before any browser automation t... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 498 次。

如何安装 Chrome Extension Relay Helper - Mac?

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

Chrome Extension Relay Helper - Mac 是免费的吗?

是的,Chrome Extension Relay Helper - Mac 完全免费(开源免费),可自由下载、安装和使用。

Chrome Extension Relay Helper - Mac 支持哪些平台?

Chrome Extension Relay Helper - Mac 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Chrome Extension Relay Helper - Mac?

由 Jacob Radcliffe(@i-am-rad)开发并维护,当前版本 v1.0.0。

💬 留言讨论