paper-compile
Compile LaTeX paper to PDF, fix errors, and verify output.
Skill by wanshuiyin
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/wanshuiyin-paper-compile-f50126
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, research, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/paper-compile
What's inside
- Skill name
paper-compile- Description
- Compile LaTeX paper to PDF, fix errors, and verify output. Use when user says \"编译论文\", \"compile paper\", \"build PDF\", \"生成PDF\", or wants to compile LaTeX into a submission-ready PDF.
- License
- MIT
- Instructions
- 250 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Paper Compile: LaTeX to Submission-Ready PDF
Compile the LaTeX paper and fix any issues: **$ARGUMENTS**
## Constants
- **COMPILER = `latexmk`** — LaTeX build tool. Handles multi-pass compilation automatically.
- **ENGINE = `pdflatex`** — LaTeX engine. Options: `pdflatex` (default), `xelatex` (for CJK/custom fonts), `lualatex`.
- **MAX_COMPILE_ATTEMPTS = 3** — Maximum attempts to fix errors and recompile.
- **PAPER_DIR = `paper/`** — Directory containing LaTeX source files.
- **MAX_PAGES** — Page limit. ML conferences: main body to Conclusion end (excluding references & appendix). ICLR=9, NeurIPS=9, ICML=8. **IEEE venues: references ARE included in page count.** IEEE journal ≈ 12-14 pages, IEEE conference ≈ 5-8 pages (all inclusive).
- **RESCUE_ON_REPEAT_FAILURE = true** — If the same compile class fails after two attempts, preserve `compile.log` and ask for a focused rescue / second opinion before further edits.
## Workflow
### Step 1: Verify Prerequisites
Check that the compilation environment is ready:
```bash
# Check LaTeX installation
which pdflatex && which latexmk && which bibtex
# If not installed, provide instructions:
# macOS: brew install --cask mactex-no-gui
# Ubuntu: sudo apt-get install texlive-full
# Server: conda install -c conda-forge texlive-core
```
Verify all required files exist:
```bash
# Must exist
ls $PAPER_DIR/main.tex
# Should exist
ls $PAPER_DIR/references.bib
ls $PAPER_DIR/sections/*.tex
ls $PAPER_DIR/figures/*.pdf 2>/dev/null || ls $PAPER_DIR/figures/*.png 2>/dev/null
```
### Step 2: First Compilation Attempt
```bash
cd $PAPER_DIR
# Clean previous build artifacts
latexmk -C
# Full compilation (pdflatex + bibtex + pdflatex × 2)
latexmk -pdf -interaction=nonstopmode -halt-on-error main.tex 2>&1 | tee compile.log
```
### Step 3: Error Diagnosis and Auto-Fix
If compilation fails, read `compile.log` and fix common errors:
**Missing packages:**
```
! LaTeX Error: File `somepackage.sty' not found.
```
→ Install via `tlmgr install somepackage` or remove the `\usepackage` if unused.
**Undefined references:**
```
LaTeX Warning: Reference `fig:xyz' on page 3 undefined
```
→ Check `\label{fig:xyz}` exists in the correct figure environment.
**Missing figures:**
```
! LaTeX Error: File `figures/fig1.pdf' not found.
```
→ Check if the file exists with a different extension (.png vs .pdf). Update the `\includegraphics` path.
**Citation undefined:**
```
LaTeX Warning: Citation `smith2024' undefined
```
→ Add the missing entry to `references.bib` or fix the citation key.
**`[VERIFY]` markers in text:**
→ Search for `[VERIFY]` markers left by `/paper-write`. These indicate unverified citations or facts. Search for the correct information or flag to the user.
**Overfull hbox:**
```
Overfull \hbox (12.5pt too wide) in paragraph at lines 42--45
```
→ Minor: usually ignorable. If severe (>20pt), rephrase the text or adjust figure width.
**BibTeX errors:**
```
I was expecting a `,' or a `}'---line 15 of references.bib
```
→ Fix BibTeX syntax (missing comma, unmatched braces, special characters in title).
**`\crefname` undefined for custom theorem types:**
→ Ensure `\crefname{assumption}{Assumption}{Assumptions}` and similar are in the preamble after `\newtheorem{assumption}`.
### Step 4: Iterative Fix Loop
```
for attempt in 1..MAX_COMPILE_ATTEMPTS:
compile()
if success:
break
parse_errors()
auto_fix()
```
For each error:
1. Read the error message from `compile.log`
2. Locate the source file and line number
3. Apply the fix
4. Recompile
### Step 5: Post-Compilation Checks
After successful compilation, verify the output:From wanshuiyin/Auto-claude-code-research-in-sleep, MIT.
More from wanshuiyin/Auto-claude-code-research-in-sleep
- 0.699score
figure-spec
wanshuiyin
Generate deterministic publication-quality architecture, workflow, and pipeline diagrams from structured JSON (FigureSpec) into editable SVG.
SkillAFreshness: A★ 18KClaude Code +9 - 0.699score
paper-illustration-image2
wanshuiyin
Generate publication-quality academic illustrations through a local Codex app-server bridge that uses Codex native image generation.
SkillAFreshness: A★ 18KClaude Code - 0.699score
proof-orchestrator
wanshuiyin
Manage a stateful, run-directory-based proof project with Codex: continuation across runs, run-local source bookkeeping, manual GPT Pro handoff packages when…
SkillAFreshness: A★ 18KClaude Code +9 - 0.699score
render-html
wanshuiyin
Render an ARIS Markdown / JSON artifact (IDEA_REPORT, AUTO_REVIEW, KILL_ARGUMENT, PAPER_PLAN, research-wiki state, etc.) into a single-file HTML view designed…
SkillAFreshness: A★ 18KClaude Code +9 - 0.699score
proof-orchestrator
wanshuiyin
Manage a stateful, run-directory-based proof project: continuation across runs, run-local source bookkeeping, manual GPT Pro handoff packages when a local…
SkillAFreshness: A★ 18KClaude Code - 0.699score
paper-poster-html
wanshuiyin
DEFAULT poster pipeline — build an academic conference poster (ICML/NeurIPS/ICLR/CVPR/...) as a single HTML/CSS file with measurement-driven hard gates, real…
SkillAFreshness: A★ 18KClaude Code - 0.699score
lean-formalize
wanshuiyin
Develop and verify a mathematical proof in Lean, continue an incomplete Lean project, or audit whether it proves the original statement.
SkillAFreshness: A★ 18KClaude Code - 0.695score
experiment-queue
wanshuiyin
SSH job queue for multi-seed/multi-config ML experiments with OOM-aware retry, stale-screen cleanup, and wave-transition race prevention.
SkillAFreshness: A★ 18KClaude Code - 0.694score
arxiv
wanshuiyin
Search, download, and summarize academic papers from arXiv.
SkillAFreshness: A★ 18KClaude Code +9 - 0.694score
claims-drafting
wanshuiyin
Draft patent claims for an invention.
SkillAFreshness: A★ 18KClaude Code - 0.694score
analyze-results
wanshuiyin
Analyze ML experiment results, compute statistics, generate comparison tables and insights.
SkillAFreshness: A★ 18KClaude Code +9 - 0.694score
alphaxiv
wanshuiyin
Quick single-paper lookup via AlphaXiv LLM-optimized summaries with tiered source fallback.
SkillAFreshness: A★ 18KClaude Code +9
Compare and alternatives
Featured in
Signals
- Stars
- 18,007
- Forks
- 1,488
- Open issues
- 58
- Last commit (this folder)
- Apr 27, 2026 (6 months ago)
- Last release
- Sep 28, 2026 (29 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.362score
paper-compile
wanshuiyin
Compile LaTeX paper to PDF, fix errors, and verify output.
SkillAFreshness: A★ 18KClaude Code +9 - 0.290score
paper-compile
AI4Scientist
Compile LaTeX paper to PDF, fix errors, and verify output.
SkillCFreshness: C★ 128Claude Code +9 - 0.290score
paper-compile
AI4Scientist
Compile LaTeX paper to PDF, fix errors, and verify output.
SkillCFreshness: C★ 128Claude Code +9
More from wanshuiyin
- 0.699score
paper-poster-html
wanshuiyin
DEFAULT poster pipeline — build an academic conference poster (ICML/NeurIPS/ICLR/CVPR/...) as a single HTML/CSS file with measurement-driven hard gates, real…
SkillAFreshness: A★ 18KClaude Code - 0.699score
paper-illustration-image2
wanshuiyin
Generate publication-quality academic illustrations through a local Codex app-server bridge that uses Codex native image generation.
SkillAFreshness: A★ 18KClaude Code - 0.699score
lean-formalize
wanshuiyin
Develop and verify a mathematical proof in Lean, continue an incomplete Lean project, or audit whether it proves the original statement.
SkillAFreshness: A★ 18KClaude Code - 0.699score
figure-spec
wanshuiyin
Generate deterministic publication-quality architecture, workflow, and pipeline diagrams from structured JSON (FigureSpec) into editable SVG.
SkillAFreshness: A★ 18KClaude Code +9 - 0.699score
proof-orchestrator
wanshuiyin
Manage a stateful, run-directory-based proof project: continuation across runs, run-local source bookkeeping, manual GPT Pro handoff packages when a local…
SkillAFreshness: A★ 18KClaude Code - 0.699score
render-html
wanshuiyin
Render an ARIS Markdown / JSON artifact (IDEA_REPORT, AUTO_REVIEW, KILL_ARGUMENT, PAPER_PLAN, research-wiki state, etc.) into a single-file HTML view designed…
SkillAFreshness: A★ 18KClaude Code +9
Cite this page
paper-compile skill. Agent Mart. https://agentmart.dev/skills/wanshuiyin-paper-compile-f50126 (last updated 2026-10-24)