paper-compile
Что он делает
Этот скилл собирает исследовательскую статью на LaTeX в PDF и исправляет ошибки, которые останавливают сборку. Он нужен авторам, которые готовят статью к подаче.
Когда использовать
- ✓Когда статья на LaTeX готова и вам нужен PDF.
- ✓Когда сборка LaTeX падает и нужно исправить ошибки.
- ✓Когда нужно проверить, укладывается ли статья в лимит страниц для вашей площадки.
Ссылка на скилл
https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep/blob/main/skills/paper-compile/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Мне нужно собрать мою статью на LaTeX в PDF, и исправь, пожалуйста, все ошибки сборки, которые найдёшь.”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Агент проверяет, что нужные инструменты и файлы на месте, запускает сборку и читает ошибки. Он исправляет их и собирает заново, до трёх попыток, а затем проверяет результат.
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с GitHub.
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).
Workflow
Step 1: Verify Prerequisites
Check that the compilation environment is ready:
# 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:
# 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
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:
- Read the error message from
compile.log - Locate the source file and line number
- Apply the fix
- Recompile
Stuck after 2 attempts? If Codex plugin is installed, invoke /codex:rescue — Codex can independently read the LaTeX source and compile.log to spot issues Claude missed (e.g., conflicting packages, encoding problems, subtle macro errors). If not installed, continue with Claude's own diagnosis.
Step 5: Post-Compilation Checks
After successful compilation, verify the output:
# Check PDF exists and has content
ls -la main.pdf
# Check page count
pdfinfo main.pdf | grep Pages
# macOS: open for visual inspection
# open main.pdf
Visual review (automated): If the compiled PDF exists, read it directly to check visual presentation:
- Figure quality: readable labels, legible text, distinguishable colors
- Layout: no orphaned section headers, no awkward page breaks
- Figures appear near their first text reference (not pages away)
- Tables: aligned columns, consistent decimal precision
- No overfull content visibly extending past margins
This is a quick visual scan, not a full review — the improvement loop does deeper visual review.
Automated checks:
- PDF file exists and is >
Частые вопросы
Какой движок LaTeX он использует?
По умолчанию pdflatex, а для своих шрифтов или текста CJK может использовать xelatex или lualatex.
Как он работает с лимитами страниц?
Он знает правила страниц для распространённых площадок, например ICLR, NeurIPS и IEEE, и проверяет статью по ним.
Нужно ли, чтобы LaTeX был установлен?
Да. Он сначала проверяет инструменты LaTeX и, если их нет, даёт инструкции по установке.
Подробности
Оригинальное описание автора
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.
Популярность
- Звёзды на GitHub
- 18k
- Место в рейтинге
- #10559
- Лицензия
- MIT
- Обновлён
- 02.11.2026
Комментарии
- …
Другие скиллы из этого репозитория
ablation-planner
18kПомогает вашему агенту планировать абляционные эксперименты для статьи: выбрать проверки, которые спросят рецензенты.
alphaxiv
18kПозволяет вашему агенту быстро прочитать одну научную статью по сводке AlphaXiv, по ссылке arXiv или ID.
analyze-results
18kПомогает вашему агенту анализировать результаты экспериментов машинного обучения и превращать цифры в понятные выводы.
arxiv
18kПозволяет вашему агенту искать статьи на arXiv по теме, читать их описания и сохранять PDF в вашу библиотеку.
Похожие скиллы
obsidian-vault-maintainer
394kПомогает агенту поддерживать в порядке хранилище памяти, совместимое с Obsidian: рабочие вики-ссылки, единые свойства и безопасные автогенерируемые разделы.
wiki-maintainer
394kПомогает агенту вести вики памяти OpenClaw: страницы остаются повторяемыми, управляемые блоки защищены, а противоречия и пробелы проверяются.
obsidian
394kПозволяет агенту читать, искать, создавать и редактировать заметки, задачи, ссылки и свойства Obsidian с помощью официальной командной строки Obsidian.