home/dot_agents/skills/acpx/SKILL.md
Use acpx as a headless ACP CLI for agent-to-agent communication, including prompt/exec/sessions workflows, session scoping, queueing, permissions, and output formats.
npx skillsauth add hayatosc/dotfiles acpxInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
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:
exec)-s/--session)--no-wait)cancel) for in-flight turnssession/cancel on interruptset-mode, set <key> <value>)--fileconfig show|initsessions show, sessions history)statusauthenticate handshake via env/config credentialstext, json, quiet) with optional --suppress-reads--agent escape hatchnpm i -g acpx
For normal session reuse, prefer a global install over npx.
prompt is the default verb.
acpx [global_options] [prompt_text...]
acpx [global_options] prompt [prompt_options] [prompt_text...]
acpx [global_options] exec [prompt_options] [prompt_text...]
acpx [global_options] cancel [-s <name>]
acpx [global_options] set-mode <mode> [-s <name>]
acpx [global_options] set <key> <value> [-s <name>]
acpx [global_options] status [-s <name>]
acpx [global_options] sessions [list | new [--name <name>] | close [name] | show [name] | history [name] [--limit <count>]]
acpx [global_options] config [show | init]
acpx [global_options] <agent> [prompt_options] [prompt_text...]
acpx [global_options] <agent> prompt [prompt_options] [prompt_text...]
acpx [global_options] <agent> exec [prompt_options] [prompt_text...]
acpx [global_options] <agent> cancel [-s <name>]
acpx [global_options] <agent> set-mode <mode> [-s <name>]
acpx [global_options] <agent> set <key> <value> [-s <name>]
acpx [global_options] <agent> status [-s <name>]
acpx [global_options] <agent> sessions [list | new [--name <name>] | close [name] | show [name] | history [name] [--limit <count>]]
If prompt text is omitted and stdin is piped, acpx reads prompt text from stdin.
Friendly agent names resolve to commands:
pi -> npx pi-acpopenclaw -> openclaw acpcodex -> npx @zed-industries/codex-acpclaude -> npx -y @agentclientprotocol/claude-agent-acp (ACPX-owned package range)gemini -> gemini --acpcursor -> cursor-agent acpcopilot -> copilot --acp --stdiodroid -> droid exec --output-format acp (factory-droid and factorydroid also resolve to droid)iflow -> iflow --experimental-acpkilocode -> npx -y @kilocode/cli acpkimi -> kimi acpkiro -> kiro-cli-chat acpopencode -> npx -y opencode-ai acpqoder -> qodercli --acp
Forwards Qoder-native --allowed-tools and --max-turns startup flags from acpx session options.qwen -> qwen --acptrae -> traecli acp serveRules:
codex for top-level prompt, exec, and sessions.--agent <command> explicitly sets a raw ACP adapter command.--agent in the same command.Implicit:
acpx codex 'fix flaky tests'
Explicit:
acpx codex prompt 'fix flaky tests'
acpx prompt 'fix flaky tests' # defaults to codex
Behavior:
NO_SESSION and prompts for sessions newsession/cancel before force-kill fallbackPrompt 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)acpx exec 'summarize this repo'
acpx codex exec 'summarize this repo'
Behavior:
acpx codex cancel
acpx codex set-mode auto
acpx codex set thought_level high
acpx codex set model gpt-5.4
Behavior:
cancel: sends cooperative session/cancel through queue-owner IPC.set-mode: calls ACP session/set_mode.set-mode mode ids are adapter-defined; unsupported values are rejected by the adapter (often Invalid params).set: calls ACP session/set_config_option.thought_level is accepted as a compatibility alias for codex-acp reasoning_effort.--model <id>: Claude-compatible adapters may consume session creation metadata; other agents must advertise ACP models and support session/set_model, otherwise acpx fails clearly instead of silently falling back.set model <id>: calls session/set_model. This is the generic ACP method for mid-session model switching.set-mode/set route through queue-owner IPC when active, otherwise reconnect directly.acpx sessions
acpx sessions list
acpx sessions new
acpx sessions new --name backend
acpx sessions close
acpx sessions close backend
acpx sessions show
acpx sessions history --limit 20
acpx status
acpx codex sessions
acpx codex sessions new --name backend
acpx codex sessions close backend
acpx codex sessions show backend
acpx codex sessions history backend --limit 20
acpx codex status
Behavior:
sessions and sessions list are equivalentnew creates a fresh session for the current (agentCommand, cwd, optional name) scopenew --name <name> targets a named session scopenew replaces an existing open session in that scope, the old one is soft-closedclose targets 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)--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)--suppress-reads: suppress raw read-file contents while preserving the selected format--timeout <seconds>: max wait time (positive number)--ttl <seconds>: queue owner idle TTL before shutdown (default 300, 0 disables TTL)--model <id>: request an agent model during session creation; non-Claude agents must advertise ACP models and support session/set_model--verbose: verbose ACP/debug logs to stderrPermission flags are mutually exclusive.
Config files are merged in this order (later wins):
~/.acpx/config.json<cwd>/.acpxrc.jsonSupported keys:
defaultAgentdefaultPermissions (approve-all, approve-reads, deny-all)ttl (seconds)timeout (seconds or null)format (text, json, quiet)agents map (name -> { command, args? })auth map (authMethodId -> credential)Use acpx config show to inspect the resolved config and acpx config init to create the global template.
For ACP authenticate handshakes, use either config auth entries or explicit
ACPX_AUTH_<METHOD_ID> environment variables such as ACPX_AUTH_OPENAI_API_KEY.
Ambient provider env vars such as OPENAI_API_KEY are still passed through to
child agents, but they do not trigger ACP auth-method selection on their own.
Persistent prompt sessions are scoped by:
agentCommandcwdnamePersistence:
~/.acpx/sessions/*.json.-s/--session creates parallel named conversations in the same repo.--cwd changes scope and therefore session lookup.closed: true and closedAt.Resume behavior:
acpx creates a fresh session and updates the saved record.loadSession even if previously closed.--no-waitQueueing is per persistent session.
acpx process for a running prompt becomes the queue owner.~/.acpx/queues/<hash>.sock.~/.acpx/queues/<hash>.lock.--ttl).Submission behavior:
--no-wait: enqueue and return after queue acknowledgement.Ctrl+C during an active turn sends ACP session/cancel, waits briefly, then force-kills only if cancellation does not finish in time.cancel sends the same cooperative cancellation without requiring terminal signals.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--suppress-reads: replace raw read-file contents with [read output suppressed] in text and json outputExample automation:
acpx --format json codex exec 'review changed files' \
| jq -r 'select(.type=="tool_call") | [.status, .title] | @tsv'
--approve-all: no interactive permission prompts--approve-reads (default): approve reads/searches, prompt for writes--deny-all: deny all permission requestsIf every permission request is denied/cancelled and none approved, acpx exits with permission-denied status.
Persistent repo assistant:
acpx codex 'inspect failing tests and propose a fix plan'
acpx codex 'apply the smallest safe fix and run tests'
Parallel named streams:
acpx codex -s backend 'fix API pagination bug'
acpx codex -s docs 'draft changelog entry for release'
Queue follow-up without waiting:
acpx codex 'run full test suite and investigate failures'
acpx codex --no-wait 'after tests, summarize root causes and next steps'
One-shot script step:
acpx --format quiet exec 'summarize repo purpose in 3 lines'
Machine-readable output for orchestration:
acpx --format json codex 'review current branch changes' > events.ndjson
Raw custom adapter command:
acpx --agent './bin/custom-acp-server --profile ci' 'run validation checks'
Flow run:
acpx flow run ./my-flow.ts --input-file ./flow-input.json
acpx flow run examples/flows/branch.flow.ts --input-json '{"task":"FIX: add a regression test"}'
Repo-scoped review with permissive mode:
acpx --cwd ~/repos/shop --approve-all codex -s pr-842 \
'review PR #842 for regressions and propose minimal patch'
tools
Recommend a modern TypeScript toolchain. Use when choosing or updating a TypeScript stack for Node or CLI projects, libraries or packages, and web apps or APIs; selecting tsgo as the primary typechecker with tsc as compatibility fallback; recommending Hono, tsx, tsdown, Vite, Vitest, oxlint, oxlint-tsgolint, oxfmt, or deciding between bun and pnpm.
development
Implement, review, and refactor TypeScript code with a strong bias toward type safety. Use to fix TypeScript errors, remove `any` or unsafe `as`, review type safety, tighten TypeScript or lint settings, and ship ESM-first code that passes the repository's typecheck without weakening types.
development
Self-review, improve, commit, and push code that Claude has just written. Use this skill when the user asks Claude to "self-ship", "review and ship", "review then commit and push", or wants Claude to autonomously review its own output, apply improvements, and publish the changes to the remote repository. Triggered by: "self-ship", "ship it", "review and push", "review my changes and commit", or similar requests to complete the full write → review → commit → push cycle.
development
Analyze and execute behavior-preserving refactors in small, verified steps. Use when the user asks to refactor, clean up code structure, extract functions or modules, reduce duplication, improve maintainability, or modernize code without changing external behavior.