auto-paper-improvement-loop
Autonomously improve a generated paper via GPT-6-Astra xhigh review → implement fixes → recompile, for 2 rounds
Install / Use
npx skills add wanshuiyin/Auto-claude-code-research-in-sleep --skill auto-paper-improvement-loopInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
AI & Machine LearningSupported Platforms
Our assessment of auto-paper-improvement-loop
auto-paper-improvement-loop scores 86/100 on our quality scale, 276th of 688 AI & Machine Learning skills we index (top 41%).
Its SKILL.md is 40 KB long, well organised into 66 sections with 17 code examples: long enough that it reads more like full documentation than a focused instruction file, which agents can find harder to follow.
With 16,644 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 7 days ago, so auto-paper-improvement-loop is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-09-26. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
auto-paper-improvement-loop compared with similar skills
All 4 of these similar skills score higher than auto-paper-improvement-loop; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| auto-paper-improvement-loop (this skill)by wanshuiyin | 86 | 16.6k | 7d ago | SKILL.md |
| claude-memby thedotmack | 100 | 94.7k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 85.5k | 10d ago | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 84.2k | 14d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 73.8k | today | CLAUDE.md |
Frequently asked questions
- How do I install auto-paper-improvement-loop?
- Run
npx skills add wanshuiyin/Auto-claude-code-research-in-sleep --skill auto-paper-improvement-loop. The install tabs above show the steps for each supported agent. - Which AI agents does auto-paper-improvement-loop work with?
- It is written for OpenAI Codex, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is auto-paper-improvement-loop safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is auto-paper-improvement-loop still maintained?
- The repository was last updated 7 days ago, so auto-paper-improvement-loop is actively maintained.
Skill content
View source on GitHubname: auto-paper-improvement-loop description: "Autonomously improve a generated paper via GPT-6-Astra xhigh review → implement fixes → recompile, for 2 rounds. Use when user says "改论文", "improve paper", "论文润色循环", "auto improve", or wants to iteratively polish a generated paper." argument-hint: "[paper-directory] [— style-ref: <source>] [— edit-whitelist <path>]" allowed-tools: Bash(*), Read, Write, Edit, Grep, Glob, mcp__codex__codex, mcp__codex__codex-reply
Auto Paper Improvement Loop: Review → Fix → Recompile
🔒 Do not wrap this skill in
/loop,/schedule, orCronCreate. It already loops internally (review → fix → recompile) with its own round structure and a deliberate fresh-reviewer bias guard each round (nocodex-reply). Re-asking it to "improve the paper" on a wall-clock timer produces no new signal — quality changes when the review changes, not when the clock ticks — and a timed re-run that also accepts its own output to decide when to stop crosses into self-acquittal (acceptance-gate.md). Schedule the external wait that precedes it, not the improvement loop. Seeshared-references/external-cadence.md.
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 =
gpt-6-astra— Model used via Codex MCP for paper review. - REVIEWER_BIAS_GUARD = true — When
true, every review round uses a freshmcp__codex__codexthread with no prior review context. Never usemcp__codex__codex-replyfor review rounds. Set tofalseonly for deliberate debugging of the legacy behavior. Empirical evidence: running the same paper withcodex-reply+ "since last round we did X" prompts inflated scores from real 3/10 → fake 8/10 across multiple rounds; switching to fresh threads recovered the true 3/10 assessment. - 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. - EDIT_WHITELIST =
null— Optional path to a YAML/JSON whitelist file constraining which paths and operations the fix-implementation step may touch. Whennull(default), all edits proceed unconstrained. When set via— edit-whitelist <path>(also accepts— edit_whitelist <path>), the loop loads the file at startup and consults it before each edit; rejected edits are logged toPAPER_IMPROVEMENT_LOG.mdrather than silently dropped. See "Optional: Edit Whitelist" below.
💡 Override:
/auto-paper-improvement-loop "paper/" — human checkpoint: true
Optional: Style reference (— style-ref: <source>, opt-in)
Lets the user steer structural fixes only during improvement (section reordering hints, paragraph length nudges, figure density adjustments) toward a reference paper. Default OFF — when the user does not pass — style-ref, do nothing differently from before.
Only when — style-ref: <source> appears in $ARGUMENTS, run the helper FIRST, before the loop starts:
# Resolve $STYLE_HELPER via the canonical strict-safe chain (see
# shared-references/integration-contract.md §2). Policy A — gate:
# unresolved helper means --style-ref cannot be satisfied, so abort.
cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)" || exit 1
if [ -z "${ARIS_REPO:-}" ] && [ -f .aris/installed-skills.txt ]; then
ARIS_REPO=$(awk -F'\t' '$1=="repo_root"{print $2; exit}' .aris/installed-skills.txt 2>/dev/null) || true
fi
if [ -z "${ARIS_REPO:-}" ] && [ -f "$HOME/.aris/repo" ]; then
ARIS_REPO=$(cat "$HOME/.aris/repo" 2>/dev/null) || true
fi
STYLE_HELPER=".aris/tools/extract_paper_style.py"
[ -f "$STYLE_HELPER" ] || STYLE_HELPER="tools/extract_paper_style.py"
[ -f "$STYLE_HELPER" ] || { [ -n "${ARIS_REPO:-}" ] && STYLE_HELPER="$ARIS_REPO/tools/extract_paper_style.py"; }
[ -f "$STYLE_HELPER" ] || {
echo "ERROR: extract_paper_style.py not resolved at .aris/tools/, tools/, \$ARIS_REPO/tools/, or via ~/.aris/repo." >&2
echo " Fix: rerun bash tools/install_aris.sh or smart_update.sh (refreshes ~/.aris/repo), export ARIS_REPO, or copy the helper to tools/." >&2
echo " --style-ref cannot be satisfied; aborting." >&2
exit 1
}
STYLE_STATUS=0
CACHE=$(python3 "$STYLE_HELPER" --source "<source>") || STYLE_STATUS=$?
case "$STYLE_STATUS" in
0) ;; # use $CACHE/style_profile.md as structural guidance for the FIX phase only
2) echo "warning: style-ref skipped (missing optional dep)" >&2 ;;
3) echo "error: --style-ref source failed; aborting loop" >&2 ; exit 1 ;;
*) echo "error: helper failed unexpectedly; aborting loop" >&2 ; exit 1 ;;
esac
Sources accepted: local TeX dir / file, local PDF, arXiv id, http(s) URL. Overleaf URLs/IDs are rejected — clone via /overleaf-sync setup <id> first and pass the local clone path.
Strict rules (full contract in tools/extract_paper_style.py docstring):
- Use
style_profile.mdonly during the fix-implementation phase, to nudge structural choices when applying reviewer feedback. Reviewer feedback always takes precedence; style ref is tie-breaker for how to apply a fix, not whether to apply it. - Never copy prose, claims, examples, or terminology from anything reachable through the cache when implementing fixes.
- Never pass
— style-ref(or the cache contents) to the GPT-6-Astra reviewer sub-agent. The Reviewer Independence Protocol below requires reviewers see only the artifact and the user's prompt — leaking the style ref would contaminate the review with author-side context. This is the most critical invariant in this skill.
Optional: Edit Whitelist (— edit-whitelist <path>, opt-in)
Lets the caller hard-constrain which files and operations the fix-implementation step (Step 3 / Step 6) is allowed to touch. Default OFF — when the user does not pass — edit-whitelist (or the alias — edit_whitelist), the loop applies all reviewer-driven edits without restriction, exactly as before.
This is the parameter that upstream pipelines (e.g. /resubmit-pipeline Phase 2) use to enforce text-only resubmit microedits: no .bib mutations, no .sty / .bst mutations, no edits to prior-submission directories, no new \cite{...}, no new theorem environments, no new numerical claims.
Schema
The whitelist file is YAML or JSON. All four sections are optional:
allowed_paths:
- sec/*.tex
- main.tex
- figures/*.tex
forbidden_paths:
- "**/*.bib"
- "**/*.sty"
- "**/*.bst"
- "../OldSubmission/**"
forbidden_operations:
- new_cite # blocks \cite{...}, \citep{...}, \citet{...}, \citeauthor{...} additions
- new_bibitem # blocks \bibitem{...} additions
- new_theorem_env # blocks \begin{theorem|lemma|proposition|corollary} additions
- numerical_claim # blocks adding new numbers / percentages / metrics
forbidden_deletions: # operations that block REMOVALS, not additions
- delete_existing_cite # blocks removal of \cite{...} from the body (use citation-audit --soft-only instead)
- delete_theorem_env # blocks removal of an existing \begin{theorem|...} block
requires_user_approval_for: # operations that don't auto-reject but pause for explicit user OK
- rewrite_abstract # paraphrasing the entire abstract triggers a checkpoint
- rewrite_intro_first_para
- delete_section
max_edits_per_round: 30 # hard cap on number of accepted edits per round (rejections are not counted; if cap is hit, remaining proposed edits are deferred to the next round with a warning)
rationale: "Resubmit mode: text-only microedits, paper structure frozen by user constraint."
Resolution rules
allowed_pathsempty ANDforbidden_pathsempty → whitelist is a no-op (advisory: the file is loaded andrationaleechoed to the log, but no path filtering is applied).allowed_pathsempty,forbidden_pathsnon-empty → all paths NOT matched byforbidden_pathsare mutable.allowed_pathsnon-empty,forbidden_pathsempty → only paths matchingallowed_pathsare mutable.- Both non-empty → an edit is allowed iff the target matches
allowed_pathsAND does NOT matchforbidden_paths.forbidden_pathsalways wins on overlap. forbidden_operationsmissing or empty → no operation-level guard; only path-level filtering applies.
Glob semantics
Use bash extglob / Python fnmatch.fnmatch semantics. ** matches any depth (zero or more directory segments). Patterns are matched against the path relative to the paper directory (e.g. paper/sec/intro.tex matches sec/*.tex when paper-directory is paper/).
Forbidden-operation detectors
For each candidate edit's diff (the new lines being added — deletions are exempt), the loop runs these regex checks and rejects if any forbidden operation matches:
| Operation | Detector (added lines only) |
|-----------|------------------------------|
| new_cite | \\cite[a-zA-Z]*\{[^}]+\} (catches \cite, \citep, \citet, \citeauthor, \citeyear, \citealp, etc.) |
| new_bibitem | \\bibitem\{[^}]+\} |
| new_theorem_env | \\begin\{(theorem|lemma|proposition|corollary)\*?\} |
| numerical_claim | New token matching \b\d+(\.\d+)?%?\b that did NOT appear in the deleted/replaced lines (i.e. genuinely new numbers, not edits to existing ones) |
Behavior at loop start (before Round 1 fix-implementation)
- If
— edit-whitelist <path>is present in$ARGUMENTS, setEDIT_WHITELIST = <path>. - Load the file (
yaml.safe_load; if it fails, fall back tojson.loads). On load failure, abort the loop with a clear error — do NOT silently proceed unconstrained. - Echo
rationale(if present) intoPAPER_IMPROVEMENT_LOG.mdunder a new "Edit Whitelist" preamble section so the audit trail records why edits were constrained.
Behavior during fix-implementation (Steps 3 and 6)
Before applying each proposed edit:
- Resolve target file path relative to the paper directory.
- Path check: if
allowed_pathsis non-empty, target must match at least one pattern. Then ifforbidden_pathsis non-empty, target must NOT match any pattern. If either fails → reject aspathviolation. - Operation check: build the unified diff (or just the set of newly-added lines) for the proposed edit. For each entry in
forbidden_operations, run its detector on the added lines. If any detector matches → reject asoperationviolation. - If all checks pass, apply the edit normally.
- If rejected, append an entry to
PAPER_IMPROVEMENT_LOG.mdunder a## Rejected by edit_whitelist (Round N)heading with this schema:- file: <relative path> reason: path | operation pattern: <the offending forbidden_path glob, OR the offending forbidden_operation name + the matched substring> reviewer_concern: <the original Round-N weakness that motivated this edit> - Continue with the remaining edits in the round. Do NOT abort the whole round
Truncated for display — read the full file on GitHub.
Related Skills
claude-mem
94.7kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
85.5kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
84.2kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
headroom
73.8kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
