关于 auto-review-loop-minimax
使用 MiniMax-M3 反复进行外部评审、落实修改并再次评审,以改进研究成果;达到肯定评估或四轮上限时停止。它记录评审过程,并支持从中断处恢复。
主要功能
- 01循环评审与修订
- 02MiniMax-M3 外部评估
- 03按评分和结论停止
- 04记录轮次并保存恢复状态
- 05跟踪实验与结果
适用场景
- 01投稿前改进研究成果
- 02落实评审意见中的修改
- 03恢复中断的评审循环
MCP 相关
技能在可用时使用 MiniMax MCP 工具进行外部评审;也可回退到 curl 调用 MiniMax API。
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ wanshuiyin/ auto-claude-code-research-in-sleep --skill auto-review-loop-minimax安装后在 Claude Code 中输入/auto-review-loop-minimax确认已加载。
详细介绍
自动审查循环(MiniMax 版本):自主改进研究
🔒 不要将此技能包装在
/loop、/schedule或CronCreate中。 与/auto-review-loop一样,它已在内部循环(审查 → 修复 → 再审查), 并将上一轮的摘要传入下一轮审查提示词(后端是无状态的逐轮 API 调用,而非共享线程)。外部 定时器每次触发时都会从头开始运行,丢失累积的上下文,并根据挂钟时间而非产物变更 执行评判——没有任何新信号,却要付出全部令牌成本。应安排它之前的外部等待, 而不是评判本身。请参阅shared-references/external-cadence.md。
自主迭代:审查 → 实施修复 → 再审查,直到外部审查者给出正面评价或达到 MAX_ROUNDS。
上下文:$ARGUMENTS
常量
- MAX_ROUNDS = 4
- POSITIVE_THRESHOLD:score >= 6/10 且 verdict ∈ {"ready", "almost"} — 两项条件都必须满足,与下方实际执行的停止条件一致。verdict 的取值为 {"ready", "almost", "not ready"}。(较早的表述使用了
or,且 verdict 集合已过时;以AND形式为准。) - REVIEW_DOC:
review-stage/AUTO_REVIEW.md(累积日志)(旧版项目回退到./AUTO_REVIEW.md) - REVIEWER_MODEL =
MiniMax-M3— 通过 MiniMax API 使用的模型
API 配置
此技能使用 MiniMax API 进行外部审查。支持两种方式:
方式 1:MCP 工具(首选)
如果 mcp__minimax-chat__minimax_chat 可用,请使用它:
mcp__minimax-chat__minimax_chat:
prompt: |
[Review prompt content]
model: "MiniMax-M3"
system: "You are a senior machine learning researcher..."
方式 2:curl(备用)
如果 MCP 不可用,请直接使用 curl:
curl -s "https://api.minimax.io/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MINIMAX_API_KEY" \
-d '{
"model": "MiniMax-M3",
"messages": [
{"role": "system", "content": "You are a senior ML researcher..."},
{"role": "user", "content": "[Review prompt]"}
],
"max_tokens": 4096
}'
API 密钥:从 ~/.claude/settings.json 中的 env.MINIMAX_API_KEY 读取,或从环境变量读取。
为什么使用 MiniMax 而不是 Codex MCP? Codex CLI 使用 OpenAI 的 Responses API(/v1/responses),第三方提供商不支持此 API。请参阅:https://github.com/openai/codex/discussions/7782
状态持久化(紧凑恢复)
长时间运行的循环可能会触及上下文窗口上限,从而触发自动压缩。为确保能够继续运行,请在每轮结束后将状态持久化到 review-stage/REVIEW_STATE.json:
{
"round": 2,
"status": "in_progress",
"last_score": 5.0,
"last_verdict": "not ready",
"pending_experiments": ["screen_name_1"],
"timestamp": "2026-03-13T21:00:00"
}
每次 Phase E 结束时(记录完本轮后)都要写入此文件。 每次覆盖即可——只需保留最新状态。
完成时(获得正面评价或达到最大轮数),将 "status": "completed" 设为已完成,避免后续调用意外恢复已结束的循环。
工作流
初始化
- 检查
review-stage/REVIEW_STATE.json(如果未找到,则回退到./REVIEW_STATE.json——旧版路径):- 如果两个路径都不存在:全新开始(正常情况)
- 如果文件存在且
status为"completed":全新开始(上一次循环已正常结束) - 如果文件存在、
status为"in_progress"且timestamp早于 24 小时:全新开始(已终止或放弃运行留下的过期状态——删除该文件并重新开始) - 如果文件存在、
status为"in_progress"且timestamp在 24 小时内:恢复运行- 读取状态文件以恢复
round、last_score、pending_experiments - 读取
review-stage/AUTO_REVIEW.md,恢复之前各轮的完整上下文 (回退到./AUTO_REVIEW.md) - 如果
pending_experiments不为空,检查它们是否已完成(例如,检查屏幕会话) - 从下一轮继续(round = 已保存的 round + 1)
- 记录:“已从上下文压缩中恢复。从第 N 轮继续。”
- 读取状态文件以恢复
- 阅读项目叙述文档、记忆文件及之前的审查文档
- 阅读近期实验结果(检查输出目录和日志)
- 根据之前的审查找出当前弱点和未完成的 TODO
- 将轮数计数器初始化为 1(除非从状态文件恢复)
- 创建或更新
review-stage/AUTO_REVIEW.md,添加标题和时间戳
循环(最多重复 MAX_ROUNDS 次)
阶段 A:审查
向外部审查者发送完整上下文。
先检查 MCP 是否可用,然后使用合适的方法:
如果 MCP 可用(主要方式):
Use mcp__minimax-chat__minimax_chat tool with:
- system: "You are a senior machine learning researcher serving as a reviewer for top-tier conferences like NeurIPS, ICML, and ICLR. Provide rigorous, constructive feedback."
- prompt: [Full review prompt with context]
- model: "MiniMax-M3"
如果 MCP 不可用(备用方式):
curl -s "https://api.minimax.io/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MINIMAX_API_KEY" \
-d '{
"model": "MiniMax-M3",
"messages": [
{
"role": "system",
"content": "You are a senior machine learning researcher serving as a reviewer for top-tier conferences like NeurIPS, ICML, and ICLR. Provide rigorous, constructive feedback."
},
{
"role": "user",
"content": "[Round N/MAX_ROUNDS of autonomous review loop]\n\n[Full research context: claims, methods, results, known weaknesses]\n[Changes since last round, if any]\n[For round 2+: Summary of previous review feedback and what was addressed]\n\nPlease act as a senior ML reviewer (NeurIPS/ICML level).\n\n1. Score this work 1-10 for a top venue\n2. List remaining critical weaknesses (ranked by severity)\n3. For each weakness, specify the MINIMUM fix (experiment, analysis, or reframing)\n4. State clearly: is this READY for submission? Yes/No/Almost\n\nBe brutally honest. If the work is ready, say so clearly."
}
],
"max_tokens": 4096
}'
注意:每一轮都是独立的 API 调用。对于第 2 轮及之后的轮次,请在提示词中加入之前的审查摘要和所做更改。
阶段 B:解析评估
重要:将外部审查者的完整原始回复逐字保存(存入变量供阶段 E 使用)。不要丢弃或概括——原始文本是主要记录。
然后提取结构化字段:
- 评分(数字,1-10)
- 结论("ready" / "almost" / "not ready")
- 待办事项(按优先级排列的修复列表)
停止条件:如果评分 >= 6 且结论 ∈ {"ready", "almost"}(必须完全匹配——"not ready" 不符合条件)→ 停止循环,记录最终状态。
阶段 C:实施修复(若未停止)
针对每项待办事项(按优先级从高到低):
- 代码更改:编写/修改实验脚本、模型代码、分析脚本
- 运行实验:通过 SSH + screen/tmux 部署到 GPU 服务
- 分析:运行评估、收集结果、更新图表/表格
- 文档:更新项目笔记和审查文档
优先级规则:
- 跳过需要大量计算资源的修复(标记为需人工跟进)
- 跳过需要不可用外部数据/模型的修复
- 若重新表述/分析和新实验都能解决问题,优先选择前者
- 始终实施新增指标(成本低、影响大)
阶段 D:等待结果
如果已启动实验:
- 监控远程会话,直到实验完成
- 从输出文件和日志中收集结果
阶段 E:记录轮次
追加到 review-stage/AUTO_REVIEW.md:
## Round N (timestamp)
### Assessment (Summary)
- Score: X/10
- Verdict: [ready/almost/not ready]
- Key criticisms: [bullet list]
### Reviewer Raw Response
<details>
<summary>Click to expand full reviewer response</summary>
[Paste the COMPLETE raw response from the external reviewer here — verbatim, unedited.
This is the authoritative record. Do NOT truncate or paraphrase.]
</details>
### Actions Taken
- [what was implemented/changed]
### Results
- [experiment outcomes, if any]
### Status
- [continuing to round N+1 / stopping]
写入 review-stage/REVIEW_STATE.json,记录当前轮次、评分、结论和任何待完成的实验。
轮次计数器递增 → 返回阶段 A。
终止
循环结束时(评估为正面或达到最大轮次):
- 将
review-stage/REVIEW_STATE.json中的"status"更新为"completed" - 将最终摘要写入
review-stage/AUTO_REVIEW.md - 使用结论更新项目笔记
- 如果在未获得正面评估的情况下达到最大轮次并停止:
- 列出剩余的阻碍因素
- 估算每项所需的工作量
- 建议继续手动处理还是调整方向
关键规则
-
处理大型文件:如果 Write 工具因文件过大而失败,请立即使用 Bash(
cat << 'EOF' > file)重试,分块写入。不要征求用户许可——直接静默执行。 -
防止引用幻觉:添加参考文献时,绝不要伪造 BibTeX。使用 DBLP → CrossRef →
[VERIFY]流程。不要凭记忆生成 BibTeX。 -
如实记录——包括负面结果和失败的实验
-
不要为了获得正面评分而掩盖弱点
-
重新审查前先实施修复(不要只承诺修复)
-
如果实验耗时超过 30 分钟,启动实验后继续处理其他修复,并在等待期间开展其他工作
-
记录所有内容——审查日志应自成一体
-
每轮结束后都更新项目笔记,不要只在最后更新
-
第 2 轮及之后的轮次,始终在提示词中包含之前的审查上下文
-
MCP 可用时优先使用 MCP 工具,而非 curl(更可靠)
第 2 轮及之后的轮次的提示词模板
MCP 方法(主要方式):
mcp__minimax-chat__minimax_chat:
model: "MiniMax-M3"
system: "You are a senior machine learning researcher serving as a reviewer for top-tier conferences like NeurIPS, ICML, and ICLR. Provide rigorous, constructive feedback."
prompt: |
[Round N/MAX_ROUNDS of autonomous review loop]
## Previous Review Summary (Round N-1)
- Previous Score: X/10
- Previous Verdict: [ready/almost/not ready]
- Previous Key Weaknesses: [list]
## Changes Since Last Review
1. [Action 1]: [result]
2. [Action 2]: [result]
3. [Action 3]: [result]
## Updated Results
[paste updated metrics/tables]
## Current Research Context
[brief summary of claims, methods, current state]
Please re-score and re-assess:
1. Score this work 1-10 for a top venue
2. List remaining critical weaknesses (ranked by severity)
3. For each weakness, specify the MINIMUM fix
4. State clearly: is this READY for submission? Yes/No/Almost
Be brutally honest. If the work is ready, say so clearly.
curl 备用方式:
curl -s "https://api.minimax.io/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MINIMAX_API_KEY" \
-d '{
"model": "MiniMax-M3",
"messages": [
{
"role": "system",
"content": "You are a senior machine learning researcher serving as a reviewer for top-tier conferences like NeurIPS, ICML, and ICLR. Provide rigorous, constructive feedback."
},
{
"role": "user",
"content": "[Round N/MAX_ROUNDS of autonomous review loop]\n\n## Previous Review Summary (Round N-1)\n- Previous Score: X/10\n- Previous Verdict: [ready/almost/not ready]\n- Previous Key Weaknesses: [list]\n\n## Changes Since Last Review\n1. [Action 1]: [result]\n2. [Action 2]: [result]\n3. [Action 3]: [result]\n\n## Updated Results\n[paste updated metrics/tables]\n\n## Current Research Context\n[brief summary of claims, methods, current state]\n\nPlease re-score and re-assess:\n1. Score this work 1-10 for a top venue\n2. List remaining critical weaknesses (ranked by severity)\n3. For each weakness, specify the MINIMUM fix\n4. State clearly: is this READY for submission? Yes/No/Almost\n\nBe brutally honest. If the work is ready, say so clearly."
}
],
"max_tokens": 4096
}'
输出协议
所有输出文件都应遵循以下共享协议: