kevinzai/commander/acpx
Claude Code and agent skill by kevinzai/commander
- community
Checking that the SKILL.md file is still in the repository.
Use acpx as a headless ACP CLI for agent-to-agent communication, including prompt/exec/sessions workflows, session scoping, queueing, permissions, and output formats.
Install
npx vskill@latest install kevinzai/commander/acpxSKILL.md
acpx
When to use this skill
Use this skill when you need to run coding agents through acpx, manage persistent ACP sessions, queue prompts, or consume structured agent output from scripts.
What acpx is
acpx is a headless, scriptable CLI client for the Agent Client Protocol (ACP). It is built for agent-to-agent communication over the command line and avoids PTY scraping.
Core capabilities:
- Persistent multi-turn sessions per repo/cwd
- One-shot execution mode (
exec) - Named parallel sessions (
-s/--session) - Queue-aware prompt submission with optional fire-and-forget (
--no-wait) - Cooperative cancel command (
cancel) for in-flight turns - Graceful cancellation via ACP
session/cancelon interrupt - Session control methods (
set-mode,set <key> <value>) - Agent reconnect/resume after dead subprocess detection
- Prompt input via stdin or
--file - Config files with global+project merge and
config show|init - Session metadata/history inspection (
sessions show,sessions history) - Local agent process checks via
status - Stable ACP client methods for filesystem and terminal requests
- Stable ACP
authenticatehandshake via env/config credentials - Structured streaming output (
text,json,quiet) - Built-in agent registry plus raw
--agentescape hatch
Install
For normal session reuse, prefer a global install over npx.
Command model
prompt is the default verb.
If prompt text is omitted and stdin is piped, acpx reads prompt text from stdin.
Built-in agent registry
Friendly agent names resolve to commands:
pi->npx pi-acpopenclaw->openclaw acpcodex->npx @zed-industries/codex-acpclaude->npx -y @zed-industries/claude-agent-acpgemini->gemini --acpcursor->cursor-agent acpcopilot->copilot --acp --stdiodroid->droid exec --output-format acpkimi->kimi acpopencode->npx -y opencode-ai acpkiro->kiro-cli acpkilocode->npx -y @kilocode/cli acpqwen->qwen --acp
Rules:
- Default agent is
codexfor top-levelprompt,exec, andsessions. - Unknown positional agent tokens are treated as raw agent commands.
--agent <command>explicitly sets a raw ACP adapter command.- Do not combine a positional agent and
--agentin the same command.
Commands
Prompt (default, persistent session)
Implicit:
Explicit:
Behavior:
- Uses a saved session for the session scope key
- Auto-resumes prior session when one exists for that scope
- If no session exists for the scope, exits with
NO_SESSIONand prompts forsessions new - Is queue-aware when another prompt is already running for the same session
- On interrupt during an active turn, sends ACP
session/cancelbefore force-kill fallback
Prompt options:
-s, --session <name>: use a named session within the same cwd--no-wait: enqueue and return immediately when session is already busy-f, --file <path>: read prompt text from file (-means stdin)
Exec (one-shot)
Behavior:
- Runs a single prompt in a temporary ACP session
- Does not reuse or save persistent session state
Cancel / Mode / Config
Behavior:
cancel: sends cooperativesession/cancelthrough queue-owner IPC.set-mode: calls ACPsession/set_mode.set-modemode ids are adapter-defined; unsupported values are rejected by the adapter (oftenInvalid params).set: calls ACPsession/set_config_option.- For codex,
thought_levelis accepted as a compatibility alias for codex-acpreasoning_effort. set-mode/setroute through queue-owner IPC when active, otherwise reconnect directly.
Sessions
Behavior:
sessionsandsessions listare equivalentnewcreates a fresh session for the current(agentCommand, cwd, optional name)scopenew --name <name>targets a named session scope- when
newreplaces an existing open session in that scope, the old one is soft-closed closetargets current cwd default sessionclose <name>targets current cwd named sessionshow [name]prints stored metadata for that scoped sessionhistory [name]prints stored turn history previews (default 20, use--limit)
Global options
--agent <command>: raw ACP agent command (escape hatch)--cwd <dir>: working directory for session scope (default: current directory)--approve-all: auto-approve all permission requests--approve-reads: auto-approve reads/searches, prompt for writes (default mode)--deny-all: deny all permission requests--format <fmt>: output format (text,json,quiet)--timeout <seconds>: max wait time (positive number)--ttl <seconds>: queue owner idle TTL before shutdown (default300,0disables TTL)--verbose: verbose ACP/debug logs to stderr
Permission flags are mutually exclusive.
Config files
Config files are merged in this order (later wins):
- global:
~/.acpx/config.json - project:
<cwd>/.acpxrc.json
Supported keys:
defaultAgentdefaultPermissions(approve-all,approve-reads,deny-all)ttl(seconds)timeout(seconds ornull)format(text,json,quiet)agentsmap (name -> { command })authmap (authMethodId -> credential)
Use acpx config show to inspect the resolved config and acpx config init to create the global template.
Session behavior
Persistent prompt sessions are scoped by:
agentCommand- absolute
cwd - optional session
name
Persistence:
- Session records are stored in
~/.acpx/sessions/*.json. -s/--sessioncreates parallel named conversations in the same repo.- Changing
--cwdchanges scope and therefore session lookup. - closed sessions are retained on disk with
closed: trueandclosedAt. - auto-resume by scope skips closed sessions.
Resume behavior:
- Prompt mode attempts to reconnect to saved session.
- If adapter-side session is invalid/not found,
acpxcreates a fresh session and updates the saved record. - explicitly selected session records can still be resumed via
loadSessioneven if previously closed. - dead saved PIDs are detected and reconnected on the next prompt.
- each completed prompt stores lightweight turn history previews in the session record.
Prompt queueing and --no-wait
Queueing is per persistent session.
- The active
acpxprocess for a running prompt becomes the queue owner. - Other invocations submit prompts over local IPC.
- On Unix-like systems, queue IPC uses a Unix socket under
~/.acpx/queues/<hash>.sock. - Ownership is coordinated with a lock file under
~/.acpx/queues/<hash>.lock. - On Windows, named pipes are used instead of Unix sockets.
- after the queue drains, owner shutdown is governed by TTL (default 300s, configurable with
--ttl).
Submission behavior:
- Default: enqueue and wait for queued prompt completion, streaming updates back.
--no-wait: enqueue and return after queue acknowledgement.Ctrl+Cduring an active turn sends ACPsession/cancel, waits briefly, then force-kills only if cancellation does not finish in time.cancelsends the same cooperative cancellation without requiring terminal signals.
Output formats
Use --format <fmt>:
text(default): human-readable stream with updates/tool status and done linejson: NDJSON event stream (good for automation)quiet: final assistant text only
Example automation:
Permission modes
--approve-all: no interactive permission prompts--approve-reads(default): approve reads/searches, prompt for writes--deny-all: deny all permission requests
If every permission request is denied/cancelled and none approved, acpx exits with permission-denied status.
Practical workflows
Persistent repo assistant:
Parallel named streams:
Queue follow-up without waiting:
One-shot script step:
Machine-readable output for orchestration:
Raw custom adapter command:
Repo-scoped review with permissive mode:
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/acpx/SKILL.md
Popularity
- Repository stars
- 6
- Repository forks
- 1
- 7-day trend score
- 10
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kevinzai/commander/acpx)