关于 council
council 是用于汇集多个 Agent 意见的技能,可比较它们对同一问题的回答。它支持并行运行 Claude、Codex 和 Gemini 命令行工具,以及角色分工、辩论和综合总结。
主要功能
- 01并行查询多个 Agent 命令行工具
- 02结构化比较回答
- 03按角色获取不同视角
- 04多轮辩论流程
- 05综合多个回答
适用场景
- 01从安全性和可维护性角度比较代码审查
- 02收集架构决策的不同意见
- 03探索调试问题的多种方案
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ johnlindquist/ claude --skill council安装后在 Claude Code 中输入/council确认已加载。
详细介绍
AI Council - 多 Agent 咨询
就同一个问题获取多个 AI Agent 的观点。
前置条件
至少安装以下 CLI 之一:
Claude CLI
npm install -g @anthropic-ai/claude-cli
# Set ANTHROPIC_API_KEY
Codex CLI
npm install -g @openai/codex-cli
# Set OPENAI_API_KEY
Gemini CLI
pip install google-generativeai
# Set GEMINI_API_KEY
单个 Agent 命令
Claude
# Ask Claude
claude -p --model opus "Your question here"
# Print mode (non-interactive)
claude --print "Your question"
Codex
# Ask Codex
codex -q "Your question here"
Gemini
# Ask Gemini
gemini -m pro -o text -e "" "Your question here"
并行咨询模式
基本多 Agent 查询
# Query all agents in parallel
(
echo "=== Claude ===" && claude --print "Your question" &
echo "=== Gemini ===" && gemini -m pro -o text -e "" "Your question" &
echo "=== Codex ===" && codex -q "Your question" &
wait
)
结构化比较脚本
#!/bin/bash
QUESTION="$1"
# Query in parallel, save to temp files
claude --print "$QUESTION" > /tmp/claude-response.txt &
gemini -m pro -o text -e "" "$QUESTION" > /tmp/gemini-response.txt &
wait
echo "=== Claude's Response ==="
cat /tmp/claude-response.txt
echo ""
echo "=== Gemini's Response ==="
cat /tmp/gemini-response.txt
# Cleanup
rm -f /tmp/claude-response.txt /tmp/gemini-response.txt
使用场景
代码审查视角
# Get different review perspectives
CODE=$(cat mycode.ts)
claude --print "Review this code for best practices: $CODE"
gemini -m pro -o text -e "" "Review this code for security issues: $CODE"
架构决策
QUESTION="Should I use microservices or monolith for a startup MVP with 3 developers?"
# Get multiple perspectives
claude --print "$QUESTION"
gemini -m pro -o text -e "" "$QUESTION"
调试方法
ERROR="TypeError: Cannot read property 'map' of undefined"
CONTEXT="React component fetching API data"
claude --print "Debug this error: $ERROR. Context: $CONTEXT"
gemini -m pro -o text -e "" "Explain and fix: $ERROR in $CONTEXT"
寻找共识
在获取多个 Agent 的回复后,让其中一个进行综合:
# Save individual responses first, then:
gemini -m pro -o text -e "" "Here are responses from different AI agents about [topic]:
Response 1: [Claude's response]
Response 2: [Gemini's response]
Synthesize these into a consensus view, noting:
1. Where they agree
2. Where they differ
3. The most actionable recommendation"
角色预设
查询时,你可以分配角色:
软件工程委员会
claude --print "As a software architect: [question]"
gemini -m pro -o text -e "" "As a security engineer: [question]"
代码审查委员会
claude --print "Review for maintainability: [code]"
gemini -m pro -o text -e "" "Review for performance: [code]"
创造性问题解决
claude --print "Suggest conventional solutions for: [problem]"
gemini -m pro -o text -e "" "Suggest unconventional approaches for: [problem]"
辩论模式
让 Agent 相互回应:
# Round 1: Initial positions
R1_CLAUDE=$(claude --print "Argue FOR using TypeScript in a new project")
R1_GEMINI=$(gemini -m pro -o text -e "" "Argue AGAINST using TypeScript in a new project")
# Round 2: Rebuttals
R2_CLAUDE=$(claude --print "Respond to this argument against TypeScript: $R1_GEMINI")
R2_GEMINI=$(gemini -m pro -o text -e "" "Respond to this argument for TypeScript: $R1_CLAUDE")
# Synthesis
gemini -m pro -o text -e "" "Synthesize this debate:
FOR TypeScript: $R1_CLAUDE
Rebuttal: $R2_CLAUDE
AGAINST TypeScript: $R1_GEMINI
Rebuttal: $R2_GEMINI
Provide a balanced recommendation."
最佳实践
- 使用相同问题 - 措辞一致以实现公平比较
- 并行运行 - 使用
&进行后台任务以提升速度 - 捕获输出 - 保存到文件以便比较
- 注明是哪个 Agent - 清楚地标记各回复
- 最后综合 - 使用一个 Agent 进行总结
- 让 Agent 匹配任务 - Claude 负责细微之处,Gemini 负责事实,Codex 负责代码
评论
支持 Markdown