wanshuiyin/auto-claude-code-research-in-sleep/auto-review-loop-llm
Claude Code and agent skill by wanshuiyin/auto-claude-code-research-in-sleep
- community
Checking that the SKILL.md file is still in the repository.
Autonomous research review loop using any OpenAI-compatible LLM API. Configure via llm-chat MCP server or environment variables. Trigger with "auto review loop llm" or "llm review".
Install
npx vskill@latest install wanshuiyin/auto-claude-code-research-in-sleep/auto-review-loop-llmSKILL.md
The same SKILL.md was published earlier as wanshuiyin/auto-claude-code-research-in-sleep/auto-review-loop-llm.
Auto Review Loop (Generic LLM): Autonomous Research Improvement
🔒 Do not wrap this skill in `/loop`, `/schedule`, or `CronCreate`. Like/auto-review-loop, it already loops internally (review → fix → re-review),feeding each round's prior-round summary into the next review prompt (thebackend is a stateless per-round API/MCP call, not a shared thread). Anexternal timer re-enters from the top each tick, dropping that accumulatedcontext and firing the verdict on wall-clock time instead of on artifactchange — zero new signal, full token cost. Schedule the *external wait thatprecedes it*, not the verdict. See
Autonomously iterate: review → implement fixes → re-review, until the external reviewer gives a positive assessment or MAX_ROUNDS is reached.
Context: $ARGUMENTS
Constants
- MAX_ROUNDS = 4
- POSITIVE_THRESHOLD: score >= 6/10 AND verdict ∈ {"ready", "almost"} — both must hold, matching the operative STOP check below. Verdict vocabulary is {"ready", "almost", "not ready"}. (Earlier wording used
orand a stale verdict set; theANDform is authoritative.) - REVIEW_DOC:
review-stage/AUTO_REVIEW.md(cumulative log) (fall back to `./AUTO_REVIEW.md` for legacy projects)
LLM Configuration
This skill uses any OpenAI-compatible API for external review via the llm-chat MCP server.
Configuration via MCP Server (Recommended)
Add to ~/.claude/settings.json:
Supported Providers
| Provider | LLM_BASE_URL | LLM_MODEL | |
|---|---|---|---|
| OpenAI | https://api.openai.com/v1 | gpt-6.1-sol, gpt-6-astra | |
| DeepSeek | https://api.deepseek.com/v1 | deepseek-chat, deepseek-reasoner | |
| MiniMax | https://api.minimax.io/v1 | MiniMax-M3 | |
| Kimi (Moonshot) | https://api.moonshot.cn/v1 | moonshot-v1-8k, moonshot-v1-32k | |
| ZhiPu (GLM) | https://open.bigmodel.cn/api/paas/v4 | glm-4, glm-4-plus | |
| SiliconFlow | https://api.siliconflow.cn/v1 | Qwen/Qwen2.5-72B-Instruct | |
| 阿里云百炼 | https://dashscope.aliyuncs.com/compatible-mode/v1 | qwen-max | |
| 零一万物 | https://api.lingyiwanwu.com/v1 | yi-large |
The llm-chat server defaults to gpt-6.1-sol. When LLM_FALLBACK_MODEL is unset, the 504-timeout fallback inherits LLM_MODEL (so it is not a fixed, different model). Calls to api.openai.com automatically use max_completion_tokens; third-party OpenAI-compatible endpoints use max_tokens. Set LLM_MAX_TOKENS_FIELD=max_tokens or LLM_MAX_TOKENS_FIELD=max_completion_tokens to override that automatic choice.
API Call Method
Primary: MCP Tool
Fallback: curl
For third-party OpenAI-compatible endpoints, use max_tokens:
For a direct OpenAI call, use max_completion_tokens instead:
State Persistence (Compact Recovery)
Persist state to review-stage/REVIEW_STATE.json after each round:
Write this file at the end of every Phase E (after documenting the round).
On completion, set "status": "completed".
Workflow
Initialization
- Check `review-stage/REVIEW_STATE.json` for recovery (fall back to `./REVIEW_STATE.json` if not found — legacy path)
- Read project context and prior reviews
- Initialize round counter
Loop (up to MAX_ROUNDS)
Phase A: Review
If MCP available:
If MCP NOT available: For third-party OpenAI-compatible endpoints use max_tokens; for direct OpenAI calls use max_completion_tokens instead.
Phase B: Parse Assessment
CRITICAL: Save the FULL raw response verbatim. Then extract:
- Score (numeric 1-10)
- Verdict ("ready" / "almost" / "not ready")
- Action items (ranked list of fixes)
STOP: If score >= 6 AND verdict ∈ {"ready", "almost"} (exact — "not ready" does NOT qualify)
Phase C: Implement Fixes
Add a metric when it resolves a specific review concern that the existing results cannot settle. Use existing measurements when they already answer it.
Phase D: Wait for Results
Monitor remote experiments
Phase E: Document Round
Append to review-stage/AUTO_REVIEW.md:
Write `review-stage/REVIEW_STATE.json` with current state.
Termination
- Set
review-stage/REVIEW_STATE.jsonstatus to "completed" - Write final summary
Key Rules
- Large file handling: If the Write tool fails due to file size, immediately retry using Bash (
cat << 'EOF' > file) to write in chunks. Do NOT ask the user for permission — just do it silently.
- Anti-hallucination citations: When adding references, NEVER fabricate BibTeX. Use DBLP → CrossRef →
[VERIFY]chain. Do NOT generate BibTeX from memory. - Be honest about weaknesses
- Implement fixes BEFORE re-reviewing
- Document everything
- Include previous context in round 2+ prompts
- Prefer MCP tool over curl when available
Prompt Template for Round 2+
Output Protocols
Follow these shared protocols for all output files:- [Output Versioning Protocol](../shared-references/output-versioning.md) — write timestamped file first, then copy to fixed name- [Output Manifest Protocol](../shared-references/output-manifest.md) — log every output to MANIFEST.md- [Output Language Protocol](../shared-references/output-language.md) — respect the project's language setting
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/auto-review-loop-llm/SKILL.md
Popularity
- Repository stars
- 13,696
- Repository forks
- 1,224
- 7-day trend score
- 48
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 17 Mar 2026, 8 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/wanshuiyin/auto-claude-code-research-in-sleep/auto-review-loop-llm)