Draft LaTeX paper section by section from an outline. Use when user says "写论文", "write paper", "draft LaTeX", "开始写", or wants to generate LaTeX content from a paper plan.
npx claudepluginhub llv22/autoresearchwitheyesThis skill is limited to using the following tools:
Draft a LaTeX paper based on: **$ARGUMENTS**
Writes publication-ready ML/AI papers for NeurIPS, ICML, ICLR, ACL, AAAI, COLM from research repos. Handles literature reviews, citation verification, related work, and LaTeX templates.
Orchestrates multi-agent writing of academic papers or proposals from research artifacts, with evidence-grounded prose, MAGI cross-review, and quality validation.
Generates IEEE/ACM-formatted academic research papers with proper structure, citations, and scholarly style. Use when asked to write research, academic, or conference papers.
Share bugs, ideas, or general feedback.
Draft a LaTeX paper based on: $ARGUMENTS
All constants (REVIEWER_MODEL, VENUE, TEMPLATE_DIR) are defined in the project's CLAUDE.md. Read them from there before proceeding. Page limits are venue-dependent — see CLAUDE.md.
/paper-plan)figures/ (from /paper-figure)figures/latex_includes.tex (from /paper-figure).bib file, or will create oneIf no PAPER_PLAN.md exists, ask the user to run /paper-plan first or provide a brief outline.
Copy venue template files from TEMPLATE_DIR/VENUE/ (resolved per CLAUDE.md). The template directory should contain the venue's .sty, .cls, and .bst files.
Generate this file structure:
paper/
├── main.tex # master file (includes sections)
├── iclr2026_conference.sty # or neurips_2025.sty / icml2025.sty
├── math_commands.tex # shared math macros
├── references.bib # bibliography (filtered — only cited entries)
├── sections/
│ ├── 0_abstract.tex
│ ├── 1_introduction.tex
│ ├── 2_related_work.tex
│ ├── 3_method.tex # or preliminaries, setup, etc.
│ ├── 4_experiments.tex
│ ├── 5_conclusion.tex
│ └── A_appendix.tex # proof details, extra experiments
└── figures/ # symlink or copy from project figures/
Section files are FLEXIBLE: If the paper plan has 6-8 sections, create corresponding files (e.g., 4_theory.tex, 5_experiments.tex, 6_analysis.tex, 7_conclusion.tex).
If paper/ already exists, back up to paper-backup-{timestamp}/ before overwriting. Never silently destroy existing work.
CRITICAL: Clean stale files. When changing section structure (e.g., 5 sections → 7 sections), delete section files that are no longer referenced by main.tex. Stale files (e.g., old 5_conclusion.tex left behind when conclusion moved to 7_conclusion.tex) cause confusion and waste space.
paper/ directorytemplates/ — the template already includes:
\crefname{assumption} fixmath_commands.tex with paper-specific notationAuthor block (anonymous mode):
\author{Anonymous Authors}
Create shared math macros based on the paper's notation:
% math_commands.tex — shared notation
\newcommand{\R}{\mathbb{R}}
\newcommand{\E}{\mathbb{E}}
\DeclareMathOperator*{\argmin}{arg\,min}
\DeclareMathOperator*{\argmax}{arg\,max}
% Add paper-specific notation here
Process sections in order. For each section:
figures/latex_includes.tex\citep{} / \citet{} (all three venues use natbib)§0 Abstract:
\begin{abstract} — that's in main.tex§1 Introduction:
§2 Related Work:
\paragraph{Category Name.}§3 Method / Preliminaries / Setup:
\begin{definition}, \begin{theorem} environments for formal statementsalgorithm2e or algorithmic)§4 Experiments:
§5 Conclusion:
Appendix:
CRITICAL: Only include entries that are actually cited in the paper.
\citep{} and \citet{} references in the drafted sections.bib files in the project/narrative docs[VERIFY] commentreferences.bib containing ONLY cited entries (no bloat)Automated bib cleaning — use this Python pattern to extract only cited entries:
import re
# 1. Grep all \citep{...} and \citet{...} from all .tex files
# 2. Extract unique keys (handle multi-cite like \citep{a,b,c})
# 3. Parse the full .bib file, keep only entries whose key is in the cited set
# 4. Write the filtered bib
This prevents bib bloat (e.g., 948 lines → 215 lines in testing).
Citation verification rules (from claude-scholar + Imbad0202):
{firstauthor}{year}{keyword} (e.g., ho2020denoising)After drafting all sections, scan for common AI writing patterns and fix them:
Content patterns to fix:
Language patterns to fix (watch words):
Send the complete draft to REVIEWER_MODEL xhigh:
mcp__codex__codex:
model: REVIEWER_MODEL
config: {"model_reasoning_effort": "xhigh"}
prompt: |
Review this [VENUE] paper draft (main body, excluding appendix).
Focus on:
1. Does each claim from the intro have supporting evidence?
2. Is the writing clear, concise, and free of AI-isms?
3. Any logical gaps or unclear explanations?
4. Does it fit within [MAX_PAGES] pages (to end of Conclusion)?
5. Is related work sufficiently comprehensive (≥1 page)?
6. For theory papers: are proof sketches adequate?
7. Are figures/tables clearly described and properly referenced?
For each issue, specify: severity (CRITICAL/MAJOR/MINOR), location, and fix.
[paste full draft text]
Apply CRITICAL and MAJOR fixes. Document MINOR issues for the user.
After drafting all sections:
Before declaring done:
\ref{} and \label{} match (no undefined references)\citep{} / \citet{} have corresponding BibTeX entries[VERIFY] markers left uncheckedsections/ is \inputed by main.tex\input paths are consistentlatexmk without errors (modulo missing figures)natbib (\citep/\citet)\citedpaper/ directory without backing upPrinciples from Research-Paper-Writing-Skills:
De-AI patterns from kgraph57/paper-writer-skill:
Writing methodology adapted from Research-Paper-Writing-Skills (CCF award-winning methodology). Citation verification from claude-scholar and Imbad0202/academic-research-skills. De-AI polish from kgraph57/paper-writer-skill. Backup mechanism from baoyu-skills.