counselors
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCounselors — Multi-Agent Review Skill
Counselors — 多Agent评审Skill
Fan out a prompt to multiple AI coding agents in parallel and synthesize their responses.
Arguments: $ARGUMENTS
If no arguments provided, ask the user what they want reviewed.
将提示词并行分发至多个AI编码Agent,并综合它们的响应结果。
参数:$ARGUMENTS
如果未提供参数,询问用户需要评审的内容。
Phase 1: Context Gathering
第一阶段:上下文收集
Parse to understand what the user wants reviewed. Then auto-gather relevant context:
$ARGUMENTS- Files mentioned in the prompt: Use Glob/Grep to find files referenced by name, class, function, or keyword
- Recent changes: Run and
git diff HEADto capture recent workgit diff --staged - Related code: Search for key terms from the prompt and read the most relevant files (up to 5 files, ~50KB total cap)
Be selective — don't dump the entire codebase. Pick the most relevant code sections.
解析以理解用户的评审需求。然后自动收集相关上下文:
$ARGUMENTS- 提示词中提及的文件:使用Glob/Grep查找通过名称、类、函数或关键字引用的文件
- 近期变更:运行和
git diff HEAD以获取近期的工作内容git diff --staged - 相关代码:搜索提示词中的关键术语,并读取最相关的文件(最多5个文件,总大小上限约50KB)
请有所选择——不要输出整个代码库。只挑选最相关的代码片段。
Phase 2: Agent Selection
第二阶段:Agent选择
-
Discover available agents by running via Bash:bash
counselors lsThis lists all configured agents with their IDs and binaries. -
MANDATORY: Print the full agent list, then ask the user which to use.Always print the fulloutput as inline text (not inside AskUserQuestion). Just show the raw output from the command so the user sees every agent with its ID and binary. Do NOT reformat or abbreviate it.
counselors lsThen ask the user to pick:If 4 or fewer agents: Use AskUserQuestion with, one option per agent.multiSelect: trueIf more than 4 agents: AskUserQuestion only supports 4 options. Use these fixed options:- Option 1: "All [N] agents" — sends to every configured agent
- Option 2-4: The first 3 individual agents by ID
- The user can always select "Other" to type a comma-separated list of agent IDs from the printed list above
Do NOT combine agents into preset groups (e.g. "claude + codex + gemini"). Each option must be a single agent or "All". -
Wait for the user's selection before proceeding.
-
MANDATORY: Confirm the selection before continuing. After the user picks agents, echo back the exact list you will dispatch to:Dispatching to: claude-opus, codex-5.3-high, gemini-proThen ask the user to confirm (e.g. "Look good?") before proceeding to Phase 3. This prevents silent tool omissions. If the user corrects the list, update your selection accordingly.
-
发现可用Agent:通过Bash运行以下命令:bash
counselors ls该命令会列出所有已配置的Agent及其ID和二进制文件。 -
必填操作:打印完整的Agent列表,然后询问用户要使用哪些Agent。务必将的完整输出以纯文本形式打印(不要放在AskUserQuestion内)。直接显示命令的原始输出,让用户看到每个Agent的ID和二进制文件。请勿重新格式化或缩写。
counselors ls然后询问用户进行选择:如果Agent数量≤4:使用AskUserQuestion并设置,每个Agent作为一个选项。multiSelect: true如果Agent数量>4:AskUserQuestion仅支持4个选项。使用以下固定选项:- 选项1:"所有[N]个Agent" —— 分发至所有已配置的Agent
- 选项2-4:按ID排序的前3个独立Agent
- 用户始终可以选择"其他",从上方打印的列表中输入以逗号分隔的Agent ID列表
请勿将Agent组合为预设分组(例如"claude + codex + gemini")。每个选项必须是单个Agent或"所有"。 -
等待用户选择后再继续。
-
必填操作:在继续前确认选择。 用户选择Agent后,回显将分发的准确列表:分发至:claude-opus,codex-5.3-high,gemini-pro然后询问用户确认(例如"是否确认?"),之后再进入第三阶段。这可以避免工具被静默遗漏。如果用户修正列表,请相应更新选择。
Phase 3: Prompt Assembly
第三阶段:提示词组装
-
Generate a slug from the topic (lowercase, hyphens, max 40 chars)
- "review the auth flow" →
auth-flow-review - "is this migration safe" →
migration-safety-review
- "review the auth flow" →
-
Create the output directory via Bash. The directory name MUST always be prefixed with a second-precision UNIX timestamp so runs are lexically sortable and never collide:
./agents/counselors/TIMESTAMP-[slug]For example:./agents/counselors/1770676882-auth-flow-reviewMac tip: Generate with(seconds since epoch). Millisecond precision is NOT available viadate +%son macOS without GNU coreutils — usedatefor portable second-precision timestamps.date +%s -
Write the prompt file using the Write tool to:
./agents/counselors/TIMESTAMP-[slug]/prompt.md
markdown
undefined-
根据主题生成slug(小写,连字符分隔,最多40个字符)
- "review the auth flow" →
auth-flow-review - "is this migration safe" →
migration-safety-review
- "review the auth flow" →
-
通过Bash创建输出目录。目录名称必须始终以秒级精度的UNIX时间戳为前缀,以便运行记录可按字典序排序且不会冲突:
./agents/counselors/TIMESTAMP-[slug]示例:./agents/counselors/1770676882-auth-flow-reviewMac提示:使用生成(自纪元以来的秒数)。在macOS上,date +%s命令在没有GNU coreutils的情况下不支持毫秒精度——使用date以获得可移植的秒级时间戳。date +%s -
使用Write工具将提示词文件写入:
./agents/counselors/TIMESTAMP-[slug]/prompt.md
markdown
undefinedReview Request
评审请求
Question
问题
[User's original prompt/question from $ARGUMENTS]
[$ARGUMENTS中的用户原始提示词/问题]
Context
上下文
Files Referenced
引用的文件
[Contents of the most relevant files found in Phase 1]
[第一阶段中找到的最相关文件内容]
Recent Changes
近期变更
[git diff output, if any]
[git diff输出(如有)]
Related Code
相关代码
[Related files discovered via search]
[通过搜索发现的相关文件]
Instructions
说明
You are providing an independent review. Be critical and thorough.
- Analyze the question in the context provided
- Identify risks, tradeoffs, and blind spots
- Suggest alternatives if you see better approaches
- Be direct and opinionated — don't hedge
- Structure your response with clear headings
---你需要提供独立评审。请保持批判性和全面性。
- 在提供的上下文中分析问题
- 识别风险、权衡和盲区
- 如果发现更好的方法,建议替代方案
- 直接表达观点——不要含糊其辞
- 使用清晰的标题组织你的响应
---Phase 4: Dispatch
第四阶段:分发
Run counselors via Bash with the prompt file, passing the user's selected agents:
bash
counselors run -f ./agents/counselors/[slug]/prompt.md --tools [comma-separated-selections] --jsonExample:
--tools claude,codex,geminiUse (10 minutes). Counselors dispatches to the selected agents in parallel and writes results to the output directory shown in the JSON output.
timeout: 600000Important: Use (file mode) so the prompt is sent as-is without wrapping. Use to get structured output for parsing.
-f--json通过Bash运行counselors命令,传入提示词文件和用户选择的Agent:
bash
counselors run -f ./agents/counselors/[slug]/prompt.md --tools [逗号分隔的选择项] --json示例:
--tools claude,codex,gemini设置(10分钟)。Counselors会并行分发至选定的Agent,并将结果写入JSON输出中显示的输出目录。
timeout: 600000重要提示:使用(文件模式),以便提示词按原样发送,不进行包装。使用以获取结构化输出用于解析。
-f--jsonPhase 5: Read Results
第五阶段:读取结果
- Parse the JSON output from stdout — it contains the run manifest with status, duration, word count, and output file paths for each agent
- Read each agent's response from the path in the manifest
outputFile - Check paths for any agent that failed or returned empty output
stderrFile - Skip empty or error-only reports — note which agents failed
- 解析stdout中的JSON输出——它包含运行清单,其中包含每个Agent的状态、持续时间、字数统计和输出文件路径
- 从清单中的路径读取每个Agent的响应
outputFile - 检查失败或返回空输出的Agent的路径
stderrFile - 跳过空报告或仅含错误的报告——记录哪些Agent失败
Phase 6: Synthesize and Present
第六阶段:综合与展示
Combine all agent responses into a synthesis:
markdown
undefined将所有Agent的响应整合成一份综合报告:
markdown
undefinedCounselors Review
Counselors评审结果
Agents consulted: [list of agents that responded]
Consensus: [What most agents agree on — key takeaways]
Disagreements: [Where they differ, and reasoning behind each position]
Key Risks: [Risks or concerns flagged by any agent]
Blind Spots: [Things none of the agents addressed that seem important]
Recommendation: [Your synthesized recommendation based on all inputs]
Reports saved to: [output directory from manifest]
Present this synthesis to the user. Be concise — the individual reports are saved for deep reading.
---咨询的Agent: [已响应的Agent列表]
共识: [大多数Agent达成一致的内容——关键要点]
分歧: [Agent意见不同的地方,以及各自立场的理由]
关键风险: [任何Agent提出的风险或担忧]
盲区: [所有Agent都未提及但看起来很重要的内容]
建议: [基于所有输入得出的综合建议]
报告保存至:[清单中的输出目录]
向用户展示这份综合报告。请保持简洁——详细的独立报告已保存供深度阅读。
---Phase 7: Action (Optional)
第七阶段:行动(可选)
After presenting the synthesis, ask the user what they'd like to address. Offer the top 2-3 actionable items from the synthesis as options. If the user wants to act on findings, plan the implementation before making changes.
展示综合报告后,询问用户想要处理哪些内容。从综合报告中选出前2-3个可操作项作为选项。如果用户希望根据发现采取行动,在进行更改前先规划实现方案。
Error Handling
错误处理
- counselors not installed: Tell the user to install it ()
npm install -g counselors - No tools configured: Tell the user to run or
counselors initcounselors add - Agent fails: Note it in the synthesis and continue with other agents' results
- All agents fail: Report errors from stderr files and suggest checking
counselors doctor
- 未安装counselors:告知用户进行安装()
npm install -g counselors - 未配置任何工具:告知用户运行或
counselors initcounselors add - Agent失败:在综合报告中记录,并继续使用其他Agent的结果
- 所有Agent均失败:报告stderr文件中的错误,并建议检查
counselors doctor