关于 conclave
conclave 是一项多 LLM 协作技能,可收集独立回答,并通过辩论、投票或多轮对话进行综合。它适用于需要比较模型观点的分析与决策任务。
主要功能
- 01并行调用已配置的模型 API
- 02快速、标准和深度模式
- 03投票与多轮对话
- 04匿名评议与排名
- 05CLI 健康检查和成本估算
适用场景
- 01比较对事实问题的回答
- 02审查代码或分析提案
- 03讨论架构或安全方案
- 04通过同伴投票排列选项
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ tommasinigiovanni/ conclave --skill conclave安装后在 Claude Code 中输入/conclave确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
pyproject.tomlLICENSE.gitignore.env.templateREADME.md.claude/settings.local.jsonprompts/templates.yamlscripts/conclave.pyscripts/conclave/__init__.pybias.pyconfig.pycost.pyprogress.pyfallacies.pydialogue.pycli.pyproviders.pyorchestrator.pyranking.pyscoring.pyvoting.pysessions.pytests/conftest.pytest_dialogue.pytest_bias.pytest_fallacies.pytest_providers.pytest_orchestrator.pytest_ranking.pytest_sessions.py详细介绍
Conclave:匿名辩论的多 LLM 议事会
严重提示:始终运行脚本
请勿检查或读取 .env 或 .env.template 文件。 脚本会自动处理自身配置。API 密钥和模型设置已配置在用户的 .env 文件中,脚本会自行查找该文件。
始终先运行脚本,然后再处理 JSON 输出。
快速参考
# SKILL_DIR = directory containing this SKILL.md file
SKILL_DIR="$(dirname "$(realpath "$0")")" # or use the skill's known path
# Determine depth from user intent:
# "quick" / "fast" → --depth quick
# default / no modifier → --depth standard
# "deep" / "debate" / "critical" → --depth deep
python3 "${SKILL_DIR}/scripts/conclave.py" "<USER_PROMPT>" --depth <LEVEL> --raw
# Voting mode (point-based instead of ordinal ranking):
python3 "${SKILL_DIR}/scripts/conclave.py" "<USER_PROMPT>" --vote --raw
# Multi-round dialogue:
python3 "${SKILL_DIR}/scripts/conclave.py" "<USER_PROMPT>" --rounds 3 --raw
# Combined voting + dialogue:
python3 "${SKILL_DIR}/scripts/conclave.py" "<USER_PROMPT>" --vote --rounds 2 --raw
# Bias report:
python3 "${SKILL_DIR}/scripts/conclave.py" bias
--raw 标志会输出 JSON。始终使用 --raw。
分步流程
第 1 步:运行脚本
运行 python3 <skill_dir>/scripts/conclave.py "<prompt>" --depth <level> --raw
脚本将会:
- 加载自身配置(脚本旁的
.env文件——请勿自行管理) - 并行调用远程 API(Gemini、GPT 等)
- 返回包含结果和留给你(Claude)填写的占位内容的 JSON
第 2 步:解析 JSON,找到你的占位内容
JSON 的 phase1_drafts 数组中,每位议事会成员各有一个条目。
"needs_claude_code": true 的条目是需要你填写的草稿。
JSON 结构示例:
{
"phase1_drafts": [
{"key": "claude", "needs_claude_code": true, "prompt": "..."},
{"key": "gemini", "content": "Gemini's response...", "elapsed": 3.2},
{"key": "gpt", "content": "GPT's response...", "elapsed": 2.8}
]
}
第 3 步:生成你的独立草稿
对于 phase1_drafts 中每个 needs_claude_code: true 的条目:
在阅读其他模型的回复之前,先独立撰写你对原始提示词的回答。 这样可以保持议事会成员之间的独立性。假装你还没有看过 Gemini 或 GPT 的回答。
第 3b 步:(仅限 Deep 模式)在待处理时完成第 2 阶段
如果 JSON 中有 "phase2_pending": true:
- 更新第 1 阶段 JSON:将你的草稿的
content设为你在第 3 步中的回复 - 将更新后的 JSON 写入唯一的临时文件:
/tmp/conclave_p1_$$.json(其中$$是 PID,也可以使用mktemp),例如:TMPFILE=$(mktemp /tmp/conclave_p1_XXXXXX.json) - 运行
python3 "${SKILL_DIR}/scripts/conclave.py" phase2 "$TMPFILE" --raw - 解析第 2 阶段 JSON——其中现在包含
phase2_critiques和aggregate_rankings - 清理:
rm -f "$TMPFILE"
如果 phase2_pending 为 false 或不存在,请跳过此步骤。
第 4 步:(仅限 Deep 模式)生成你的评议
在 Deep 模式下,phase2_critiques 也会包含 needs_claude_code: true 的条目。
每个条目都包含一个 prompt 字段,其中有匿名回复(“Response A”“Response B”)。
阅读这些内容并给出你的评议和排名。最后写上:
{"ranking": ["A", "B", "C"]}
仅使用回复字母,并按最佳到最差的顺序排列。
第 5 步:综合得出最终答案
Quick 模式: 并列呈现所有草稿(包括你的草稿)。完成。
Standard 模式: 综合所有第 1 阶段草稿:
## 🏛️ Conclave Response
### Consensus
[Points where all models agree — high confidence]
### Key Insights
[Unique valuable contributions from individual models]
### Disagreements
[Where models diverged, and which position is stronger]
### Final Answer
[The best unified answer]
Deep 模式: 综合第 1 阶段草稿、第 2 阶段评议和汇总排名:
## 🔥 Conclave Deep Debate
### The Debate
[Summary of challenges and concessions]
### Post-Debate Consensus
[Points that survived adversarial critique — very high confidence]
### Resolved Disagreements
[Issues the debate clarified]
### Aggregate Rankings
[Show the rankings from the JSON]
### Open Questions
[Legitimate remaining disagreements]
### Final Answer
[The best unified answer, informed by the full debate]
Vote 模式: 综合第 1 阶段草稿和投票结果:
## 🗳️ Conclave Quorum Vote
### Weighted Scores
[Points each model received from peers]
### Consensus Strength
[How strongly models agreed on the winner (0-100%)]
### Key Insights
[What the top-scored model got right]
### Disagreements
[Where voters diverged]
### Final Answer
[The best answer, informed by the quorum vote]
Dialogue 模式: 综合各轮内容:
## 💬 Conclave Dialogue (N rounds)
### Evolution
[How positions changed across rounds]
### Convergence
[Points where models converged, and in which round]
### Remaining Disagreements
[Issues that persisted through all rounds]
### Final Answer
[The best answer after multi-round refinement]
深度级别
| 触发方式 | 深度 | 阶段 | 适用场景 |
|---|---|---|---|
/conclave quick ... | quick | 1 | 事实性问题、合理性检查 |
/conclave ... | standard | 1 + 3 | 分析、代码审查、建议 |
/conclave deep ... | deep | 1 + 2 + 3 | 架构、安全、关键决策 |
/conclave vote ... | vote | 1 + vote | 比较评估、备选方案排名 |
/conclave ... --rounds N | 任意 + dialogue | 1 + 2 + dialogue | 迭代优化、达成共识 |
CLI 命令
# Core modes
conclave.py "<prompt>" --depth quick|standard|deep # Standard depth levels
conclave.py "<prompt>" --vote # Quorum voting mode
conclave.py "<prompt>" --rounds N # Multi-round dialogue
conclave.py "<prompt>" --vote --rounds N # Combined vote + dialogue
# Utilities
conclave.py doctor # Health check all models
conclave.py leaderboard # EMA-based model scores
conclave.py sessions # List saved sessions
conclave.py bias # Bias & impartiality report
conclave.py phase2 <file> --raw # Run Phase 2 from saved Phase 1
# Options
--raw JSON output only
--quiet / -q Suppress stderr progress
--estimate Cost estimate (supports --vote, --rounds)
--members k1,k2 Filter council members
--session ID Multi-turn session (new/last/<id>)
--system "..." System prompt for all models
环境变量(.env)
# Provider keys
ANTHROPIC_API_KEY=...
GOOGLE_GEMINI_API_KEY=...
OPENAI_API_KEY=...
XAI_API_KEY=...
OPENROUTER_API_KEY=...
# Model configuration (per member)
CONCLAVE_MEMBER_<KEY>_MODEL=...
CONCLAVE_MEMBER_<KEY>_PROVIDER=...
CONCLAVE_MEMBER_<KEY>_LABEL=...
CONCLAVE_MEMBER_<KEY>_ICON=...
CONCLAVE_MEMBER_<KEY>_LOCAL=true|false
CONCLAVE_MEMBER_<KEY>_FALLBACK_MODEL=...
# Defaults
CONCLAVE_TEMPERATURE=0.7
CONCLAVE_MAX_TOKENS=2048
CONCLAVE_TIMEOUT=120
CONCLAVE_MAX_RETRIES=3
CONCLAVE_PROVIDER_MODE=direct|openrouter
CONCLAVE_ANONYMIZE=true
CONCLAVE_SCORING_EMA_ALPHA=0.3
CONCLAVE_SESSION_TOKEN_BUDGET=20000
# Dialogue settings
CONCLAVE_MAX_ROUNDS=3 # Hard cap for --rounds
CONCLAVE_CONVERGENCE_THRESHOLD=0.85 # Early termination threshold
# Bias tracking
CONCLAVE_BIAS_TRACKING=true|false # Enable/disable bias data collection
项目结构
scripts/conclave/
├── __init__.py # Public API exports
├── cli.py # CLI entry point (argparse, pretty printing)
├── config.py # .env loading, member discovery
├── cost.py # Cost estimation (supports vote/rounds)
├── orchestrator.py # Main run_conclave, phases, voting, dialogue integration
├── providers.py # HTTP callers (Anthropic, Google, OpenAI, xAI, OpenRouter)
├── progress.py # Real-time stderr progress
├── ranking.py # Ranking extraction (JSON + regex), aggregation
├── scoring.py # EMA-based model scoring, leaderboard
├── sessions.py # Multi-turn session persistence
├── voting.py # Quorum voting (point distribution, aggregation)
├── dialogue.py # Multi-round dialogue (convergence detection)
└── bias.py # Bias tracking & impartiality metrics
tests/
├── conftest.py
├── test_orchestrator.py
├── test_providers.py
├── test_ranking.py
├── test_scoring.py
├── test_sessions.py
├── test_voting.py
├── test_dialogue.py
└── test_bias.py
故障排除
- 找不到脚本? 脚本位于
<this_skill_dir>/scripts/conclave.py - API 错误? 运行
python3 <skill_dir>/scripts/conclave.py doctor进行检查 - 全部失败? 你(Claude)仍可作为本地成员参与——独立提供回答,并注明远程模型不可用
安全提示
API 密钥存储在 ~/.config/conclave/.env 中——绝不会存储在技能目录中。脚本会自动从该位置加载密钥。这样可以避免 LLM Agent 在扫描技能文件时意外读取机密信息。