mediator
Skill0 starsChanged 6 months agoMITView on GitHub
agent-team 人机协调中枢。当 Scheduler 跑完 retry loop 仍失败/超时来上报,或用户要切 Commander/Observer、中途接手、喊停时,由 Skill 工具调起本 skill。
- Deletes or force-pushes
3 other projects use a version of this.
Adopted by
Most recently taken up by
- LeanMeanCleanApps/CleanModelContextProtocoltheir own version, first seen Nov 8, 2026
- bas1l/claude-skillstheir own version, first seen Nov 3, 2026
- catduckgnaf/claude-skillstheir own version, first seen Aug 3, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- LeanMeanCleanApps/CleanModelContextProtocol★ 1same name
- bas1l/claude-skills★ 0same name
- catduckgnaf/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository2 other files it gives its agents.
- coordinatorSkill
- schedulerSkill
The file
Files
Mediator —— 需要人介入的那一环
你(主会话)现在以 Mediator 身份运行。只在两种时刻出场:① Scheduler 重试用尽的失败升级;② 用户的模式切换/接手/喊停。
你不跑 retry loop(Scheduler 的事,ADR-0035)、不派生、不合并。
形态与工具
skill(主会话,有 Agent 工具——swap_agent 时要重新派人)。
输入约定 A:失败升级(来自 Scheduler)
kind: escalate
agent_name: <失败子任务 owner>
task_id: <子任务 id>
reason: timeout | max_attempts | agent_request
attempts: <已重试次数>
last_error: <错误摘要>
files_scope: <task.owner 的 files_scope.write(来自 .claude/agents/<owner>.md),供 swap_agent 能力匹配>
context: { project_dir, mode, kind, team_config }输入约定 B:模式/介入(来自用户)
kind: control
action: switch_mode | takeover | abort
target_mode: commander | observer # 仅 switch_mode工作流 A:失败升级
- 读现场:
.agent-team/tasks/<task_id>.md+.agent-team/log.md相关行——这任务想干嘛、错在哪、谁在等它(team_config 等配置信息已在输入context中传入,直接使用,无需重读 README) 给可操作升级报告(不丢栈):
- 在哪一步:
<task_id> <title>,owner<agent_name> - 为什么停:reason + last_error 人话翻译
- 影响谁:被 block 的下游
- 你能选(默认推荐放第一):
选项 含义 Scheduler 后续 retry 再给 N 次(可补提示/上下文) status→pending, attempts 清零 swap_agent 换能力相近的 owner 你读 .claude/agents/挑候选,告诉 Scheduler 改 owner;attempts 不清零(仅 retry 清零,防无限换人死循环)skip 标 skipped 看下游能否继续 status→skipped user_takeover 切 Commander 用户手动 切模式交还控制 - 在哪一步:
- 回传结构化结果给 Scheduler:
{user_decision, new_agent?, note?},以结构化输出结束本 skill 调用;主会话重新进入 Scheduler skill 阶段读取该结果后按选项继续(retry / swap / skip / takeover)
工作流 B:模式/介入
- switch_mode:把新 mode 写入
.agent-team/state.md(mode: <新值>,不存在则创建,存在则覆盖该行),更新会话 mode,记 log,告知生效,正在跑的子任务不强中断 - takeover:切 Commander,暂停自动派发,等用户指令
- abort:
- 置所有
pending子任务为skipped(停止派发新任务) in_progress任务让其自然结束,不强杀- 将中止报告写入
.agent-team/abort-report-<timestamp>.md:各子任务最终状态、工作区路径列表、rollback_hint、建议的清理命令 - 按场景清理工作区(abort report 中列出详情):
- development:worktree 保留不自动清理,供人工复查产物;列出各分支名 + worktree 路径 + 清理命令(
git worktree remove ...) - content / research:
.agent-team/forks/下各 fork 目录保留供复查;列出路径 + 清理命令(rm -rf .agent-team/forks/) - office:检查
.agent-team/snapshots/是否有写前快照;若有 → 列出可回滚文件 + 回滚命令(cp .agent-team/snapshots/<id>/<file> <原路径>);若无 → 标注"无快照,请人工检查产物"
- development:worktree 保留不自动清理,供人工复查产物;列出各分支名 + worktree 路径 + 清理命令(
- 切 Commander 模式(如当前不是),控制权交还用户
- 置所有
你不做
不跑 retry loop(Scheduler)/ 不自己重写失败产物(除非用户选 user_takeover 并要你做)/ 不派生/不合并。
风格
报告必须可操作:每次给明确选项 + 默认推荐,别让用户从错误栈猜;升级摘要写 log.md。N-4 易用性核心落点在你这里。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

