원클릭으로
add-team-mode
引导为群组或单聊启用 Team 模式(Lead + Specialists 协作),配置 [[group]] 或 [[team_scope]] 段。
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
引导为群组或单聊启用 Team 模式(Lead + Specialists 协作),配置 [[group]] 或 [[team_scope]] 段。
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".
引导添加外部 ACP Agent Backend(如 claude-code、codex、qwen、goose 等),配置到 config.toml 的 [[backend]] 中。
引导向 agent_roster 追加新 Agent,配置名称、触发 mention、Backend、Persona 和工作目录。
引导配置钉钉(DingTalk)Channel,包括企业应用创建、机器人配置、Webhook 接入和连通性验证。
| name | add-team-mode |
| description | 引导为群组或单聊启用 Team 模式(Lead + Specialists 协作),配置 [[group]] 或 [[team_scope]] 段。 |
Team 模式让 ClawBro Gateway 支持多 Agent 协作:
echo "--- 当前 agent_roster ---"
grep -A 6 '\[\[agent_roster\]\]' ~/.clawbro/config.toml 2>/dev/null || echo "⚠ 无 agent_roster"
Team 模式要求:
如果 roster 不够,提示:
当前 roster 中 Agent 数量不足以配置 Team 模式。
Team 模式最少需要 2 个 Agent(1 Lead + 1 Specialist)。
请先运行 /add-agent 添加更多 Agent。
grep -q '\[\[group\]\]\|\[\[team_scope\]\]' ~/.clawbro/config.toml 2>/dev/null && \
echo "⚠ 已有 Team 配置,本次将追加新配置" || \
echo "✓ 将新建 Team 配置"
询问用户:
Team 模式可以绑定到:
1. 群组(Group)— 绑定到飞书/钉钉群
- 群里的消息触发 Lead Agent
- Lead 在后台分配给 Specialists
- 支持 auto_promote(关键词自动升级)
2. 单聊 Scope — 绑定到某个用户或 WebSocket session
- 个人工作台也能享受 Team 编排
- 适合开发者通过 WS 使用
3. 两者都配置
飞书群:
飞书群的 scope 格式为:group:lark:<chat_id>
chat_id 格式:oc_xxxxxxxxxxxxxxxxxx
获取方式:
- 飞书开发者后台 → 消息测试 → 选择群聊 → 查看 chat_id
- 或让机器人发一条消息,在事件 payload 中查看 chat_id
钉钉群:
钉钉群的 scope 格式为:group:dingtalk:<conversationId>
conversationId 可以在收到的消息 payload 中找到。
WebSocket 测试群:
如果用 WebSocket 测试,可以使用任意字符串:
group:ws:test-group-001
询问用户:群组的 scope 字符串是什么?
询问:
lark / dingtalk / ws)关于 public_updates(通知详细程度):
选择群里看到的更新粒度:
minimal — 只有 Lead 明确回复用户时才发消息(最安静,推荐)
normal — 加上任务完成/阻塞/失败的关键事件
verbose — 所有里程碑都通知(调试时用)
关于 max_parallel(最大并行任务数):
同时允许几个 Specialist 并发执行?(默认 3)
建议:
- 2:保守,资源消耗低
- 3:默认值,适合大多数场景
- 5+:激进,适合大型任务但 API 成本高
关于 auto_promote(自动升级到 Team 模式):
当 Lead 收到包含特定关键词的消息时,自动切换到 Team 模式?
(关键词如:"实现"、"重构"、"开发"、"设计方案")
false = 总是由用户明确请求 Team 模式(更可控)
true = AI 自动判断是否需要 Team(更智能)
[[group]]
scope = "<group-scope>"
name = "<group-name>"
[group.mode]
interaction = "team"
front_bot = "<lead-agent-name>"
channel = "<lark|dingtalk|ws>"
auto_promote = <true|false>
[group.team]
roster = [<specialist-name-list>]
public_updates = "<minimal|normal|verbose>"
max_parallel = <N>
飞书用户:
飞书单聊 scope 格式:user:lark:<open_id>
open_id 格式:ou_xxxxxxxxxxxxxxxxxx
获取方式:在飞书事件 payload 的 sender.open_id 中找到
WebSocket:
WS scope 格式:user:ws:<任意字符串>
示例:user:ws:dev-local
询问用户:要绑定的 scope 字符串?
与群组类似,但通常配置更轻量:
minimal)[[team_scope]]
scope = "<scope>"
name = "<name>"
[team_scope.mode]
interaction = "team"
front_bot = "<lead-agent-name>"
channel = "<channel>"
[team_scope.team]
roster = [<specialist-list>]
public_updates = "minimal"
max_parallel = 2
# 备份
cp ~/.clawbro/config.toml ~/.clawbro/config.toml.bak.$(date +%Y%m%d%H%M%S)
# 追加 Team 配置
cat >> ~/.clawbro/config.toml << 'TOMLEOF'
<生成的 [[group]] 或 [[team_scope]] 段>
TOMLEOF
echo "✓ Team 模式配置已写入"
echo "--- 新增的 Team 配置 ---"
grep -A 12 '\[\[group\]\]\|\[\[team_scope\]\]' ~/.clawbro/config.toml | tail -20
source ~/.clawbro/.env && clawbro-gateway &
GATEWAY_PID=$!
sleep 2
PORT=$(cat ~/.clawbro/gateway.port 2>/dev/null || echo "8080")
# 健康检查
curl -s http://127.0.0.1:$PORT/health | python3 -m json.tool 2>/dev/null
kill $GATEWAY_PID
功能测试步骤:
1. 向 Lead Agent 发送一个需要多步骤的任务
示例:"请帮我分析这个项目的代码结构,并提出3个改进建议"
2. 观察 Lead 是否:
- 拆解为子任务分配给 Specialists
- 等待 Specialists 完成后汇总结果
- 返回最终回复
3. 如果 verbose 模式,群里应该能看到进度更新
群组模式:
✓ Team 模式已为群组启用!
群组:<group-name>
Scope:<scope>
Lead:<lead-agent>
Specialists:<specialist-list>
并行上限:<max_parallel>
更新模式:<public_updates>
在群里向 @<lead-mention> 发送复杂任务,Team 就会开始协作。
单聊模式:
✓ Team 模式已为单聊 Scope 启用!
Scope:<scope>
Lead:<lead-agent>
Specialists:<specialist-list>
通过 WS 或飞书单聊发送复杂任务即可触发 Team 协作。
# ─── 飞书群的 Team 模式 ────────────────────────────
[[group]]
scope = "group:lark:oc_xxxxxxxxxxxxxxxxxx"
name = "研发群"
[group.mode]
interaction = "team"
front_bot = "lead"
channel = "lark"
auto_promote = false
[group.team]
roster = ["coder", "researcher", "reviewer"]
public_updates = "minimal"
max_parallel = 3
# ─── WS 单聊的 Team 模式(本地测试)──────────────
[[team_scope]]
scope = "user:ws:dev-local"
name = "本地开发工作台"
[team_scope.mode]
interaction = "team"
front_bot = "lead"
channel = "ws"
[team_scope.team]
roster = ["coder", "reviewer"]
public_updates = "normal"
max_parallel = 2
Q: Lead 分配了任务但 Specialists 不回复
/doctorQ: 任务一直在 pending 状态
Q: auto_promote = true 但没有自动触发 Team 模式
mode_selector.rs 中定义(默认包含"实现"、"开发"、"重构"等)