lightrain-a/medtrace-aris/auto-paper-improvement-loop
Claude Code and agent skill by lightrain-a/medtrace-aris
- community
Checking that the SKILL.md file is still in the repository.
Autonomously improve a generated paper via Gemini review through gemini-review MCP → implement fixes → recompile, for 2 rounds. Use when user says \"改论文\", \"improve paper\", \"论文润色循环\", \"auto improve\", or wants to iteratively polish a generated paper.
Install
npx vskill@latest install lightrain-a/medtrace-aris/auto-paper-improvement-loopSKILL.md
The same SKILL.md was published earlier as lightrain-a/medtrace-aris/auto-paper-improvement-loop.
Override for Codex users who want Gemini, not a second Codex agent, to act as the reviewer. Install this package afterskills/skills-codex/*.
Auto Paper Improvement Loop: Review → Fix → Recompile
Autonomously improve the paper at: $ARGUMENTS
Context
This skill is designed to run after Workflow 3 (/paper-plan → /paper-figure → /paper-write → /paper-compile). It takes a compiled paper and iteratively improves it through external LLM review.
Unlike /auto-review-loop (which iterates on research — running experiments, collecting data, rewriting narrative), this skill iterates on paper writing quality — fixing theoretical inconsistencies, softening overclaims, adding missing content, and improving presentation.
Constants
- MAX_ROUNDS = 2 — Two rounds of review→fix→recompile. Empirically, Round 1 catches structural issues (4→6/10), Round 2 catches remaining presentation issues (6→7/10). Diminishing returns beyond 2 rounds for writing-only improvements.
- REVIEWER_MODEL = `gemini-review` — Gemini reviewer invoked through the local
gemini-reviewMCP bridge. SetGEMINI_REVIEW_MODELif you need a specific Gemini model override. - REVIEW_LOG = `PAPER_IMPROVEMENT_LOG.md` — Cumulative log of all rounds, stored in paper directory.
- HUMAN_CHECKPOINT = false — When
true, pause after each round's review and present score + weaknesses to the user. The user can approve fixes, provide custom modification instructions, skip specific fixes, or stop early. Whenfalse(default), runs fully autonomously.
💡 Override:/auto-paper-improvement-loop "paper/" — human checkpoint: true
Inputs
- Compiled paper —
paper/main.pdf+ LaTeX source files - All section `.tex` files — concatenated for review prompt
State Persistence (Compact Recovery)
If the context window fills up mid-loop, Codex auto-compacts. To recover, this skill writes PAPER_IMPROVEMENT_STATE.json after each round:
On startup: if PAPER_IMPROVEMENT_STATE.json exists with "status": "in_progress" AND timestamp is within 24 hours, read it + PAPER_IMPROVEMENT_LOG.md to recover context, then resume from the next round. Otherwise (file absent, "status": "completed", or older than 24 hours), start fresh.
After each round: overwrite the state file. On completion: set "status": "completed".
Workflow
Step 0: Preserve Original
Step 1: Collect Paper Text
Concatenate all section files into a single text block for the review prompt:
Step 2: Round 1 Review
Send the full paper text to Gemini review:
After this start call, immediately save the returned jobId and poll mcp__gemini-review__review_status with a bounded waitSeconds until done=true. Treat the completed status payload's response as the reviewer output, and save the completed threadId for any follow-up round.
Save the returned jobId, poll mcp__gemini-review__review_status until done=true, then save the completed threadId for Round 2.
Step 2b: Human Checkpoint (if enabled)
Skip if `HUMAN_CHECKPOINT = false`.
Present the review results and wait for user input:
Parse user response same as /auto-review-loop: approve / custom instructions / skip / stop.
Step 3: Implement Round 1 Fixes
Parse the review and implement fixes by severity:
Priority order:
- CRITICAL fixes (assumption mismatches, internal contradictions)
- MAJOR fixes (overclaims, missing content, notation issues)
- MINOR fixes (if time permits)
Common fix patterns:
| Issue | Fix Pattern | |
|---|---|---|
| Assumption-model mismatch | Rewrite assumption to match the model, add formal proposition bridging the gap | |
| Overclaims | Soften language: "validate" → "demonstrate practical relevance", "comparable" → "qualitatively competitive" | |
| Missing metrics | Add quantitative table with honest parameter counts and caveats | |
| Theorem not self-contained | Add "Interpretation" paragraph listing all dependencies | |
| Notation confusion | Rename conflicting symbols globally, add Notation paragraph | |
| Missing references | Add to references.bib, cite in appropriate locations | |
| Theory-practice gap | Explicitly frame theory as idealized; add synthetic validation subsection |
Step 4: Recompile Round 1
Verify: 0 undefined references, 0 undefined citations.
Step 5: Round 2 Review
Use mcp__gemini-review__review_reply_start with the saved completed threadId:
After this start call, immediately save the returned jobId and poll mcp__gemini-review__review_status with a bounded waitSeconds until done=true. Treat the completed status payload's response as the reviewer output, and save the completed threadId for any follow-up round.
Step 5b: Human Checkpoint (if enabled)
Skip if `HUMAN_CHECKPOINT = false`. Same as Step 2b — present Round 2 review, wait for user input.
Step 6: Implement Round 2 Fixes
Same process as Step 3. Typical Round 2 fixes:
- Add controlled synthetic experiments validating theory
- Further soften any remaining overclaims
- Formalize informal arguments (e.g., truncation → formal proposition)
- Strengthen limitations section
Step 7: Recompile Round 2
Step 8: Format Check
After the final recompilation, run a format compliance check:
Auto-fix patterns:
| Issue | Fix | |
|---|---|---|
| Overfull hbox in equation | Wrap in \resizebox or split with \split/aligned | |
| Overfull hbox in table | Reduce font (\small/\footnotesize) or use \resizebox{\linewidth}{!}{...} | |
| Overfull hbox in text | Rephrase sentence or add \allowbreak / \- hints | |
| Over page limit | Move content to appendix, compress tables, reduce figure sizes | |
| Underfull hbox (loose) | Rephrase for better line filling or add \looseness=-1 |
If any overfull hbox > 10pt is found, fix it and recompile before documenting.
Step 9: Document Results
Create PAPER_IMPROVEMENT_LOG.md in the paper directory:
Step 9: Summary
Report to user:
- Score progression table
- Number of CRITICAL/MAJOR/MINOR issues fixed per round
- Final page count
- Remaining issues (if any)
Feishu Notification (if configured)
After each round's review AND at final completion, check ~/.codex/feishu.json:
- After each round: Send
review_scored— "Round N: X/10 — [key changes]" - After final round: Send
pipeline_done— score progression table + final page count - If config absent or mode
"off": skip entirely (no-op)
Output
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
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.
- Preserve all PDF versions — user needs to compare progression
- Save FULL raw review text — do not summarize or truncate Gemini reviewer responses
- Use `mcp__gemini-review__review_reply_start` plus `mcp__gemini-review__review_status` for Round 2 to maintain conversation context
- Always recompile after fixes — verify 0 errors before proceeding
- Do not fabricate experimental results — synthetic validation must describe methodology, not invent numbers
- Respect the paper's claims — soften overclaims rather than adding unsupported new claims
- Global consistency — when renaming notation or softening claims, check ALL files (abstract, intro, method, experiments, theory sections, conclusion, tables, figure captions)
Typical Score Progression
Based on end-to-end testing on a real theory-paper run:
This is the start of the file. Read the full SKILL.md on GitHub.
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 repositoryChecking.vendor/aris/skills/skills-codex-gemini-review/auto-paper-improvement-loop/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
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/lightrain-a/medtrace-aris/auto-paper-improvement-loop)