Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add pedrohcgs/claude-code-my-workflow --skill compile-latex -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/compile-latex/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/compile-latex/

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

Similar skills

All skills for Writing and docs →

From the same set56

credible-claims A skill for delegated and AI-assisted research: write the brief before the run, the claim record after. Keeps fast execution from passing as credible evidence. CX Codex +1 ★ 1,671repo stars create-lecture Scaffolds LaTeX Beamer lecture decks from research papers, enforcing consistent math notation and strict pedagogical invariants. CX Codex +1 ★ 1,671repo stars context-status This skill checks estimated context use, the active plan, and session preservation. Use it to see what may remain after compaction. CX Codex +1 ★ 1,671repo stars compress-session This skill turns the current conversation into a structured note with decisions, open questions and next steps before auto-compaction eats the context. CX Codex +1 ★ 1,671repo stars commit Runs quality, consistency and passport gates, branches off main, stages named files, and writes a commit whose subject states what now holds true. CX Codex +1 ★ 1,671repo stars coauthor-brief Writes a Markdown handoff brief so a co-author can see what changed, where each artifact stands, and how to run the project on their own machine. CX Codex +1 ★ 1,671repo stars checkpoint Takes a structured snapshot of session state, active plans, and next steps before breaks, model switches, or collaborator handoffs. CX Codex +1 ★ 1,671repo stars capture-environment This skill snapshots language and package versions, seeds and RNG kind into lockfiles so a rerun matches on another machine. Reach for it before releasing a replication package. CX Codex +1 ★ 1,671repo stars

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