skills/acpx/SKILL.md
Headless ACP CLI for agent-to-agent communication. Use when running coding agents (pi/qwen/codex/claude/gemini) headlessly, managing persistent sessions, queueing prompts, or consuming structured agent output from scripts. 触发词:acpx, ACP, agent communication, headless agent, session management, agent orchestration, 代理通信, 无头代理
npx skillsauth add dwsy/agent 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.
ACP (Agent Client Protocol) 的无头 CLI 客户端,专为 agent-to-agent 通信设计,避免 PTY 抓取问题。
npm i -g acpx
| 能力 | 说明 |
|------|------|
| 持久会话 | 多轮对话,按 repo/cwd 自动恢复 |
| 一次性执行 | exec 模式,单次执行不保存状态 |
| 并行会话 | -s/--session 命名会话,同仓库多对话 |
| 队列管理 | 多个 prompt 自动排队,--no-wait 异步提交 |
| 权限控制 | --approve-all/--approve-reads/--deny-all |
| 结构化输出 | text/json/quiet 三种格式 |
| 优雅取消 | cancel 命令或 Ctrl+C 发送 ACP session/cancel |
| 名称 | 命令 |
|------|------|
| pi | npx pi-acp |
| qwen | qwen --acp |
| codex | npx @zed-industries/codex-acp |
| claude | npx -y @zed-industries/claude-agent-acp |
| gemini | gemini --acp |
| cursor | cursor-agent acp |
| copilot | copilot --acp --stdio |
| openclaw | openclaw acp |
| droid | droid exec --output-format acp |
| kimi | kimi acp |
| opencode | npx -y opencode-ai acp |
| kiro | kiro-cli acp |
| kilocode | npx -y @kilocode/cli acp |
默认 agent 是 codex。
# 基本用法
acpx <agent> '<prompt>' # 持久会话模式
acpx <agent> exec '<prompt>' # 一次性执行
acpx <agent> -s <name> '<prompt>' # 命名会话
# 会话管理
acpx <agent> sessions # 列出会话
acpx <agent> sessions new # 新建会话
acpx <agent> sessions show [name] # 显示会话详情
acpx <agent> sessions history [name] # 查看历史
acpx <agent> sessions close [name] # 关闭会话
# 控制
acpx <agent> cancel # 取消当前任务
acpx <agent> set-mode <mode> # 设置模式
acpx <agent> set <key> <value> # 设置选项
acpx <agent> status # 查看状态
| 选项 | 说明 |
|------|------|
| --agent <cmd> | 原始 ACP agent 命令(逃逸口) |
| --cwd <dir> | 工作目录(影响会话作用域) |
| --approve-all | 自动批准所有权限请求 |
| --approve-reads | 批准读取,写入需确认(默认) |
| --deny-all | 拒绝所有权限请求 |
| --format <fmt> | 输出格式:text/json/quiet |
| --timeout <s> | 最大等待时间 |
| --ttl <s> | 队列所有者空闲 TTL(默认 300s) |
| --verbose | 详细日志 |
人类可读的流式输出,带更新和工具状态。
NDJSON 事件流,适合自动化:
acpx --format json qwen 'review code' | jq -r 'select(.type=="tool_call") | [.status, .title] | @tsv'
仅输出最终结果,适合脚本:
result=$(acpx --format quiet qwen exec 'summarize repo')
# 第一次:分析问题
acpx qwen 'inspect failing tests and propose a fix plan'
# 后续:继续同一会话
acpx qwen 'apply the smallest safe fix and run tests'
acpx qwen -s backend 'fix API pagination bug'
acpx qwen -s docs 'draft changelog entry for release'
# 启动任务
acpx qwen 'run full test suite and investigate failures'
# 不等待,排队执行
acpx qwen --no-wait 'after tests, summarize root causes'
summary=$(acpx --format quiet exec 'summarize repo purpose in 3 lines')
echo "Summary: $summary"
acpx --format json qwen 'review current branch changes' > events.ndjson
acpx --agent './bin/custom-acp-server --profile ci' 'run validation checks'
acpx --cwd ~/repos/myproject --approve-all qwen -s pr-842 \
'review PR #842 for regressions and propose minimal patch'
会话作用域由以下决定:
agentCommand(agent 命令)cwd(工作目录)name持久化:
~/.acpx/sessions/*.json-s/--session 在同一仓库创建并行命名对话closed: true 和 closedAt 时间戳每个持久会话有独立队列:
acpx 进程成为队列所有者~/.acpx/queues/<hash>.sock配置合并顺序(后优先):
~/.acpx/config.json<cwd>/.acpxrc.json支持配置:
defaultAgent:默认 agentdefaultPermissions:权限模式ttl:空闲 TTLtimeout:超时format:输出格式agents:agent 名称映射auth:认证凭据acpx config show # 查看配置
acpx config init # 初始化全局配置模板
NO_SESSION:无持久会话,需先 sessions new--timeout 时退出session/cancel,等待后强制终止testing
Best practices for writing and maintaining high-quality role memories.
documentation
工作文档枢纽,强制执行 SSOT(Single Source of Truth)原则,管理 `docs/` 目录下的架构决策、设计文档、Issues(任务规划)、PRs(变更记录)。支持 GitHub 协作开发模式。
tools
Allows to interact with web pages by performing actions such as clicking buttons, filling out forms, and navigating links. It works by remote controlling Google Chrome or Chromium browsers using the Chrome DevTools Protocol (CDP). When Claude needs to browse the web, it can use this skill to do so.
development
Vercel 设计指南 - 构建高质量 Web 应用的最佳实践,包含现代 UI/UX 原则、性能优化和无障碍标准。