ワンクリックで
add-acp-backend
引导添加外部 ACP Agent Backend(如 claude-code、codex、qwen、goose 等),配置到 config.toml 的 [[backend]] 中。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
引导添加外部 ACP Agent Backend(如 claude-code、codex、qwen、goose 等),配置到 config.toml 的 [[backend]] 中。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Backend-agnostic team coordination workflow for lead agents.
Backend-agnostic team coordination workflow for specialist agents.
Create, edit, improve, or audit AgentSkills. Use when creating a new skill from scratch or when asked to improve, review, audit, tidy up, or clean up an existing skill or SKILL.md file. Also use when editing or restructuring a skill directory (moving files to references/ or scripts/, removing stale content, validating against the AgentSkills spec). Triggers on phrases like "create a skill", "author a skill", "tidy up a skill", "improve this skill", "review the skill", "clean up the skill", "audit the skill".
引导向 agent_roster 追加新 Agent,配置名称、触发 mention、Backend、Persona 和工作目录。
引导配置钉钉(DingTalk)Channel,包括企业应用创建、机器人配置、Webhook 接入和连通性验证。
引导配置飞书(Lark/Feishu)Channel,包括 App 创建、Webhook 配置、config.toml 写入和连通性验证。
| name | add-acp-backend |
| description | 引导添加外部 ACP Agent Backend(如 claude-code、codex、qwen、goose 等),配置到 config.toml 的 [[backend]] 中。 |
ClawBro Gateway 内置了 clawbro-rust-agent 作为默认 Backend(无需安装)。
本 Skill 引导你添加外部 ACP-compatible Agent,如:
claude-code(Anthropic Claude Code CLI)codex(OpenAI Codex CLI)qwen-code(阿里云通义千问 CLI)goose(Block 的 AI 助手)[ -f ~/.clawbro/config.toml ] && echo "✓ config.toml 存在" || echo "⚠ 请先运行 /setup"
询问用户要添加哪种 Backend:
请选择要添加的外部 ACP Backend:
1. claude-code — Anthropic Claude Code CLI(需要 Node.js + npm)
2. codex — OpenAI Codex CLI(需要 Node.js + npm)
3. qwen-code — 通义千问代码助手(需要 Node.js + npm)
4. goose — Block.xyz Goose AI(需要独立安装)
5. 其他 ACP CLI — 任意支持 ACP stdio 传输的 CLI 工具
根据选择进入对应分支。
which claude || npx --yes @anthropic-ai/claude-code --version 2>/dev/null || echo "未安装"
# 方式 1:全局安装(推荐)
npm install -g @anthropic-ai/claude-code
# 方式 2:每次通过 npx 调用(无需安装)
# Gateway 会在 backend.launch 中使用 npx 调用
询问:
claude-code,用于 agent_roster 中的 backend_id)全局安装:
[[backend]]
id = "claude-code"
family = "acp"
[backend.launch]
type = "command"
command = "claude"
args = ["--acp-server"]
npx 启动:
[[backend]]
id = "claude-code"
family = "acp"
[backend.launch]
type = "command"
command = "npx"
args = ["-y", "@anthropic-ai/claude-code", "--acp-server"]
which codex || npx --yes @openai/codex --version 2>/dev/null || echo "未安装"
npm install -g @openai/codex
codex)[[backend]]
id = "codex"
family = "acp"
[backend.launch]
type = "command"
command = "codex"
args = ["--acp"]
env = { OPENAI_API_KEY = "${OPENAI_API_KEY}" }
npm install -g @alibaba/qwen-code
[[backend]]
id = "qwen-code"
family = "acp"
[backend.launch]
type = "command"
command = "qwen"
args = ["--acp-server"]
env = { DASHSCOPE_API_KEY = "${DASHSCOPE_API_KEY}" }
Goose 需要从官网下载安装:
https://block.github.io/goose/docs/installation
或通过 pipx:
pipx install goose-ai
which goose && goose --version || echo "未安装"
[[backend]]
id = "goose"
family = "acp"
[backend.launch]
type = "command"
command = "goose"
args = ["agent"]
询问:
my-agent)my-agent、/usr/local/bin/my-agent)["--acp", "--stdio"])MY_API_KEY)[[backend]]
id = "<backend-id>"
family = "acp"
[backend.launch]
type = "command"
command = "<命令>"
args = [<参数列表>]
<如有 env>env = { <KEY> = "${<KEY>}" }
<如有 cwd>cwd = "<工作目录>"
询问:是否要将新 Backend 关联到某个 Agent(或新建一个 Agent)?
选项 A:新建 Agent 使用此 Backend
# 收集 Agent 参数
# 然后追加 [[agent_roster]] 到 config.toml
生成:
[[agent_roster]]
name = "<agent-name>"
mentions = ["@<mention>"]
backend_id = "<backend-id>"
<如有>workspace_dir = "<目录>"
选项 B:更新已有 Agent 的 Backend
# 显示当前 agent_roster
grep -A 5 '\[\[agent_roster\]\]' ~/.clawbro/config.toml
提示用户手动编辑或告知 AI 哪个 agent 需要更新。
选项 C:只添加 Backend,不关联 Agent(手动配置)
跳过 Agent 关联步骤。
# 备份
cp ~/.clawbro/config.toml ~/.clawbro/config.toml.bak.$(date +%Y%m%d%H%M%S)
# 追加 backend 配置
cat >> ~/.clawbro/config.toml << 'TOMLEOF'
<生成的 [[backend]] 配置段>
TOMLEOF
# 如有新 agent,追加
<如有>cat >> ~/.clawbro/config.toml << 'TOMLEOF'
<生成的 [[agent_roster]] 配置段>
TOMLEOF
echo "✓ Backend 配置已写入"
# 测试 ACP backend 能否正常启动(仅检查能否执行,不做完整握手)
<command> <args...> --help 2>&1 | head -5 || echo "⚠ 命令无法执行,请检查安装"
source ~/.clawbro/.env && clawbro-gateway &
GATEWAY_PID=$!
sleep 2
PORT=$(cat ~/.clawbro/gateway.port 2>/dev/null || echo "8080")
# 检查 backend 状态
curl -s http://127.0.0.1:$PORT/diagnostics/backends 2>/dev/null | python3 -m json.tool || \
curl -s http://127.0.0.1:$PORT/health
kill $GATEWAY_PID
✓ Backend 已添加!
Backend ID:<id>
命令:<command> <args>
关联 Agent:<agent-name | 未关联>
使用时,在消息中 @<mention> 就会使用此 Backend。
或者在 [[agent_roster]] 中将 backend_id 设为 "<id>"。
其他可用操作:
/add-agent — 向 roster 追加更多 Agent
/doctor — 诊断 Backend 是否正常工作
# ─── 内置 Backend(无需安装)───────────────────────
[[backend]]
id = "native-main"
family = "quick_ai_native"
[backend.launch]
type = "bundled_command"
# ─── claude-code(全局安装)────────────────────────
[[backend]]
id = "claude-code"
family = "acp"
[backend.launch]
type = "command"
command = "claude"
args = ["--acp-server"]
# ─── claude-code(npx,无需安装)───────────────────
[[backend]]
id = "claude-code-npx"
family = "acp"
[backend.launch]
type = "command"
command = "npx"
args = ["-y", "@anthropic-ai/claude-code", "--acp-server"]
# ─── codex ─────────────────────────────────────────
[[backend]]
id = "codex"
family = "acp"
[backend.launch]
type = "command"
command = "npx"
args = ["-y", "@openai/codex", "--acp"]
env = { OPENAI_API_KEY = "${OPENAI_API_KEY}" }