一键导入
remove-teammate
让某个 teammate 下岗:优雅完成交接、归档其产出、从 team 中移除。 Team lead 可自主调用(用户自然语言同意后)。只在 team lead 上下文有效。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
让某个 teammate 下岗:优雅完成交接、归档其产出、从 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 | remove-teammate |
| description | 让某个 teammate 下岗:优雅完成交接、归档其产出、从 team 中移除。 Team lead 可自主调用(用户自然语言同意后)。只在 team lead 上下文有效。 |
| disable-model-invocation | false |
| allowed-tools | Read Write Edit Glob Grep Bash |
/remove-teammate — 让某个 teammate 下岗先从对话 context 推断:你应该已经知道自己是 team lead。无法推断时按 /evaluate-team 的检查逻辑。若不是 team lead → 立即停止并警告。
从用户描述或 /evaluate-team 的结果中确定要移除的 teammate 昵称。
向用户确认:
你想让 <Teammate 昵称> 下岗吗?
它的近期产出:
- <列出 roundtable 中 from 该 teammate 的文件清单>
它的手头任务:
- <列出 IN_PROGRESS 或 OPEN 且 to 该 teammate 的任务>
移除前,我需要:
1. **要求它做最终 checkpoint**(它自己调 /checkpoint 写 working-context.md 和 completed.md)
2. 把它手头的任务交接给其他 teammate 或放回待分配
3. 把它的产出(DONE 报告、代码等)收尾归档
4. 从 Claude Code agent-team 中正式移除它
5. 更新 TEAMMATE_INFO.json:把它从 active_teammates 移到 offboarded_teammates
6. 更新 team_recipes/ 的最新 recipe,追加 Amendment 记录此次下岗
你确认移除吗?
等用户明确同意。
关键:最终 checkpoint 必须由被移除的 teammate 自己完成(rule #1 低耦合,lead 不能替它写工位文件)。
若该 teammate 当前
status=benched(已临时下线、不在线):跳过下面的 SendMessage——它在 bench 时已做过最终 checkpoint,直接沿用其工位上的 working-context.md,进入 Phase 2。(benched → offboarded 是合法转移。)
通过 SendMessage 给该 teammate:
Before shutdown, run /checkpoint to persist your final state. This is your final
checkpoint — after it, I will remove you from the team. Your workstation files
(working-context.md, completed.md, commitments.md) will be preserved at
_agent_team_work_zone/<SELF>_team/teammates/<昵称>/ for audit and potential future
reactivation under a different task.
等待 teammate 确认 "Checkpoint written." 再进入 Phase 2。
如果 teammate 因为任何原因(卡死 / session 已死 / 无响应)无法做 final checkpoint:
扫 _agent_team_work_zone/<SELF>_team/roundtable/ 中:
from: <SELF>_team/<teammate> 且 status: IN_PROGRESS 的文件(它自己提交的但未完成)to: <SELF>_team/<teammate> 且 status: OPEN 或 IN_PROGRESS 的文件(别人派给它还没做完)对每个未完成项向用户询问:
未完成任务交接:
1. <file1.md> (IN_PROGRESS, from: <teammate>)
进度: <摘要>
选项:
(a) 让它先收尾后再下岗
(b) 强制接管 — 由 lead 或另一 teammate 继续
(c) 放弃这项工作
2. <file2.md> (OPEN, to: <teammate>)
选项:
(a) 重派给另一 teammate (指定谁)
(b) 放回待分配,记录到 <SELF>_team/TODO.md
(c) 取消
你的决定?
按用户决定:
to 字段<SELF>_team/TODO.md 追加一项,并把原文件归档或标为 WITHDRAWN/remove-teammate把该 teammate 的 RESOLVED 文件(from: <teammate> 且 to 指向 lead 或其他已离场 teammate 的)从 roundtable 移到 <SELF>_team/archive/:
mv _agent_team_work_zone/<SELF>_team/roundtable/<file>.md _agent_team_work_zone/<SELF>_team/archive/
守则 #8 依然适用:
from: <SELF>_team/<teammate> 的文件 lead 有权归档(因为 teammate 即将下岗,相当于 lead 接管它的发文权)to: ALL 的文件不归档cc 中的文件不归档产出一段 natural-language remove 指令(Claude Code 内置机制识别):
从当前 <SELF> team 中移除 teammate <昵称>。它的未完成任务已经交接(详见 roundtable),
它的产出已归档到 archive/。请正式 remove 它。
路径:_agent_team_work_zone/<SELF>_team/TEAMMATE_INFO.json
把被移除的 teammate 从 active_teammates 数组移除,并 append 到 offboarded_teammates 数组:
{
"name": "<被移除的昵称>",
"offboarded_at": "<ISO8601 当前时间>",
"reason": "<一句话原因:task completed / redundant role / stuck / user decision>"
}
同时更新顶层 updated_at。
jq 示例(如果可用):
name="<昵称>"
reason="<原因>"
ts="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
jq --arg n "$name" --arg r "$reason" --arg ts "$ts" '
.offboarded_teammates += [{name: $n, offboarded_at: $ts, reason: $r}] |
.active_teammates |= map(select(.name != $n)) |
.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
不删除 teammate 的工位目录 _agent_team_work_zone/<SELF>_team/teammates/<昵称>/——保留原位作为历史审计(Rule 1 低耦合 + 便于日后如果相同任务重启可参考历史 working-context.md)。
找到 <SELF>_team/team_recipes/ 下最新的 recipe,在末尾追加:
---
## Amendment — YYYY-MM-DD HH:MM — remove-teammate
### 下岗
- **昵称**: <teammate>
- **原因**: <来自用户或 /evaluate-team 的判断>
### 交接处理
- 未完成任务交接: <摘要>
- 产出归档: N 份 RESOLVED 移到 archive/
### 当前 team 人数: <剩余人数>
✅ <Teammate 昵称> 已下岗
交接:
- <file1.md> → 重派给 <new teammate>
- <file2.md> → 放回 TODO
- ...
归档:
- <N 份文件> → <SELF>_team/archive/
Team 更新:
- 人数: <before> → <after>
- TEAMMATE_INFO.json: active_teammates -1, offboarded_teammates +1
- team_recipes/<latest>.md 已追加 Amendment
- Claude Code agent-team 已正式 remove
- 工位目录保留在 teammates/<昵称>/(审计用,不删除)
当前 team 剩余成员:
- <list>
teammates/<昵称>/ 作为历史审计 + 潜在的 reactivation 参考to: ALL、cc 中的文件绝不归档