Community生產力與協作github.com

steipete/openclaw-relay

OpenClaw 工作階段中繼:透過本地或遠端 SSH 的 acpx 發送提示/貼文。

openclaw-relay 是什麼?

這項技能提供了一個名為 OpenClaw Relay 的中繼系統,允許 AI 代理程式(例如 Claude Code 或 Cursor)透過 acpx 協定將提示或貼文中繼到 OpenClaw 工作階段。它支援兩種傳輸模式:`local`,適用於目前機器上的直接中繼;以及 `ssh`,適用於跨機器橋接。其主要用途是與名為「Molty」的遠端閘道代理程式互動,通常在 `[email protected]` 上找到。該技能提供用於健康檢查 (`doctor`)、列出目標別名 (`targets`)、發送私人問題 (`ask`) 以及強制發送貼文 (`force-send`) 的指令。它還支援非同步工作流程,允許工作排入佇列,並透過 `start`、`wait` 和 `show` 輪詢結果。此技能對於需要在分離的機器或工作階段上與特定代理程式或頻道進行結構化通訊的開發人員來說至關重要。

相容平台~Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/steipete/agent-scripts/tree/main/skills/openclaw-relay

Installed? Explore more 生產力與協作 skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

OpenClaw Relay

當工作符合以下情況時使用此技能:

  • 「與 Molty 對話」
  • 「將此中繼到 OpenClaw 頻道工作階段」
  • 「使用 acpx」
  • 「透過 acp 經由閘道發送此訊息」
  • 「透過 SSH 在遠端 OpenClaw 橋接上工作」

單一技能,兩種傳輸方式:

  1. local
  2. ssh

預設使用 local,可從目前的 OpenClaw 簽出目錄進行直接的電話遊戲式工作。當目標代理程式/工作階段位於另一台機器上時,使用 ssh。

對於 Peter 的設定,Molty 通常位於 Mac Studio 閘道上,可透過 [email protected] 存取;避免為了一次性的中繼工作使用 mac-studio SSH 別名,因為該別名會自動附加 tmux。

腳本路徑:scripts/openclaw_relay.py

目標別名檔案:config/session_aliases.json

模式選擇

當以下情況時選擇 local:

  • 使用者明確指定 acpx
  • 目標工作階段位於目前機器上
  • 目標是快速中繼或私人詢問

當以下情況時選擇 ssh:

  • 目標代理程式/工作階段位於另一台主機上
  • 您想要一個持久的橋接工作階段
  • 您需要在遠端機器上進行非同步佇列/等待/顯示流程

預設值

該腳本避免使用內嵌的個人路徑。必要時可使用環境變數或旗標覆寫。

  • 傳輸方式:local
  • 本地 repo 工作目錄:目前工作目錄
  • 本地 acpx 儲存庫:<cwd>/extensions/acpx
  • ssh 主機:[email protected]
  • 遠端 repo 工作目錄:<remote-home>/clawdbot
  • 遠端 acpx 儲存庫:<remote-home>/Projects/oss/acpx
  • 閘道金鑰檔案:<home>/.openclaw/gateway.token
  • 控制工作階段名稱:codex-bridge
  • 目標別名檔案:config/session_aliases.json

有用的環境變數:

  • OPENCLAW_RELAY_TRANSPORT
  • OPENCLAW_RELAY_HOST
  • OPENCLAW_RELAY_CWD
  • OPENCLAW_RELAY_ACPX_REPO
  • OPENCLAW_RELAY_GATEWAY_URL
  • OPENCLAW_RELAY_GATEWAY_TOKEN_FILE
  • OPENCLAW_RELAY_SESSION
  • OPENCLAW_RELAY_TARGETS_FILE

快速開始

健康檢查:

python3 scripts/openclaw_relay.py doctor

列出已知的目標別名:

python3 scripts/openclaw_relay.py targets

解析目標別名:

python3 scripts/openclaw_relay.py resolve --target maintainers

私下向目標工作階段提問:

python3 scripts/openclaw_relay.py ask \
  --target maintainers \
  --message "Summarize the current vibe in this channel."

強制將文字發送到已解析的目標:

python3 scripts/openclaw_relay.py force-send \
  --target maintainers \
  --text "Deploy is done."

對於多行貼文,請使用 --text-file <path> 或 --text-file -,而不是 在 shell 中引用訊息。

當使用者明確想要頻道貼文時強制發送媒體:

python3 scripts/openclaw_relay.py force-send \
  --transport ssh \
  --host [email protected] \
  --target maintainers \
  --text "Demo video." \
  --media /tmp/demo.mp4

使用持久控制工作階段:

python3 scripts/openclaw_relay.py ensure
python3 scripts/openclaw_relay.py send --message "Reply with exactly OK."
python3 scripts/openclaw_relay.py show

遠端主機範例:

python3 scripts/openclaw_relay.py doctor --transport ssh --host [email protected]
python3 scripts/openclaw_relay.py send \
  --transport ssh \
  --host [email protected] \
  --message "Reply with exactly OK."

非同步工作流程

將工作排入佇列並輪詢相同的控制工作階段:

python3 scripts/openclaw_relay.py start --message "Work on X and reply when done."
python3 scripts/openclaw_relay.py wait --after-seq <last-seq>
python3 scripts/openclaw_relay.py show

目標別名

config/session_aliases.json 附帶預留位置。請為您的設定替換為實際值。

範例結構:

{
  "main": "agent:<agentId>:main",
  "maintainers": "agent:<agentId>:discord:channel:<channelId>"
}

工作階段規則

選擇指令時請使用這些規則:

  • 想要從特定工作階段獲得私人回覆:ask
  • 想要目標工作階段決定是否發文:publish
  • 想要保證直接發文:force-send
  • 想要與控制大腦進行阻塞式連續通訊:send
  • 想要發送後即忘的非同步操作:start,然後 wait 和 show
  • 想要停止排隊的工作:cancel

故障處理

如果中繼工作失敗:

  1. 執行 doctor。
  2. 執行 status。
  3. 執行 show。
  4. 如果控制工作階段卡住,執行 cancel,然後 ensure,再重試。

如果路由發現不確定:

  1. 先解析目標。
  2. 偏好使用別名或精確的工作階段金鑰。
  3. 在發送實際負載之前,先使用一個小型的探測詢問。

輸出中繼

回傳實際的助理文字或傳遞結果,而非 shell 噪音。

對於中繼任務,請回報:

  • 使用的傳輸方式
  • 目標工作階段金鑰
  • 路由探測/解析是否成功
  • 最終發文或回傳的結果

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

steipete/agent-transcript

GitHub PR/issue agent transcripts: redact, preview, and insert safely.

steipete/beeper

Beeper cache: contact hints, room lookup, WhatsApp/iMessage traces, FTS.

steipete/browser-use

Existing Chrome automation: Chrome plugin first, mcporter fallback.

steipete/clawsweeper-status

ClawSweeper status: URLs, workflow health, active workers, ops snapshot.

steipete/clickclack

ClickClack ops: chat app, Hetzner deploy, DNS/docs/app, Docker rollout.

steipete/cloudflare-registrar

Cloudflare Registrar: domain availability, prices, registration via mcporter.

steipete/codex-debugging

Codex debugging: codex-rs core/tui/exec/cli/app-server/config.

steipete/create-cli

CLI UX/spec: args, flags, help, output, errors, config, dry-run.

steipete/discord-clawd

Discord-backed OpenClaw agent/session relay; not archive search.

steipete/domain-dns-ops

DNS/domain ops: registrars, zones, redirects, DNS/HTTP verify, manager truth.

steipete/frontend-design

Frontend UI: pages, apps, components, polished non-generic design.

steipete/github-author-context

GitHub contributor context: identity, activity, trust, company/team signal.

steipete/github-cache-hygiene

GitHub quota/cache hygiene: gh, ghx, xcache, gitcrawl, mirrors, limits.

steipete/github-deep-review

GitHub deep review: bugs, PRs, best fix, stale-or-real, read code first.

steipete/github-project-triage

GitHub issue/PR triage: queues, CI, blockers, risk, proof, next actions.

steipete/hopper-debugger

Hopper debugging: macOS/iOS binaries, ObjC/Swift symbols, dyld, LLDB.

steipete/instruments-profiling

Instruments/xctrace profiling: macOS/iOS traces, binaries, args, exports.

steipete/mac-maintenance

Mac upkeep: brew update/upgrade, pull clean repos, empty Trash.

steipete/maintainer-orchestrator

Open-source maintainer orchestration: Codex app workers, work recovery, dependencies, vision, releases.

steipete/markdown-converter

Markdown conversion: PDF, Office, HTML, data, OCR, audio, ZIP, YouTube.

相關技能