paper-compile
Что он делает
Эта версия скилла сборки статьи для Codex собирает статью на LaTeX в PDF и исправляет ошибки. Она нужна авторам, которые готовят статью к подаче в Codex.
Когда использовать
- ✓Когда статья на LaTeX готова и вам нужен PDF.
- ✓Когда сборка падает и нужно исправить ошибки.
- ✓Когда одна и та же ошибка сборки повторяется и нужно второе мнение.
Ссылка на скилл
https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep/blob/main/skills/skills-codex/paper-compile/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Мне нужно собрать мою статью на LaTeX в PDF, и я хочу, чтобы исправили ошибки сборки.”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Агент проверяет инструменты и файлы LaTeX, запускает сборку и читает ошибки. Он исправляет их и собирает заново до трёх раз, а если одна и та же ошибка повторяется, сохраняет журнал и просит точечное второе мнение.
Технический текст (оригинальный 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).
- RESCUE_ON_REPEAT_FAILURE = true — If the same compile class fails after two attempts, preserve
compile.logand ask for a focused rescue / second opinion before further edits.
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
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
Automated checks:
- PDF file exists and is > 100KB (not empty/corrupt)
- Total page count is reasonable (MAX_PAGES + appendix + references)
- No "??" in the PDF (undefined references — grep the log)
- No "[?]" in the PDF (undefined citations — grep the log)
- Figures are rendered (not missing image placeholders)
# Check for undefined references
grep -c "LaTeX Warning.*undefined" compile.log
# Check for missing citations
grep -c "Citation.*undefined" compile.log
Step 6: Page Count Verification
CRITICAL: Verify paper fits within MAX_PAGES.
For ML conferences (ICLR/NeurIPS/ICML/CVPR/ACL/AAAI): Main body = first page through end
Частые вопросы
Какие движки он может использовать?
По умолчанию pdflatex, а для своих шрифтов или текста CJK можно переключиться на xelatex или lualatex.
Проверяет ли он лимиты страниц?
Да. Он знает правила страниц для распространённых площадок и проверяет статью по ним.
Что если LaTeX не установлен?
Скилл сначала проверяет его наличие и даёт шаги установки для macOS, Ubuntu или сервера.
Подробности
Оригинальное описание автора
Compile LaTeX paper to PDF, fix errors, and verify output. Use when user says \\\"\u7f16\u8bd1\u8bba\u6587\\\", \\\"compile paper\\\", \\\"build PDF\\\", \\\"\u751f\u6210PDF\\\", or wants to compile LaTeX into a submission-ready PDF.
Популярность
- Звёзды на GitHub
- 18k
- Место в рейтинге
- #10607
- Лицензия
- 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.