Chuyển đến nội dung
Skillpedia
Agent394k · #13

acp-router

Skill này làm gì

Skill cho một agent AI biết cách chuyển một tác vụ sang công cụ lập trình bên ngoài, như Claude Code, Cursor hoặc Gemini CLI, rồi tiếp tục làm việc với phiên đó. Nó dành cho những ai dùng OpenClaw để điều khiển các trợ lý lập trình khác.

Khi nào nên dùng

  • ✓Khi bạn yêu cầu OpenClaw chạy một tác vụ trong Claude Code, Cursor hoặc một trợ lý lập trình khác.
  • ✓Khi bạn muốn tiếp tục công việc trước đó đang chạy sẵn trong một công cụ lập trình bên ngoài.
  • ✓Khi bạn muốn gửi hướng dẫn cho một trợ lý lập trình và giữ cuộc trò chuyện ở một nơi.

Liên kết skill

https://github.com/openclaw/openclaw/blob/main/extensions/acpx/skills/acp-router/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/openclaw/openclaw/blob/main/extensions/acpx/skills/acp-router/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Chạy bản sửa lỗi này trong Claude Code qua OpenClaw và gửi kết quả cho tôi khi xong.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill chọn đường phù hợp với công cụ lập trình, hoặc là phiên OpenClaw hoặc kết nối trực tiếp. Sau đó skill bắt đầu hoặc tiếp tục phiên thông qua công cụ thích hợp, chứ không đọc màn hình terminal.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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 path below; do not use message(action="thread-create") for ACP harness thread spawn.

Mode selection

Choose one of these paths:

  1. OpenClaw ACP runtime path (default): use sessions_spawn / ACP runtime tools.
  2. Direct acpx path (telephone game): use acpx CLI through exec to drive the harness session directly.

Use direct acpx when one of these is true:

  • user explicitly asks for direct acpx driving
  • 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:

  • subagents runtime for harness control
  • /acp command delegation as a requirement for the user
  • PTY scraping of supported ACP harness CLIs when acpx is 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:

  1. For ACP harness thread spawn requests, read this skill first in the same turn before calling tools.
  2. Use sessions_spawn with:
    • runtime: "acp"
    • thread: true
    • mode: "session" (unless user explicitly wants one-shot)
  3. For ACP harness thread creation, do not use message with action=thread-create; sessions_spawn is the only thread-create path.
  4. Put requested work in task so the ACP session gets it immediately.
  5. Set agentId explicitly unless ACP default agent is known.
  6. 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:

  1. Do not immediately ask the user to pick an alternate path.
  2. First attempt automatic local repair:
    • check that plugin-local pinned acpx is installed in the ACPX plugin package
    • verify ${ACPX_CMD} --version
  3. After reinstall/repair, restart the gateway and explicitly offer to run that restart for the
Câu hỏi thường gặp

Skill có hoạt động với Codex không?

Codex có đường liên kết native riêng, nên skill này chỉ dùng ACP cho Codex khi bạn yêu cầu rõ ràng ACP hoặc acpx.

Làm sao tạo một luồng mới cho công việc lập trình?

Với các luồng của agent lập trình, skill dùng công cụ session để tạo luồng, thay vì lệnh thread chung.

Những công cụ lập trình nào được hỗ trợ?

Skill liệt kê nhiều công cụ, gồm Claude Code, Cursor, Copilot, OpenCode, Gemini CLI và Qwen.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
394k
Vị trí xếp hạng
#13
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự