一键导入
debate
Orchestrate a real-time alternating debate between two subagents using ai serve/send. Judge controls rounds by prompting each agent in turn.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Orchestrate a real-time alternating debate between two subagents using ai serve/send. Judge controls rounds by prompting each agent in turn.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Planner-Generator-Evaluator 编排模式。GAN 启发的多 agent 动态编排,通过 ai CLI 控制子 agent 完成复杂任务的拆解-执行-验证闭环。
Code review skill using codex-rs methodology with ai CLI
为任意代码仓库构建结构化知识库(code wiki),并通过 frozen snapshot 机制启动即问即答的 expert agent。 当你需要深入理解一个大型代码仓库、构建可复用的代码知识库、或为其他 agent 提供代码专家服务时使用此技能。
Use the mcporter CLI to list, configure, auth, and call MCP servers/tools directly (HTTP or stdio), including ad-hoc servers, config edits, and CLI/type generation.
任务规划与进度追踪。当任务有 5+ 步骤、多文件改动、或长执行链时使用。 核心机制:用 checkbox 列表追踪进度,每完成一步立即更新,利用"重写列表"将完整任务清单重新注入 context。
使用 ai serve/send/watch/kill 控制子 agent 的通用指引。所有需要子 agent 的技能都应参考此技能,而非重复定义 spawn/cleanup 流程。
| name | debate |
| description | Orchestrate a real-time alternating debate between two subagents using ai serve/send. Judge controls rounds by prompting each agent in turn. |
Run a structured debate between two agents (proposer FOR, opposer AGAINST). You are the judge — you control rounds by prompting each agent in turn. Agents write to a shared file and you read their output.
子 agent 生命周期遵循 subagent 技能: spawn → watch → cleanup。辩论结束后必须 ai kill 清理双方 agent。
⚠️ MUST:在执行任何子 agent 操作前,确认 subagent 技能已加载到当前上下文。如果未加载,先调用 find_skill 工具(参数 name="subagent", load=true)加载它。
Key optimization: R1 gives full context (working directory, file paths, reference links) so the agent doesn't waste time discovering what you already know. R2+ inlines the opponent's argument in the prompt so the agent doesn't re-read the debate file.
DEBATE_TOPIC="YOUR TOPIC HERE"
DEBATE_CONTEXT="- Working directory: ...
- Key file paths: ...
- Reference links: ..."
ROUNDS=3
DEBATE_FILE="/tmp/debate-$(date +%s).md"
SYSTEM_DIR="/Users/genius/.ai/skills/debate/references"
# Create empty debate file
touch "$DEBATE_FILE"
用 subagent 技能 spawn 2 个子 agent(并行),参数:
| Agent | system-prompt | name | timeout |
|---|---|---|---|
| Proposer | @$SYSTEM_DIR/proposer-system.md | proposer | 30m |
| Opposer | @$SYSTEM_DIR/opposer-system.md | opposer | 30m |
完整 spawn 代码(tmux +
--id-file)见subagent技能 Spawn 阶段。
遵循 subagent 技能 Multi-Turn 模式(ai send + ai watch 循环)。
每轮的 prompt 构造逻辑:
Proposer prompt(R1):
Topic: $DEBATE_TOPIC
$DEBATE_CONTEXT
Write your R1 arguments to: $DEBATE_FILE
Ground every claim in specific code. When done, just stop — the judge will read your output.
Proposer prompt(R2+):
Round $round. Rebut the opponent's arguments:
$(tail -100 "$DEBATE_FILE")
Append your R${round} rebuttal to: $DEBATE_FILE
Ground every claim in specific code.
Opposer prompt(R1):
Topic: $DEBATE_TOPIC
$DEBATE_CONTEXT
Read the proposer's R1 arguments from: $DEBATE_FILE
Append your R1 rebuttal to: $DEBATE_FILE
Ground every claim in specific code.
Opposer prompt(R2+):
Round $round. Rebut the proposer's arguments:
$(tail -100 "$DEBATE_FILE")
Append your R${round} rebuttal to: $DEBATE_FILE
Ground every claim in specific code.
每轮顺序:Proposer ai send --wait → Opposer ai send --wait,交替执行。
# 完整示例:每轮发送
ai send --id "$PROP_ID" --wait --timeout 5m "<prompt>"
ai send --id "$OPP_ID" --wait --timeout 5m "<prompt>"
⚠️
--timeout使用 Go duration 格式(5m、300s、1h),不能写裸数字300。
遵循 subagent 技能 Cleanup 阶段(ai kill + rm -f $ID_FILE),清理 Proposer 和 Opposer。
Judge (you) Proposer Opposer
│ │ │
├── send R1 context ──────►│ │
│ (working dir, files) │ reads source, │
│ │ writes to debate file│
│◄── watch done ───────────│ │
│ │ │
├── send R1 rebuttal ────────────────────────────►│
│ (inline proposer R1) │ │
│ │ reads source, │
│ │ appends rebuttal │
│◄── watch done ──────────────────────────────────│
│ │ │
├── send R2 (inline opponent) ──►│ │
│ ... no file re-read after R1 ...│ │
R1: Each agent reads source code once. R2+: Opponent argument inlined in prompt. No file re-read. Fast rebuttal.
After the debate, read the transcript and synthesize:
## Debate Verdict
**Topic:** <topic>
**Conclusion:** <feasible | not feasible | feasible with conditions>
### Key Arguments
| Round | Proposer (正方) | Opposer (反方) |
|-------|----------------|----------------|
| 1 | <key point> | <key rebuttal> |
| ... | ... | ... |
### Decisive Factor
<what tipped the balance>
references/proposer-system.md — "You argue FOR feasibility"references/opposer-system.md — "You argue AGAINST feasibility"| ❌ Wrong | ✅ Right |
|---|---|
ai serve in foreground | 遵循 subagent 技能 spawn 模式 |
| Send before serve is ready | sleep 1 after spawn, then cat $ID_FILE |
| Both agents write same file simultaneously | Alternate: proposer first, then opposer |
| Agent re-reads debate file every round | Inline opponent arguments in prompt (R2+) |
--timeout 300 (裸数字) | --timeout 5m 或 --timeout 300s(Go duration 格式) |