paper-compile
Skill1.7k starsChanged 34 days agoMITView on GitHub
LaTeX compile → PDF — latexmk compile + auto-fix + page count/anonymity/font/[UNCONFIRMED] checks + submission checklist
- Installs packages
We split this skill into the rules it gives an agent
23 rules. 0 are common, 10 are distinctive, and 13 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
If --fix: modified .tex files (auto-fixed)
- Very specific: line 66
If --fix is enabled, attempt to auto-fix each error type:
- Very specific: line 75
If not installable: comment out the \usepackage{xxx} line and annotate % TODO: install package {xxx}
- Distinctive: line 80
If not: attempt to match from wiki papers and add an [UNCONFIRMED] entry
- Very specific: line 81
If present but bibtex has not run: re-run latexmk (latexmk usually handles this automatically)
- Very specific: line 84
Check if paper/figures/ contains a file with a different extension (.pdf vs .png vs .eps)
- Very specific: line 85
If found: correct the \includegraphics path
- Very specific: line 86
If not found: replace with placeholder \missingfigure{xxx} (requires todonotes package)
- Distinctive: line 91
If auto-fix is not possible: report error location and suggestions
- Distinctive: line 100
After successful compilation, run the following checks:
- Very specific: line 119
Search for author names (if \author{} is non-empty → warn)
- Distinctive: line 120
Search for institution names (university, lab, institute → warn)
- Distinctive: line 121
Search for GitHub/GitLab links (may reveal identity → warn)
- Distinctive: line 122
Search for "our previous work" / "we previously" → should use third-person citation
- Very specific: line 123
Search for \thanks{} / \acknowledgments → remove for anonymous submission
- Distinctive: line 130
If [UNCONFIRMED] markers exist: list each one.
- Distinctive: line 137
Check the "emb" column: all fonts should be "yes"
- Very specific: line 141
Search for TODO, FIXME, XXX markers
- Very specific: line 142
Search for \missingfigure, empty sections (\section{X} followed by no content)
- Very specific: line 143
Search for unreferenced figures/tables (\includegraphics present but no \ref)
- Distinctive: line 144
Check that the abstract exists and is non-empty
- Very specific: line 203
Do not modify wiki content: only operate on the paper/ directory and wiki/log.md
- Distinctive: line 208
pdfinfo/pdffonts dependency: if not installed, skip the corresponding check and annotate "tool not available"
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/paper-compile
Compile a LaTeX paper to PDF, auto-fix common errors, and verify submission requirements. Input: the paper/ directory generated by /paper-draft. Run latexmk compilation, parse errors and attempt auto-fix (missing packages, undefined references, figure paths). Verify page limit, anonymous compliance, font embedding, and clearance of [UNCONFIRMED] markers. Generate a submission checklist.
Inputs
paper_dir(optional, defaultpaper/): LaTeX project directory containingmain.tex--fix(optional): enable auto-fix mode (automatically install missing packages, correct paths)--checklist(optional): generate a detailed submission checklist (check only, no compilation)
Outputs
paper/main.pdf— compiled PDF- COMPILE_REPORT (printed to terminal) — compilation status, check results, submission checklist
- If
--fix: modified .tex files (auto-fixed)
Wiki Interaction
Reads
wiki/outputs/paper-plan-*.md— retrieve venue information (page limit, anonymity requirements).claude/skills/shared-references/citation-verification.md— [UNCONFIRMED] marker check rules
Writes
paper/main.pdf— compilation outputwiki/log.md— appended compilation log
Graph edges created
- None
Workflow
Precondition: confirm paper/main.tex exists. Confirm latexmk is installed (which latexmk).
Step 1: Compile
- First compilation:
cd paper/ && latexmk -pdf -interaction=nonstopmode main.tex 2>&1 - Parse compilation output:
- Collect all errors (
! ...) - Collect all warnings (
Warning:/Overfull/Underfull) - Classify:
- Missing package:
! LaTeX Error: File 'xxx.sty' not found - Undefined reference:
LaTeX Warning: Reference 'xxx' on page N undefined - Undefined citation:
LaTeX Warning: Citation 'xxx' on page N undefined - Missing figure:
! LaTeX Error: File 'figures/xxx' not found - Syntax error: other errors beginning with
! - Overfull/Underfull: typesetting warnings (non-blocking)
- Missing package:
- Collect all errors (
- If compilation succeeds (main.pdf generated): proceed to Step 3
- If compilation fails: proceed to Step 2
Step 2: Auto-Fix
If --fix is enabled, attempt to auto-fix each error type:
2a. Missing package:
# check if the package is installable via TeX Live
tlmgr info {package-name} 2>/dev/null
# if installable and user confirms:
tlmgr install {package-name}If not installable: comment out the \usepackage{xxx} line and annotate % TODO: install package {xxx}
2b. Undefined reference/citation:
- Undefined reference: check if the corresponding
\label{}exists; if not, add a placeholder label - Undefined citation: check if
references.bibcontains the key- If not: attempt to match from wiki papers and add an [UNCONFIRMED] entry
- If present but bibtex has not run: re-run
latexmk(latexmk usually handles this automatically)
2c. Missing figure:
- Check if
paper/figures/contains a file with a different extension (.pdf vs .png vs .eps) - If found: correct the
\includegraphicspath - If not found: replace with placeholder
\missingfigure{xxx}(requirestodonotespackage)
2d. Syntax error:
- Common fixes: unclosed
{}, mismatched\begin{}/\end{}, illegal characters - Attempt to locate the error line number; provide specific fix suggestions
- If auto-fix is not possible: report error location and suggestions
Re-compile after fixes (up to 3 fix-compile cycles):
cd paper/ && latexmk -pdf -interaction=nonstopmode main.tex 2>&1Step 3: Verification Checks
After successful compilation, run the following checks:
3a. Page count check:
# get PDF page count
python3 -c "
import subprocess
result = subprocess.run(['pdfinfo', 'paper/main.pdf'], capture_output=True, text=True)
for line in result.stdout.splitlines():
if line.startswith('Pages:'):
print(line.split(':')[1].strip())
"Compare against the venue page limit (retrieved from the PAPER_PLAN venue or the venue table in academic-writing.md).
- Exceeds limit: report number of pages over limit; suggest compressing or moving content to appendix
- Under limit: report remaining space; suggest adding content
3b. Anonymity check: Scan all .tex files:
- Search for author names (if
\author{}is non-empty → warn) - Search for institution names (university, lab, institute → warn)
- Search for GitHub/GitLab links (may reveal identity → warn)
- Search for "our previous work" / "we previously" → should use third-person citation
- Search for
\thanks{}/\acknowledgments→ remove for anonymous submission
3c. [UNCONFIRMED] marker check:
# scan references.bib and all .tex files
grep -rn "VERIFY" paper/- If [UNCONFIRMED] markers exist: list each one; flag as submission blocker
- Per citation-verification.md: [UNCONFIRMED] is a hard submission blocker
3d. Font embedding check:
pdffonts paper/main.pdf- Check the "emb" column: all fonts should be "yes"
- Unembedded fonts: report font names; suggest adding font embedding to compile options
3e. Content completeness check:
- Search for
TODO,FIXME,XXXmarkers - Search for
\missingfigure, empty sections (\section{X}followed by no content) - Search for unreferenced figures/tables (
\includegraphicspresent but no\ref) - Check that the abstract exists and is non-empty
Step 4: Generate Submission Checklist and Report
# Compile Report
## Compilation
- Status: {SUCCESS / FAILED}
- Compiler: latexmk + pdflatex
- Rounds: {N} (including auto-fix rounds)
- Errors: {N} (fixed: {M}, remaining: {K})
- Warnings: {N} (overfull: {O}, underfull: {U}, other: {W})
## Verification Results
| Check | Status | Details |
|-------|--------|---------|
| Page count | {PASS/FAIL} | {N} pages (limit: {L}) |
| Anonymous | {PASS/WARN} | {details} |
| [UNCONFIRMED] citations | {PASS/FAIL} | {N} remaining |
| Fonts embedded | {PASS/FAIL} | {details} |
| No TODOs | {PASS/WARN} | {N} remaining |
| Figures referenced | {PASS/WARN} | {details} |
| Abstract present | {PASS/FAIL} | {details} |
## Submission Checklist
- [ ] PDF compiles without errors
- [ ] Page count within venue limit ({L} pages)
- [ ] All [UNCONFIRMED] citations resolved
- [ ] Anonymous submission (no author info)
- [ ] All fonts embedded
- [ ] No TODO/FIXME markers
- [ ] All figures referenced in text
- [ ] Abstract present and complete
- [ ] Supplementary material prepared (if applicable)
- [ ] Paper title matches submission system
## Blocking Issues
{list of FAIL items that must be resolved before submission}
## Warnings (non-blocking)
{list of WARN items for consideration}
## Next Steps
- {specific actions to resolve blocking issues}
- Run `/refine paper/main.tex --focus writing` for final polish
- Manual review of anonymous complianceAppend log:
python3 tools/research_wiki.py log wiki/ \
"paper-compile | {SUCCESS/FAILED} | {pages} pages, {errors} errors, {verify_count} [UNCONFIRMED], {checks_passed}/{checks_total} checks passed"Constraints
- Do not modify wiki content: only operate on the paper/ directory and wiki/log.md
- Auto-fix requires --fix: by default, only report errors; do not fix
- [UNCONFIRMED] is a hard blocker: [UNCONFIRMED] present in submission checklist = not submittable
- Maximum 3 fix-compile rounds: prevent infinite fix loops
- Do not delete user content: auto-fix only adds or corrects; does not delete hand-written content
- pdfinfo/pdffonts dependency: if not installed, skip the corresponding check and annotate "tool not available"
- Anonymity check is heuristic: may produce false positives; annotate as WARN rather than FAIL
Error Handling
- main.tex not found: error; suggest running /paper-draft first
- latexmk not installed: error; provide installation command (
sudo apt install texlive-fullorbrew install --cask mactex) - Compilation failed and auto-fix unsuccessful: output full error log + locate specific .tex file and line number
- pdfinfo/pdffonts not installed: skip page count / font checks; annotate in report
- PAPER_PLAN not found: skip venue info extraction; use default limit (10 pages); warn user
- Permission issue (tlmgr requires sudo): report list of packages requiring manual installation
Dependencies
Tools(via Bash)
latexmk— LaTeX compilationpdfinfo— PDF page count check (poppler-utils)pdffonts— font embedding check (poppler-utils)python3 tools/research_wiki.py log wiki/ "<message>"— append log
MCP Servers
- None
Claude Code Native
Read— read .tex files and compilation logsEdit— auto-fix .tex files (--fix mode)Bash— execute compilation and check commandsGrep— search for [UNCONFIRMED], TODO, anonymity violations
Shared References
.claude/skills/shared-references/citation-verification.md— [UNCONFIRMED] marker check rules.claude/skills/shared-references/academic-writing.md— venue page limit reference
Called by
/researchStage 5 (paper compilation stage)- Manual user invocation
Trending
More talk lately.thin dataabout the whole repository
Who's talking about PKU-DAIR/AutoSci
The biggest 1 of 1 mention linking to the repository that our crawl found. Each line is their own headline.
Other versions10 projects use a version of this.
Word for word · 3
- DAIR-AutoResearch/AutoSci★ 1.7k100% same
- skyllwt/AutoSci★ 1.7k100% same
- skyllwt/OmegaWiki★ 1.7k100% same
Edited · 1
- Lambenthan/empiricalwiki★ 8535% same
Wrote their own version · 6
- wanshuiyin/Auto-claude-code-research-in-sleep★ 18ksame name
- Chanw-research/claude-code-paper-writing★ 42same name
- catalsqlb-cmd/Prism-H★ 16same name
- Yusong-Enceladus/claude-skills★ 8same name
- raja21068/AutoResearch★ 2same name
- talhaMah56/claude_skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository30 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- runtime/CLAUDE.mdCLAUDE.md
- askSkill
- checkSkill
- daily-arxivSkill
- discoverSkill
- editSkill
- exp-designSkill
- exp-evalSkill
- exp-pilot-evalSkill
- exp-pilot-runSkill
- exp-runSkill
- exp-statusSkill
- hiera-experimentSkill
- ideateSkill
- ingestSkill
- initSkill
- noveltySkill
- paper-draftSkill
- paper-planSkill
- posterSkill
- prefillSkill
- rebuttalSkill
- refineSkill
- researchSkill
- resetSkill
- reviewSkill
- setupSkill
- surveySkill
- visualizeSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

