Skip to content
cccskills
FreePublished on GitHubEnglish overview

acp-router

Route requests from OpenClaw to external coding agents such as Claude Code or Cursor. Start or continue sessions using ACP, a protocol for connecting agents, or relay prompts directly through acpx while preserving conversation context.

OriginalShow the original description

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.

Works withGemini
AI rating80/ 100See how to install

Good for

  • Starting a Claude Code session in a thread
  • Continuing work with an external coding agent
  • Relaying prompts directly through acpx
  • Running Codex through explicitly requested ACP

Overview

What it does

This skill routes requests made to OpenClaw to external coding agents such as Claude Code or Cursor. It chooses between starting a session in an ACP runtime—ACP is a protocol for connecting agents—and passing instructions directly through acpx. You can continue existing work or send additional requests to the same session while keeping the conversation context.

When it helps

Use it when you want to name the coding agent that should handle a task, or continue a conversation with that agent inside a thread. It supports both one-time runs and ongoing sessions.

Example requests

  • “Start a Claude Code session in a thread and give it this task.”
  • “Continue the previous work in Cursor.”
  • “Run Codex through ACP.”

Notes

You need OpenClaw’s ACP runtime, or acpx and a connection to the target agent. This is a routing skill used in response to requests, rather than a command users invoke directly. Ordinary Codex chat connections use the native Codex app-server plugin; ACP is used when explicitly requested or for the relevant background launches. Repairing the connection environment may require restarting the Gateway.

This overview was written by AI (OpenAI Codex) from the public SKILL.md. Check the original below for the exact behavior.

Objective evaluation

AI rated this skill on four points using only the contents of its SKILL.md. Stars and popularity are not taken into account.

Clear instructionsIs it clear when to use it and what it does?
AGoodIt identifies supported agents, triggering requests, and the conditions for choosing ACP or acpx.
Concrete stepsAre steps, inputs, outputs, and examples spelled out?
AGoodIt provides sessions_spawn arguments and acpx command templates for persistent sessions and one-time runs.
SafetyAre sending data, deleting files, and running commands disclosed?
BPartly lackingIt directs repairs using npm install but provides no confirmation procedure for changes to existing files.
Easy setupDoes it need few tools or API keys, and are they documented?
BPartly lackingIt explains pinned acpx installation but does not provide setup procedures for the target agents.

The total counts each point as A = 25, B = 15, C = 5. Rated by AI (OpenAI Codex) as of Oct 19, 2026. Treat it as a guide and read the original before installing.

Disagree? Request a re-evaluation

Tell us which point is wrong and why. No login needed. We will check it against the SKILL.md, redo the evaluation, and show the result here.

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

Files included (1)

  • SKILL.md9.6 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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 user.
  4. Retry ACP thread spawn once after repair.
  5. 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:
    • ${ACPX_PLUGIN_ROOT}/node_modules/.bin/acpx
  2. Resolve pinned version from extension dependency:
    • node -e "console.log(require(process.env.ACPX_PLUGIN_ROOT + '/package.json').dependencies.acpx)"
  3. If binary is missing or version mismatched, install plugin-local pinned version:
    • cd "$ACPX_PLUGIN_ROOT" && npm install --omit=dev --no-save acpx@<pinnedVersion>
  4. Verify before use:
    • ${ACPX_PLUGIN_ROOT}/node_modules/.bin/acpx --version
  5. If install/repair changed ACPX artifacts, restart the gateway and offer to run the restart.
  6. 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-<harness>-<conversationId>

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

Command templates

Persistent session (create if missing, then prompt):

${ACPX_CMD} codex sessions show oc-codex-<conversationId> \
  || ${ACPX_CMD} codex sessions new --name oc-codex-<conversationId>

${ACPX_CMD} codex -s oc-codex-<conversationId> --cwd <workspacePath> --format quiet "<prompt>"

One-shot:

${ACPX_CMD} codex exec --cwd <workspacePath> --format quiet "<prompt>"

Cancel in-flight turn:

${ACPX_CMD} codex cancel -s oc-codex-<conversationId>

Close session:

${ACPX_CMD} codex sessions close oc-codex-<conversationId>

Harness aliases in acpx

  • claude
  • codex
  • copilot
  • cursor
  • droid
  • gemini
  • grok-build
  • iflow
  • kilocode
  • kimi
  • kiro
  • openclaw
  • opencode
  • qwen

Built-in adapter commands in acpx

Defaults are:

  • openclaw -> openclaw acp
  • claude -> bundled @agentclientprotocol/claude-agent-acp@0.79.0
  • codex -> bundled @agentclientprotocol/codex-acp@1.12.0 through OpenClaw's isolated CODEX_HOME wrapper
  • copilot -> copilot --acp --stdio
  • cursor -> cursor-agent acp
  • droid -> droid exec --output-format acp
  • gemini -> gemini --acp
  • grok-build -> grok agent stdio
  • iflow -> iflow --experimental-acp
  • kilocode -> npx -y @kilocode/cli acp
  • kimi -> kimi acp
  • kiro -> kiro-cli acp
  • opencode -> npx -y opencode-ai acp
  • qwen -> qwen --acp

If ~/.acpx/config.json overrides agents, those overrides replace defaults. If your local Cursor install still exposes ACP as agent acp, set that as the cursor agent override explicitly.

Failure handling

  • acpx: command not found:
    • for thread-spawn ACP requests, install plugin-local pinned acpx in the ACPX plugin package immediately
    • restart gateway after install and offer to run the restart automatically
    • then retry once
    • do not ask for install permission first unless policy explicitly requires it
    • do not install global acpx unless explicitly requested
  • adapter command missing (for example claude-agent-acp not found):
    • for thread-spawn ACP requests, first restore built-in defaults by removing broken ~/.acpx/config.json agent overrides
    • then retry once before offering fallback
    • if user wants binary-based overrides, install exactly the configured adapter binary
  • NO_SESSION: run ${ACPX_CMD} <agent> sessions new --name <sessionName> then retry prompt.
  • queue busy: either wait for completion (default) or use --no-wait when async behavior is explicitly desired.

Output relay

When relaying to user, return the final assistant text output from acpx command result. Avoid relaying raw local tool noise unless user asked for verbose logs.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

1password

FreeSummaryAI rating 100

Set up and authenticate the 1Password CLI, then supply stored passwords and API keys to commands or configuration. The skill covers desktop integration, service accounts, and interactive sign-in while keeping secrets out of chat and logs.

  • Setting up the 1Password CLI
  • Supplying API keys to commands
  • Using service account authentication in CI
openclaw/openclaw392.4KUpdated Oct 18, 2026

add-model-provider

FreeSummaryAI rating 100

Add a model provider to OpenClaw and verify it with a real response. The skill validates configuration, keeps credentials in environment or file references, and reports test results and any default model changes.

  • Adding a model provider to OpenClaw
  • Configuring credentials through environment or file references
  • Checking whether a model returns a real response
openclaw/openclaw392.4KUpdated Oct 18, 2026

agent-transcript

FreeSummaryAI rating 90

Prepare an agent activity transcript for a GitHub pull request or issue. Extract relevant prompts, decisions, and results from local logs, remove sensitive material, and preview the edited record before separately authorized publication.

  • Preparing an agent activity record for a pull request
  • Extracting task-relevant prompts and results from local logs
  • Previewing a transcript with sensitive information removed
openclaw/openclaw392.4KUpdated Oct 18, 2026

apple-notes

FreeSummaryAI rating 100

Manage Apple Notes on macOS through memo, a command-line tool. Create, browse, search, edit, delete, and move notes between folders, or export selected notes to HTML or Markdown for use outside the app.

  • Creating notes with titles
  • Finding notes by folder or approximate search
  • Editing notes and organizing them into folders
openclaw/openclaw392.4KUpdated Oct 18, 2026

apple-reminders

FreeSummaryAI rating 70

Manage Apple Reminders from your Mac with remindctl, a terminal tool. View tasks by date, add or edit reminders, organize lists, and mark tasks complete or delete them, including personal to-dos that sync to iOS.

  • Review today’s tasks and overdue reminders
  • Add personal to-dos with due dates
  • Organize tasks visible on an iPhone or iPad
openclaw/openclaw392.4KUpdated Oct 18, 2026

auto-qa

FreeSummaryAI rating 90

Run ongoing quality checks across OpenClaw subsystems, reproduce bugs, and verify fixes to their underlying causes. Track real environment tests, stress tests, independent reviews, and confirmed merges in an evidence report that supports resuming work.

  • Investigate bugs across multiple OpenClaw subsystems
  • Verify fixes through regression tests and independent review
  • Check real provider, UI, and package behavior
openclaw/openclaw392.4KUpdated Oct 18, 2026

See all skills by openclaw

Report a problem with this skill