Route plain-language requests for Pi, Claude Code, Codex, OpenCode, Gemini CLI, or 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.
npx skills add https://github.com/majiayu000/claude-skill-registry --skill acp-router
When user intent is "run this in Pi/Claude Code/Codex/OpenCode/Gemini/Kimi (ACP harness)", do not use subagent runtime or PTY scraping. Route through ACP-aware flows.
Trigger this skill when the user asks OpenClaw to:
Mandatory preflight for coding-agent thread requests:
OpenClaw ACP runtime path below; do not use message(action="thread-create") for ACP harness thread spawn.Choose one of these paths:
sessions_spawn / ACP runtime tools.acpx path (telephone game): use acpx CLI through exec to drive the harness session directly.Use direct acpx when one of these is true:
acpx drivingDo not use:
subagents runtime for harness control/acp command delegation as a requirement for the useracpx is availableUse these defaults when user names a harness directly:
agentId: "pi"agentId: "claude"agentId: "codex"agentId: "opencode"agentId: "gemini"agentId: "kimi"These defaults match current acpx built-in aliases.
If policy rejects the chosen id, report the policy error clearly and ask for the allowed ACP agent id.
Required behavior:
sessions_spawn with:runtime: "acp"thread: truemode: "session" (unless user explicitly wants one-shot)message with action=thread-create; sessions_spawn is the only thread-create path.task so the ACP session gets it immediately.agentId explicitly unless ACP default agent is known.Example:
User: "spawn a test codex session in thread and tell it to say hi"
Call:
{
"task": "Say hi.",
"runtime": "acp",
"agentId": "codex",
"thread": true,
"mode": "session"
}
When the user asks to start a coding harness in a thread (for example "start a codex/claude/pi/kimi thread"), treat that as an ACP runtime request and try to satisfy it end-to-end.
Required behavior when ACP backend is unavailable:
extensions/acpx${ACPX_CMD} --versionWhen offering fallback, keep ACP first:
Do not default to subagent runtime for these requests.
For this repo, direct acpx calls must follow the same pinned policy as the @openclaw/acpx extension.
./extensions/acpx/node_modules/.bin/acpxnode -e "console.log(require('./extensions/acpx/package.json').dependencies.acpx)"cd extensions/acpx && npm install --omit=dev --no-save acpx@<pinnedVersion>./extensions/acpx/node_modules/.bin/acpx --versionnpm install -g acpx unless the user explicitly asks for global install.Set and reuse:
ACPX_CMD="./extensions/acpx/node_modules/.bin/acpx"
Use this path to drive harness sessions without /acp or subagent runtime.
exec commands that call ${ACPX_CMD}.--format quiet for clean assistant text to relay back to user.exec (one-shot) only when the user wants one-shot behavior.--cwd) when task scope depends on repo context.Use a deterministic name, for example:
oc-<harness>-<conversationId>Where conversationId is thread id when available, otherwise channel/conversation id.
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>
piclaudecodexopencodegeminikimiDefaults are:
pi -> npx pi-acpclaude -> npx -y @zed-industries/claude-agent-acpcodex -> npx @zed-industries/codex-acpopencode -> npx -y opencode-ai acpgemini -> geminikimi -> kimi acpIf ~/.acpx/config.json overrides agents, those overrides replace defaults.
acpx: command not found:extensions/acpx immediatelyacpx unless explicitly requestedclaude-agent-acp not found):~/.acpx/config.json agent overridesNO_SESSION: run ${ACPX_CMD} <agent> sessions new --name <sessionName> then retry prompt.--no-wait when async behavior is explicitly desired.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.
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
Replace with description of the skill and when Claude should use it.
Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill content", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
Use when creating new skills, editing existing skills, or verifying skills work before deployment
Take majiayu000/acp-router from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference npm, npx.
Without those the skill loads but fails at the first command.