跳到正文
Skillpedia
部署与云(DevOps)8.6k · #12403

cross-host-rig-commands

它能做什么

这个技能说明如何把 OpenRig 命令发送到已注册为主机的另一台机器。适合跨越多台电脑使用 OpenRig 的用户。

适用场景

  • ✓你需要指定一台已注册的远程 OpenRig 主机的时候。
  • ✓你需要为远程主机选择正确连接方式的时候。
  • ✓你需要读取在另一台机器上运行的命令结果的时候。

技能链接

https://github.com/mvschwarz/openrig/blob/main/packages/daemon/specs/agents/shared/skills/core/cross-host-rig-commands/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/mvschwarz/openrig/blob/main/packages/daemon/specs/agents/shared/skills/core/cross-host-rig-commands/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请在我的远程开发主机上运行 status 命令,告诉我它是否可以访问,以及它使用的是哪种连接方式。”

每周 5 个新技能,1 分钟读完。

工作原理

它说明主机如何通过其传输方式(SSH 或 HTTP)注册,命令和结果如何传输到主机,并在执行重要操作前进行检查。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Cross-host rig commands

Use a registered host address and the entry's declared transport. SSH entries run a remote CLI through a single-hop shell; HTTP entries use the remote daemon. These paths have different prerequisites and command coverage. Check the exact command's help and the target installation before a consequential operation.

Choose and inspect the destination

rig host list shows registered hosts. rig host add --help describes registry writes; rig host doctor --help describes reachability checks. Inspect the configured OpenRig home rather than assuming the default ~/.openrig/hosts.yaml. Registry changes affect later routing, so make them within the requested scope.

hosts:
  - id: test-vm
    transport: ssh
    target: test-vm.local
    user: example-user
  - id: remote-dev
    transport: http
    url: http://remote-dev.example:7433
    bearer_env: REMOTE_RIG_TOKEN

The registry requires a hosts array, unique non-empty ids and a supported transport. SSH needs a non-empty target; user and notes are optional. HTTP needs a URL and accepts at most one of bearer_env or bearer_file. Omitting both is valid for a tokenless target. A configured but unavailable bearer is a permission failure, not anonymous fallback. Host ids also have reserved-name validation; use the actual validator's error rather than inventing an alias that collides.

Address the intended operation

rig send dev-worker@example-rig "check the assigned result" --host remote-dev --verify
rig capture dev-worker@example-rig --host remote-dev
rig ps --host remote-dev --nodes --json
rig whoami --host remote-dev

These coordination commands select SSH or HTTP from the registry entry. They do not silently try another transport when one fails. A host-qualified target can be convenient, but confirm its parsing and any persisted host selection with the particular command. Explicit --host is preferable for consequential cross-host work.

Queue destinations use explicit --host or a supported host-qualified destination; queue writes do not follow persisted host selection. The CLI separates the host from the canonical seat in the routing envelope. Different queue subcommands have different flags: check their help instead of copying a flag from send. A local success message alone does not establish remote persistence or pickup.

Read failures at the layer that failed

Signal What to inspect
registry-load-failed / unknown-host Registry path, entry and exact destination
ssh-unreachable SSH connection, target and transport diagnostics
permission-gate The configured SSH or HTTP credentials and target policy
remote-daemon-unreachable Target listener and actual running daemon identity
remote-outcome-unknown The request may have arrived (timeout, dropped connection, unreadable reply): check its effect, for a send the target pane, before any retry
remote-command-not-found Remote CLI installation and executable lookup
remote-command-failed The remote operation's own status and error

The exact result taxonomy depends on the path. HTTP failures expose the remote status/error; SSH distinguishes the shell transport from the remote command. Do not start or replace a remote daemon merely because a diagnostic suggests it; first establish the target's state and the authority for that lifecycle action. A timed-out write may have reached its destination. Reconcile its durable effect before retrying.

Verification and attribution

Transport success is not delivery verification or agent consumption. SSH forwards --verify and returns the remote CLI result. HTTP preserves the remote transport verdict and explicitly reports that the local pane-effect check did not run cross-host. Inspect that result and the destination effect required by the task; never replace it with “SSH exited zero” or “HTTP returned successfully.”

Cross-host output names the host/target; JSON envelopes carry cross_host metadata. The precise envelope differs by command and transport. Preserve the underlying remote result when passing evidence onward.

A target's host suffix selects a destination; a sender's origin identifies where a reply belongs. Use the rendered reply address and verify its host mapping. Current send derives the sender from the executing seat context, not a caller's --from assertion. It adds origin-host identity at cross-host forwarding; do not assume local sends have the same suffix. Unkn

常见问题

两种连接方式是什么?

SSH 运行远程命令行会话,HTTP 则与远程 OpenRig 守护进程通信。

总是需要令牌吗?

不需要。HTTP 主机可以不使用令牌,但已配置却无法获取的令牌会被视为权限失败。

它会替我修改主机列表吗?

注册表的更改只在你要求的范围内进行,技能要求先检查主机列表。

详情

作者的原始描述

Use when addressing a registered remote OpenRig host, choosing its transport, or interpreting a cross-host result.

repo: mvschwarz/openrig

热度

GitHub 星标
8.6k
排名
#12403
许可证
Apache-2.0
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能