acp-router
它能做什么
它告诉 AI 智能体如何把任务交给 Claude Code、Cursor 或 Gemini CLI 等外部编程工具,并在该会话中继续工作。它适合用 OpenClaw 驱动其他编程助手的人。
适用场景
- ✓你让 OpenClaw 在 Claude Code、Cursor 或其他编程助手中运行任务的时候。
- ✓想继续在外部编程工具中已经运行的早先工作的时候。
- ✓想把指令发给编程助手,并把对话保留在一个地方的时候。
技能链接
https://github.com/openclaw/openclaw/blob/main/extensions/acpx/skills/acp-router/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请通过 OpenClaw 在 Claude Code 中运行这个错误修复,完成后把结果发给我。”
每周 5 个新技能,1 分钟读完。
工作原理
技能根据编程工具选择合适的路径,即 OpenClaw 会话或直接连接。然后通过正确的工具启动或继续会话,而不是去读取终端屏幕。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
ACP Harness Router
When user intent is "run this in Claude Code/Cursor/Copilot/OpenClaw/OpenCode/Gemini/Grok Build/Qwen/Kiro/Kimi/iFlow/Droid/Kilocode (ACP harness)", do not use subagent runtime or PTY scraping. Route through ACP-aware flows.
Codex is special: plain chat/conversation binding and control should use the native Codex app-server plugin (/codex bind, /codex threads, /codex resume) instead of the default ACP path. Use ACP for Codex only when the user explicitly names ACP//acp/acpx, or when spawning background child sessions through sessions_spawn where a native Codex runtime spawn is not available yet.
Intent detection
Trigger this skill when the user asks OpenClaw to:
- run something in Claude Code / Cursor / Copilot / OpenClaw / OpenCode / Gemini / Grok Build / Qwen / Kiro / Kimi / iFlow / Droid / Kilocode
- run Codex explicitly through ACP,
/acp, or acpx - continue existing harness work
- relay instructions to an external coding harness
- keep an external harness conversation in a thread-like conversation
Mandatory preflight for coding-agent thread requests:
- Before creating any thread for ACP harness work, read this skill first in the same turn.
- After reading, follow
OpenClaw ACP runtime pathbelow; do not usemessage(action="thread-create")for ACP harness thread spawn.
Mode selection
Choose one of these paths:
- OpenClaw ACP runtime path (default): use
sessions_spawn/ ACP runtime tools. - Direct
acpxpath (telephone game): useacpxCLI throughexecto drive the harness session directly.
Use direct acpx when one of these is true:
- user explicitly asks for direct
acpxdriving - ACP runtime/plugin path is unavailable or unhealthy
- the task is "just relay prompts to harness" and no OpenClaw ACP lifecycle features are needed
Do not use:
subagentsruntime for harness control/acpcommand delegation as a requirement for the user- PTY scraping of supported ACP harness CLIs when
acpxis available
AgentId mapping
Use these defaults when user names a harness directly:
- "openclaw" ->
agentId: "openclaw" - "claude" or "claude code" ->
agentId: "claude" - "codex" ->
agentId: "codex"only for explicit ACP/acpx requests or background ACP runtime spawn - "copilot" or "github copilot" ->
agentId: "copilot" - "cursor" or "cursor cli" ->
agentId: "cursor" - "droid" or "factory droid" ->
agentId: "droid" - "opencode" ->
agentId: "opencode" - "gemini" or "gemini cli" ->
agentId: "gemini" - "grok build" or "grok-build" ->
agentId: "grok-build" - "iflow" ->
agentId: "iflow" - "kilocode" ->
agentId: "kilocode" - "kimi" or "kimi cli" ->
agentId: "kimi" - "kiro" or "kiro cli" ->
agentId: "kiro" - "qwen" or "qwen code" ->
agentId: "qwen"
These defaults match current acpx built-in aliases.
grok-build is an ACPX agent target, not the xAI model id
xai/grok-build-0.1. Route grok-build through agentId; use the fully
qualified xAI ref only in an OpenClaw model field.
If policy rejects the chosen id, report the policy error clearly and ask for the allowed ACP agent id.
OpenClaw ACP runtime path
Required behavior:
- For ACP harness thread spawn requests, read this skill first in the same turn before calling tools.
- Use
sessions_spawnwith:runtime: "acp"thread: truemode: "session"(unless user explicitly wants one-shot)
- For ACP harness thread creation, do not use
messagewithaction=thread-create;sessions_spawnis the only thread-create path. - Put requested work in
taskso the ACP session gets it immediately. - Set
agentIdexplicitly unless ACP default agent is known. - Do not ask user to run slash commands or CLI when this path works directly.
Example:
User: "spawn a test codex ACP session in thread and tell it to say hi"
Call:
{
"task": "Say hi.",
"runtime": "acp",
"agentId": "codex",
"thread": true,
"mode": "session"
}
Thread spawn recovery policy
When the user asks to start a coding harness in a thread, treat that as an ACP runtime request and try to satisfy it end-to-end.
Required behavior when ACP backend is unavailable:
- Do not immediately ask the user to pick an alternate path.
- First attempt automatic local repair:
- check that plugin-local pinned acpx is installed in the ACPX plugin package
- verify
${ACPX_CMD} --version
- After reinstall/repair, restart the gateway and explicitly offer to run that restart for the
常见问题
它也支持 Codex 吗?
Codex 有自己的原生绑定路径,因此只有在你明确要求 ACP 或 acpx 时,这个技能才会使用 ACP 来处理 Codex。
编程工作如何新建线程?
对于编程智能体的线程,它使用会话工具来创建线程,而不是通用的线程命令。
支持哪些编程工具?
技能列出了许多工具,包括 Claude Code、Cursor、Copilot、OpenCode、Gemini CLI 和 Qwen。
详情
作者的原始描述
Route plain-language requests for Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Grok Build, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or explicit ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation. Codex chat binding defaults to the native Codex app-server plugin unless ACP is explicit or background spawn needs ACP.
repo: openclaw/openclaw
热度
- GitHub 星标
- 394k
- 排名
- #13
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
discord-user-post
394k让你的智能体通过 Discord 桌面应用,以你的身份发送你已批准的消息,并在发送前确认具体频道。
discrawl
394k让你的智能体搜索和总结本地保存的 Discord 消息档案,查看档案的新旧程度,并阅读私信。
gitcrawl
394k让你的智能体搜索已保存的 GitHub 议题和拉取请求档案,将重复内容归类,并在 GitHub 上核实它们的当前状态。
graincrawl
394k让你的智能体搜索已保存的 Granola 会议记录和转写稿,查看它们的新旧程度,并统计某段时间内的数量。