Mac Node Bridge
Use this skill when your gateway runs on Linux but the real tool lives on a Mac node.
This skill does not patch bundled OpenClaw skills. It creates explicit SSH wrappers and verification steps so a Linux gateway can call macOS binaries on connected nodes in a way that is publishable, repeatable, and auditable.
Use This Skill For
- -
imsg, remindctl, memo, things, peekaboo, or other macOS-only CLIs - Homebrew-installed business tools that only exist on a Mac node
- Linux gateway + one or more Mac nodes where you want a stable remote execution path
- ClawHub-ready skills that should target Macs cleanly instead of mutating bundled Linux assumptions
Do Not Use This Skill For
- - Linux-native CLIs that should simply be installed on the gateway
- UI-only pairing problems
- Cases where you do not have passwordless SSH from the gateway to the Mac node
- Forcing bundled OpenClaw macOS skills to show green on Linux by patching core files
Requirements
- - Linux gateway can SSH to the target Mac node without a password
- Remote binary exists on the Mac node and is executable
- The Mac node already has any required macOS privacy permissions granted
- You know which Mac should own the tool
Path Rules
Use dynamic paths by default.
- - Wrapper install dir defaults to
OPENCLAW_BIN_DIR, then XDG_DATA_HOME/openclaw/bin, then INLINECODE7 - Preset installs resolve remote binaries dynamically with
command -v, remote brew --prefix, and common Homebrew prefixes - Use
--target-dir or --remote-bin only when you intentionally need to override the defaults
Trust Model
This skill assumes:
- - the Linux gateway is the orchestrator
- each Mac node is a separately trusted execution surface
- cross-host access must be narrow, explicit, and reversible
Plan around these rules:
- - use strong, scoped credentials and per-node trust, not one broad shared secret
- require the Mac side to prove identity before the gateway accepts orchestration signals
- give each wrapper only the minimum action it needs
- log cross-host setup, verification, and deployment steps
- fail soft when a Mac is unavailable; do not crash the whole system
Read references/security-model.md before publishing or extending this skill.
Workflow
1. Pick The Owning Mac
Default pattern:
- -
M1: always-on services like INLINECODE13 - INLINECODE14 : heavier interactive or business tooling
If you are unsure, verify first:
CODEBLOCK0
If the tool lives outside the normal shell path or Homebrew defaults, pass an explicit path:
CODEBLOCK1
2. Install A Wrapper On The Gateway
For a known tool preset:
CODEBLOCK2
Or install a generic wrapper:
CODEBLOCK3
Override the wrapper directory only when you need a non-default layout:
CODEBLOCK4
3. Verify The Wrapper
CODEBLOCK5
If the wrapper works but a bundled OpenClaw skill still shows gray, that is expected on a Linux gateway. Use the wrapper-backed workflow or publish a wrapper-aware skill instead of patching OpenClaw core.
4. Publish Wrapper-Aware Skills
When building a new ClawHub skill on top of this bridge:
- - call the wrapper through a configurable path contract, not a user-specific absolute home path
- document which node owns the tool
- keep secrets and tokens on the node or gateway config, not in the skill folder
- treat the wrapper as the stable contract
Read references/publish-pattern.md before turning a one-off wrapper into a public skill.
Security Rules
- - Use a dedicated SSH key for gateway-to-node wrappers whenever possible
- Use non-root accounts on the Mac nodes
- Prefer one wrapper per tool per node instead of a single unrestricted shell bridge
- Never store API tokens, app secrets, or OAuth cookies in the skill folder
- Never patch bundled OpenClaw skill files just to make Linux appear to support macOS tools
- Keep wrapper names explicit, for example
imsg-m1 or remindctl-mbp, when multiple Macs may own similar tools - Log who installed or rotated a wrapper and when
- Keep a rollback path: remove one wrapper, do not tear down the whole node
- If a tool needs more than read or one explicit action, define that permission boundary in the published skill
- If a wrapper depends on a Mac-only GUI permission, verify it explicitly and report a degraded-but-safe state instead of pretending success
Common Presets
Supported presets in scripts/install-preset.sh:
- - INLINECODE18
- INLINECODE19
- INLINECODE20
- INLINECODE21
- INLINECODE22
- INLINECODE23
- INLINECODE24
The preset installer resolves the remote binary dynamically. If resolution fails, pass --remote-bin explicitly.
Examples
Wire iMessage Through M1
CODEBLOCK6
Wire Reminders Through MacBook Pro
CODEBLOCK7
Use A Custom Binary
CODEBLOCK8
Files
- -
scripts/install-wrapper.sh: create one secure SSH wrapper for a remote binary - INLINECODE27 : install wrappers for common macOS tools with dynamic remote resolution
- INLINECODE28 : verify SSH and remote binary availability by path or tool name
- INLINECODE29 : how to build a publishable wrapper-aware skill on top
- INLINECODE30 : trust boundaries, least privilege, audit trail, and rollback expectations
Mac 节点桥接
当你的网关运行在 Linux 上,但实际工具位于 Mac 节点时,使用此技能。
此技能不会修补捆绑的 OpenClaw 技能。它会创建显式的 SSH 包装器和验证步骤,使 Linux 网关能够以可发布、可重复和可审计的方式调用连接节点上的 macOS 二进制文件。
适用场景
- - imsg、remindctl、memo、things、peekaboo 或其他仅限 macOS 的命令行工具
- 仅存在于 Mac 节点上的 Homebrew 安装的商业工具
- Linux 网关 + 一个或多个 Mac 节点,需要稳定的远程执行路径
- 应干净地针对 Mac 而非修改捆绑的 Linux 假设的 ClawHub 就绪技能
不适用场景
- - 应直接安装在网关上的 Linux 原生命令行工具
- 仅限 UI 的配对问题
- 网关无法通过 SSH 免密连接到 Mac 节点的情况
- 通过修补核心文件强制捆绑的 OpenClaw macOS 技能在 Linux 上显示绿色
前提条件
- - Linux 网关可以通过 SSH 免密连接到目标 Mac 节点
- 远程二进制文件存在于 Mac 节点上且可执行
- Mac 节点已授予任何所需的 macOS 隐私权限
- 你知道哪个 Mac 应拥有该工具
路径规则
默认使用动态路径。
- - 包装器安装目录默认为 OPENCLAWBINDIR,然后是 XDGDATAHOME/openclaw/bin,最后是 HOME/.openclaw/bin
- 预设安装使用 command -v、远程 brew --prefix 和常见的 Homebrew 前缀动态解析远程二进制文件
- 仅在有意覆盖默认值时使用 --target-dir 或 --remote-bin
信任模型
此技能假设:
- - Linux 网关是编排器
- 每个 Mac 节点是单独受信任的执行面
- 跨主机访问必须狭窄、显式且可逆
围绕以下规则进行规划:
- - 使用强作用域凭证和每节点信任,而非一个宽泛的共享密钥
- 要求 Mac 端在网关接受编排信号前证明身份
- 为每个包装器仅赋予其所需的最小操作
- 记录跨主机设置、验证和部署步骤
- 当 Mac 不可用时软失败;不要使整个系统崩溃
在发布或扩展此技能前,请阅读 references/security-model.md。
工作流程
1. 选择所属 Mac
默认模式:
- - M1:始终在线的服务,如 imsg
- MacBook Pro:较重的交互式或商业工具
如果不确定,请先验证:
bash
scripts/verify-node-tool.sh --host agent1@mac-mini.local --tool imsg
scripts/verify-node-tool.sh --host agent2@macbook-pro.local --tool remindctl
如果工具位于正常 shell 路径或 Homebrew 默认值之外,请传递显式路径:
bash
scripts/verify-node-tool.sh --host agent2@macbook-pro.local --bin /custom/path/remindctl
2. 在网关上安装包装器
对于已知工具预设:
bash
scripts/install-preset.sh \
--tool imsg \
--host agent1@mac-mini.local
或安装通用包装器:
bash
scripts/install-wrapper.sh \
--name remindctl-mbp \
--host agent2@macbook-pro.local \
--remote-bin /opt/homebrew/bin/remindctl
仅在需要非默认布局时覆盖包装器目录:
bash
scripts/install-preset.sh \
--tool memo \
--host agent1@mac-mini.local \
--target-dir $HOME/.local/bin
3. 验证包装器
bash
${OPENCLAWBINDIR:-${XDGDATAHOME:-$HOME/.openclaw}/openclaw/bin}/imsg chats --limit 1
${OPENCLAWBINDIR:-${XDGDATAHOME:-$HOME/.openclaw}/openclaw/bin}/remindctl-mbp lists
如果包装器工作正常但捆绑的 OpenClaw 技能仍显示灰色,这在 Linux 网关上是预期行为。使用基于包装器的工作流程或发布包装器感知技能,而不是修补 OpenClaw 核心。
4. 发布包装器感知技能
在此桥接之上构建新的 ClawHub 技能时:
- - 通过可配置的路径契约调用包装器,而非用户特定的绝对主目录路径
- 记录哪个节点拥有该工具
- 将密钥和令牌保存在节点或网关配置中,而非技能文件夹中
- 将包装器视为稳定契约
在将一次性包装器转变为公开技能前,请阅读 references/publish-pattern.md。
安全规则
- - 尽可能使用专用 SSH 密钥用于网关到节点的包装器
- 在 Mac 节点上使用非 root 账户
- 优先为每个工具每个节点使用一个包装器,而非单个无限制的 shell 桥接
- 切勿将 API 令牌、应用密钥或 OAuth cookie 存储在技能文件夹中
- 切勿修补捆绑的 OpenClaw 技能文件,仅为了让 Linux 看起来支持 macOS 工具
- 当多个 Mac 可能拥有类似工具时,保持包装器名称显式,例如 imsg-m1 或 remindctl-mbp
- 记录谁在何时安装或轮换了包装器
- 保留回滚路径:移除一个包装器,不要拆除整个节点
- 如果工具需要超过读取或一个显式操作,在发布的技能中定义该权限边界
- 如果包装器依赖于仅限 Mac 的 GUI 权限,显式验证并报告降级但安全的状态,而非假装成功
常见预设
scripts/install-preset.sh 中支持的预设:
- - imsg
- remindctl
- memo
- things
- peekaboo
- brew
- gh
预设安装程序动态解析远程二进制文件。如果解析失败,请显式传递 --remote-bin。
示例
通过 M1 连接 iMessage
bash
scripts/install-preset.sh \
--tool imsg \
--host agent1@mac-mini.local
通过 MacBook Pro 连接提醒事项
bash
scripts/install-preset.sh \
--tool remindctl \
--host agent2@macbook-pro.local \
--name remindctl-mbp
使用自定义二进制文件
bash
scripts/install-wrapper.sh \
--name my-mac-tool \
--host agent2@macbook-pro.local \
--remote-bin /custom/tools/my-mac-tool
文件
- - scripts/install-wrapper.sh:为远程二进制文件创建一个安全的 SSH 包装器
- scripts/install-preset.sh:为常见 macOS 工具安装包装器,支持动态远程解析
- scripts/verify-node-tool.sh:通过路径或工具名称验证 SSH 和远程二进制文件可用性
- references/publish-pattern.md:如何在此基础上构建可发布的包装器感知技能
- references/security-model.md:信任边界、最小权限、审计追踪和回滚期望