بنقرة واحدة
add-teammate
在现有 team 中增加一个 teammate:走简化版 spawn-team 流程(只处理单人)。 Team lead 可自主调用(用户自然语言同意后)。只在 team lead 上下文有效。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
在现有 team 中增加一个 teammate:走简化版 spawn-team 流程(只处理单人)。 Team lead 可自主调用(用户自然语言同意后)。只在 team lead 上下文有效。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Team lead invokes after session restart: reads TEAMMATE_INFO.json to rebuild the team by using the Agent tool to spawn fresh sessions for each active teammate (name must be <slug>-<role>; permission mode inherits the lead, not set per-teammate at spawn), guiding each to read its workstation's working-context.md (Part A snapshot + Part B work journal) to self-recover state. No-arg invocation wakes only active/idle and **skips benched** (temporarily offline); `/reactivate-team <name>` wakes back one specified (usually benched) teammate. This is the ONLY way to "recover a team across sessions" — Claude Code does not auto-respawn teammates.
Structured flow for a team lead to assemble a Claude Code agent team. 6 phases: task decomposition → lineup proposal (selected from role_archetypes) → plan-mode gating → adversarial check → user confirmation → spawn each teammate via the Agent tool (name must be <slug>-<role>; permission mode inherits the lead, not set per-teammate at spawn) + save team_recipe. After Phase 5 user confirmation, Phase 6 spawns immediately with no additional confirmation. The agent can invoke autonomously; if currently a flat workstation, it will first guide through /promote-to-team.
Team lead 在 session 重启后调用,读 TEAMMATE_INFO.json 重建 team: 为每个 active teammate 用 Agent 工具 spawn 新 session(name 必须为 <slug>-<role>;权限模式继承 lead,不在 spawn 时单设), 引导它读自己工位的 working-context.md(Part A 快照 + Part B 工作日志)恢复状态。 无参调用只唤醒 active/idle,**跳过 benched**(临时下线);`/reactivate-team <name>` 单独唤回指定的(通常是 benched)teammate。这是"跨 session 团队恢复"的唯一方式—— Claude Code 不会自动 respawn teammate。
Team lead 组建 Claude Code agent team 的结构化流程。6 阶段:任务分解 → 阵容提案 (从 role_archetypes 选) → plan-mode gating → 对抗性检查 → 用户确认 → 用 Agent 工具(name 必须为 <slug>-<role>;权限模式继承 lead,不在 spawn 时单设)逐一 spawn 每个 teammate + 保存 team_recipe。Phase 5 用户确认后直接 spawn,不再额外确认。Agent 可自主调用;若当前是扁平工位,会先引导 /promote-to-team。
Add a teammate to an existing team: runs a simplified spawn-team flow (single person only). Team lead can invoke autonomously (after natural-language user consent). Valid only in team lead context.
Temporarily take a teammate offline (benched): have it write a final checkpoint, close its session to free an online slot, but **keep its full record + workstation + docs**, and set its status to benched in TEAMMATE_INFO.json. Unlike /remove-teammate (permanent offboard), benched means "will come back" — wake it later with `/reactivate-team <name>`. Team lead invokes autonomously (after user consent). Only valid in team lead context.
| name | add-teammate |
| description | 在现有 team 中增加一个 teammate:走简化版 spawn-team 流程(只处理单人)。 Team lead 可自主调用(用户自然语言同意后)。只在 team lead 上下文有效。 |
| disable-model-invocation | false |
| allowed-tools | Read Write Edit Glob Grep |
/add-teammate — 向现有 team 增加一个 teammate先从对话 context 推断:你应该已经知道自己是 team lead。无法推断时:
_agent_team_work_zone/*_team/向用户或从对话 context 收集:
查阅:
resources/agents/):tracker / investigator / reviewer / devil-advocate / git-repo-managerresources/role_archetypes/):9 个<SELF>_team/teammates/)原则:
## 新 teammate 提案
- **name**: <slug>-<role>(**必须** `<slug>-<role>` 格式:slug = 本 team 工位名去 `_team`、单 token 无连字符;role 可含连字符。例 `architect-reviewer`。全局唯一)
- **角色来源**: <subagent 名 / role_archetype 路径 / 原创>
- **模型**: <haiku / sonnet / opus>
- **Plan-mode gating**: <YES / NO>
- **作用域**: <具体可碰的文件/目录>
- **禁区**: <不能碰的>
- **交付物**: <产出什么>
- **与现有 team 的协作**: <谁给它派活、它的产出给谁>
你同意加入这个 teammate 吗?
等用户明确同意后进入 Phase 4。
路径:_agent_team_work_zone/<SELF>_team/teammates/<teammate-name>/
创建 5 个文件(Rule 13 规定的 teammate 自维护 5 文件):
README.md — 角色定义:写 Phase 3 里收集的昵称、模型、作用域、禁区、交付物、plan-mode gating 说明,以及(可选)一个空的 ## Checkpoint Instructions 段位供后续定制working-context.md — 初始占位:
# Working Context — <teammate-name>
_Initialized at spawn. Run /checkpoint to populate._
completed.md — 空文件(append-only 日志,由 /checkpoint 的 task_completed trigger 追加)TODO.md — 空文件commitments.md — 空文件在 _agent_team_work_zone/<SELF>_team/TEAMMATE_INFO.json 的 active_teammates 数组尾部追加一条(如果文件不存在,先按 schema v1 初始化 — 参见 docs/teammate_info_schema.md):
{
"name": "<teammate-name>",
"role_source": {
"type": "archetype" | "subagent" | "tier2" | "inline",
"path": "..." // 或 subagent_name 或 inline_description
},
"model": "<haiku|sonnet|opus>",
"plan_mode_gating": <true|false>,
"scope": "<作用域简述>",
"spawned_at": "<ISO8601 当前时间>",
"last_checkpoint_at": null,
"revived_count": 0,
"status": "active"
}
同时更新顶层 updated_at 为当前时间。
jq 示例(如果可用):
jq --argjson entry '<json 对象>' --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
'.active_teammates += [$entry] | .updated_at = $ts' \
_agent_team_work_zone/<SELF>_team/TEAMMATE_INFO.json > /tmp/info.json && \
mv /tmp/info.json _agent_team_work_zone/<SELF>_team/TEAMMATE_INFO.json
我要向现有的 <SELF> team 增加一个新的 teammate:
<昵称>(模型:<model>)
角色定义:<引用或填入内容>
任务:<细节>
Plan-mode gating: <YES/NO + 批准标准>
你的工位在 _agent_team_work_zone/<SELF>_team/teammates/<昵称>/(README/working-context/
completed/TODO/commitments 5 个文件已由 lead 初始化)。按 Rule 13 维护它:进入 idle 前、
收到 checkpoint 提醒时、任务完成后调用 /checkpoint 更新 working-context.md。
它的产出写到 _agent_team_work_zone/<SELF>_team/roundtable/,和其他 teammate 通过 mailbox 协作。
请 spawn 这个新 teammate 加入现有 team。
不新建 recipe 文件(那是 /spawn-team 的事)。而是:
<SELF>_team/team_recipes/ 下按时间倒序第一个)---
## Amendment — YYYY-MM-DD HH:MM — add-teammate
### 新增 teammate
<Phase 3 的提案内容>
### 原因
<Phase 1 收集的需求>
### Spawn Prompt
<Phase 4 生成的 prompt>
这样后续 /evaluate-team 或下次 /spawn-team 能看到完整 team 演化历史。
在下一条消息把 Phase 5 的 prompt 发出,Claude Code 内置机制识别并 spawn。
✅ teammate 工位骨架已创建(5 文件)
✅ TEAMMATE_INFO.json 已追加新条目
✅ team_recipes/<latest>.md 已追加 Amendment
下一步发送 spawn prompt 给 Claude Code agent-team 机制
<SELF>_team/roundtable/