Skip to main content
skill CX Codex

paper-compilation — Claude Code skill: compile LaTeX to PDF

Compiles a LaTeX paper to PDF, catches build errors and checks citations and references. Useful when pdflatex throws errors and the log is a mess.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add lingzhi227/agent-research-skills --skill paper-compilation -a claude-code
Open on GitHub

What paper-compilation does

The skill runs the full pdflatex → bibtex → pdflatex → pdflatex pipeline and reports back: build status, page count, warnings, citation and reference stats. Before compiling you can validate the source — every \cite{key} has a matching .bib entry, every \includegraphics{file} exists, no duplicate labels.

Three scripts do the work. compile_paper.py builds the PDF and takes --check-style for chktex and --auto-fix, which calls fix_latex_errors.py and recompiles for up to 3 rounds. That fixer handles HTML tags left in LaTeX, mismatched environments and missing figures, with --dry-run and --auto-detect flags. If the build still fails, the skill reads the log and applies one minimal fix per round, up to 5 rounds.

You need pdflatex installed: brew install --cask mactex-no-gui on macOS, sudo apt install texlive-full on Ubuntu. Without it the scripts won't start, so check that first. The path to the main .tex file is passed as an argument.

What it helps with

  • build a PDF from a LaTeX paper in one command
  • find why pdflatex failed by reading the log
  • verify every citation has a .bib entry
  • fix HTML tags and mismatched environments in a .tex file
  • check page count against a venue limit

Example prompts for the agent

  • compile paper/main.tex to PDF and show the report
  • run paper/main.tex with chktex style checking
  • recompile with auto-fix: paper/main.tex --auto-fix

How to install paper-compilation

1Skills CLI (Vercel)

npx skills add lingzhi227/agent-research-skills --skill paper-compilation -a claude-code

2Manually: put the files in place

~/.claude/skills/paper-compilation/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/paper-compilation/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about paper-compilation

How do I install paper-compilation in Claude?

Run npx skills add lingzhi227/agent-research-skills --skill paper-compilation -a claude-code. The skill file then lives at ~/.claude/skills/paper-compilation/SKILL.md.

What does paper-compilation do?

It compiles a LaTeX paper to PDF through pdflatex and bibtex, validates citations and references, and fixes .tex errors before recompiling.

What do I need for it to work?

A working pdflatex. On macOS install it with brew install --cask mactex-no-gui, on Ubuntu with sudo apt install texlive-full.

Similar skills

Everything for Science and research →

From the same set23

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor