compile-latex — Claude Code skill: what it does, how to install
Compiles Beamer slide decks using XeLaTeX across three passes and BibTeX. Helpful when rendering slides inside Slides/ with custom themes and citations.
npx skills add pedrohcgs/claude-code-my-workflow --skill compile-latex -a claude-codeWhat compile-latex does
This skill automates Beamer presentation compilation inside the Slides/ directory. It executes a multi-step sequence: an initial xelatex run generates the .aux file, bibtex processes references into .bbl, and two subsequent xelatex passes resolve page numbers and cross-references. An alternative one-line build with latexmk is also supported.
Once finished, the agent scans compiler logs via grep for missing references, changed labels, and Overfull \hbox warnings. It launches the compiled PDF via open on macOS or xdg-open on Linux, followed by a summary of total pages and any warnings encountered.
The workflow assumes a fixed folder arrangement. It sets TEXINPUTS pointing to ../Preambles and BIBINPUTS pointing to the repository root for .bib files. Standard pdflatex is explicitly forbidden by the workflow: your environment must have xelatex available.
What it helps with
- compile Beamer presentations with full citation resolution
- check LaTeX logs for Overfull hbox warnings and undefined references
- open the generated PDF file automatically after building
- resolve Beamer styles located in Preambles/ using TEXINPUTS
Example prompts for the agent
- Build the presentation slide deck inside Slides
- Compile lecture01 and verify if any citations are undefined
- Rebuild the PDF for talk and check the final page count
How to install compile-latex
1Skills CLI (Vercel)
npx skills add pedrohcgs/claude-code-my-workflow --skill compile-latex -a claude-code2Manually: put the files in place
~/.claude/skills/compile-latex/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/compile-latex/
1Skills CLI (Vercel)
npx skills add pedrohcgs/claude-code-my-workflow --skill compile-latex -a codex2Manually: put the files in place
.agents/skills/compile-latex/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add pedrohcgs/claude-code-my-workflow --skill compile-latex -a cursor2Manually: put the files in place
.cursor/skills/compile-latex/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install pedrohcgs/claude-code-my-workflow compile-latex2Manually: put the files in place
.github/skills/compile-latex/SKILL.md1Skills CLI (Vercel)
npx skills add pedrohcgs/claude-code-my-workflow --skill compile-latex -a gemini-cli2Platform CLI
gemini skills install https://github.com/pedrohcgs/claude-code-my-workflow --path .claude/skills/compile-latexManually: put the files in place
.devin/skills/compile-latex/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add pedrohcgs/claude-code-my-workflow --skill compile-latex -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about compile-latex
How do I install compile-latex in Claude Code?
Run npx skills add pedrohcgs/claude-code-my-workflow --skill compile-latex -a claude-code. You can also manually place the skill file in ~/.claude/skills/compile-latex/SKILL.md.
What does compile-latex do?
It compiles Beamer presentations in Slides/ through three XeLaTeX passes and BibTeX, scans logs for compilation warnings, and previews the resulting PDF.
Why does compile-latex require XeLaTeX instead of pdflatex?
The skill enforces xelatex to maintain full compatibility with modern font handling and the Beamer themes located in the Preambles/ folder.
Source text
SKILL.md · MIT
--- name: compile-latex description: Compile a Beamer LaTeX slide deck with XeLaTeX (3 passes + bibtex). Use when user says "compile", "build the slides", "rebuild the PDF", "run latex", "render the tex", or asks why a `.tex` file isn't producing a PDF. Operates on `Slides/*.tex`. argument-hint: "[filename without .tex extension]" allowed-tools: ["Read", "Bash", "Glob"] --- # Compile Beamer LaTeX Slides Compile a Beamer slide deck using XeLaTeX with full citation resolution. ## Steps 1. **Navigate to Slides/ directory** and compile with 3-pass sequence: ```bash cd Slides TEXINPUTS=../Preambles:$TEXINPUTS xelatex -interaction=nonstopmode $ARGUMENTS.tex BIBINPUTS=..:$BIBINPUTS bibtex $ARGUMENTS TEXINPUTS=../Preambles:$TEXINPUTS xelatex -interaction=nonstopmode $ARGUMENTS.tex TEXINPUTS=../Preambles:$TEXINPUTS xelatex -interaction=nonstopmode $ARGUMENTS.tex ``` **Alternative (latexmk):** ```bash cd Slides TEXINPUTS=../Preambles:$TEXINPUTS BIBINPUTS=..:$BIBINPUTS latexmk -xelatex -interaction=nonstopmode $ARGUMENTS.tex ``` 2. **Check for warnings:** - Grep output for `Overfull \\hbox` warnings - Grep for `undefined citations` or `Label(s) may have changed` - Report any issues found 3. **Open the PDF** for visual verification: ```bash open Slides/$ARGUMENTS.pdf # macOS # xdg-open Slides/$ARGUMENTS.pdf # Linux ``` 4. **Report results:** - Compilation success/failure - Number of overfull hbox warnings - Any undefined citations - PDF page count ## Why 3 passes? 1. First xelatex: Creates `.aux` file with citation keys 2. bibtex: Reads `.aux`, generates `.bbl` with formatted references 3. Second xelatex: Incorporates bibliography 4. Third xelatex: Resolves all cross-references with final page numbers ## Important - **Always use XeLaTeX**, never pdflatex - **TEXINPUTS** is required: your Beamer theme lives in `Preambles/` - **BIBINPUTS** is required: your `.bib` file lives in the repo root
© pedrohcgs · MIT · pedrohcgs/claude-code-my-workflow