MCP.Market

acp-router skill

by openclaw·openclaw/openclaw·394k stars·MIT

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.

A100/100content scan

Is the acp-router skill safe?

Clean: nothing in its files matched our rules. We read 1 file in the folder on 2026-10-25.

No findings.

Install the acp-router skill

A skill is a folder. Copy it into your agent's skills folder and the agent loads it when the task matches its description.

git clone --depth 1 https://github.com/openclaw/openclaw.git /tmp/openclaw
mkdir -p ~/.claude/skills
cp -r /tmp/openclaw/extensions/acpx/skills/acp-router ~/.claude/skills/acp-router
available in every project

In the Claude apps, zip the folder and upload it from the Skills settings. The folder on GitHub

The instructions your agent would load

SKILL.md as published, without the frontmatter. Read it on 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 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"

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)
  1. For ACP harness thread creation, do not use message with action=thread-create; sessions_spawn is the only thread-create path.
  2. Put requested work in task so the ACP session gets it immediately.
  3. Set agentId explicitly unless ACP default agent is known.
  4. 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
  1. After reinstall/repair, restart the gateway and explicitly offer to run that restart for the user.
  2. Retry ACP thread spawn once after repair.
  3. Only if repair+retry fails, report the concrete error and then offer fallback options.

When offering fallback, keep ACP first:

  • Option 1: retry ACP spawn after showing exact failing step
  • Option 2: direct acpx telephone-game flow

Do not default to subagent runtime for these requests.

ACPX install and version policy (direct acpx path)

For this repo, direct acpx calls must follow the same pinned policy as the @openclaw/acpx extension package.

  1. Prefer plugin-local binary, not global PATH:
  • ${ACPXPLUGINROOT}/node_modules/.bin/acpx
  1. Resolve pinned version from extension dependency:
  • node -e "console.log(require(process.env.ACPXPLUGINROOT + '/package.json').dependencies.acpx)"
  1. If binary is missing or version mismatched, install plugin-local pinned version:
  • cd "$ACPXPLUGINROOT" && npm install --omit=dev --no-save acpx@
  1. Verify before use:
  • ${ACPXPLUGINROOT}/node_modules/.bin/acpx --version
  1. If install/repair changed ACPX artifacts, restart the gateway and offer to run the restart.
  2. Do not run npm install -g acpx unless the user explicitly asks for global install.

Set and reuse:

ACPX_PLUGIN_ROOT="<bundled-acpx-plugin-root>"
ACPX_CMD="$ACPX_PLUGIN_ROOT/node_modules/.bin/acpx"

Direct acpx path ("telephone game")

Use this path to drive harness sessions without /acp or subagent runtime.

Rules

  1. Use exec commands that call ${ACPX_CMD}.
  2. Reuse a stable session name per conversation so follow-up prompts stay in the same harness context.
  3. Prefer --format quiet for clean assistant text to relay back to user.
  4. Use exec (one-shot) only when the user wants one-shot behavior.
  5. Keep working directory explicit (--cwd) when task scope depends on repo context.

Session naming

Use a stable name, for example:

  • oc--

Where conversationId is thread id when available, otherwise channel/conversation id.

More skills from openclaw/openclaw

  • A1passwordSet up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.
  • Aadd-model-providerAdd and live-prove a model provider with non-interactive config one-liners, without exposing credentials.
  • Aagent-transcriptRequested GitHub PR/issue agent transcripts: redact, trim, preview, and insert safely.
  • Aapple-notesCreate, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.
  • Aapple-remindersList, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.
  • Aauto-qaRun OpenClaw-wide autonomous QA and live/stress campaigns across independent subsystem lanes, with verified fixes and a resumable evidence report.
  • AautoreviewStructured code review through the shared OpenClaw agent-skills installation.
  • Abear-notesCreate, search, and manage Bear notes via grizzly CLI.
  • Ablock-kitUse proactively for structured or interactive Slack replies, and when asked to author or validate native Slack Block Kit JSON.
  • AblogwatcherMonitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.
  • AblucliBluOS CLI (blu) for discovery, playback, grouping, and volume.
  • Abrowser-automationUse when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.

All agent skills → · MCP servers