latex-compile

latex-compile is a skill for Claude Code from Mexregkan/claude-for-researchers. It costs 79 tokens per session (2,644 once invoked), scanned A, original, MIT.

A LaTeX document checker and compiler. LaTeX is a text-based system for creating formatted documents such as papers and reports.

In plain words
What is it for?
Use it after editing a .tex file or before committing to produce a clean PDF and check the build output.
Why use it?
It finds compilation errors and layout problems, including text running into margins, awkward page breaks, alignment issues, and font problems.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md.

Good fit Use it after editing a .tex file or before committing to produce a clean PDF and check the build output.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mexregkan/claude-for-researchers/latex-compile
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Mexregkan/claude-for-researchers --skill latex-compile
Clone the repo
git clone --depth 1 https://github.com/Mexregkan/claude-for-researchers

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for latex-compile

README.md
[![agentmods](https://agentmods.dev/badge/skills/mexregkan/claude-for-researchers/latex-compile/github.svg)](https://agentmods.dev/skills/mexregkan/claude-for-researchers/latex-compile)
Your own site
<a href="https://agentmods.dev/skills/mexregkan/claude-for-researchers/latex-compile"><img src="https://agentmods.dev/badge/skills/mexregkan/claude-for-researchers/latex-compile/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for latex-compile

Your own site · 80×15
<a href="https://agentmods.dev/skills/mexregkan/claude-for-researchers/latex-compile"><img src="https://agentmods.dev/badge/skills/mexregkan/claude-for-researchers/latex-compile.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,644 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00079 $0.02644
Opus 5 $0.00039 $0.01322
Sonnet 5 $0.00016 $0.00529
Haiku 4.5 $0.00008 $0.00264

Measured 12d ago against content hash 54b50302bcd3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

latex-compile scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

starter/.claude/skills/latex-compile/SKILL.md · 159 lines

How it starts

The opening of the file, as written. The whole thing — 159 lines — stays where its author put it; the contents beside it link to each section on GitHub.

latex-compile

Compile a LaTeX document, fix all errors and all aesthetic issues so the PDF is clean and the log is empty — without ever altering content to make things fit.

When to invoke

After any edit to a .tex file. Also invoke before committing.

Input

The user may specify one or more files: /latex-compile brief.tex workbook.tex. Default: workbook.tex. Work from the project root (wherever CLAUDE.md lives).

1. Compile — always force a real pass, capture stdout

Critical: never trust the .log for warnings. When latexmk decides targets are up-to-date it skips compilation and leaves a stale log that under-reports (or zeroes out) overfull warnings. Force a real pdflatex pass and capture its stdout:

pdflatex -interaction=nonstopmode <file> > /tmp/tex.txt 2>&1

Run twice when cross-references, TOC, or forward \refs changed (or a manual \label bibliography needs a second pass to resolve \cite).

Always use grep -a. pdflatex embeds binary font-path bytes in its output, so plain grep treats the stream as binary and matches nothing. Every grep below uses -a.

2. Collect ALL issues from the fresh stdout

grep -anE "^! |LaTeX Error|[Uu]ndefined|Overfull|Underfull|multiply defined|Font (shape|Warning)|File .*not found" /tmp/tex.txt

Case matters — this is the bug that lets [?]/?? ship. pdflatex writes Undefined control sequence (capital, a fatal error) but the broken-ref/cite warnings are lowercase: Reference 'x' … undefined, Citation 'x' … undefined, and the end-of-run summary There were undefined references/Citation 'x' undefined. A pattern of Undefined alone silently misses every one of those — so the PDF prints ?? for a dead \ref and [?] for a dead \cite while the grep reports nothing. The bracketed class [Uu]ndefined catches both.

Category Marker Threshold to fix
Fatal errors ! , LaTeX Error, Runaway argument, Emergency stop Always
Undefined refs/cites Reference … undefined, Citation … undefined Always (or note if intentional forward ref)
Overfull hbox Overfull \hbox … too wide by Xpt Fix if X > 5pt (see triage)
Underfull hbox Underfull \hbox … badness N Fix if N ≥ 1000
Over/underfull vbox Overfull \vbox, Underfull \vbox … badness N vbox: always; underfull vbox: N ≥ 10000
Font warnings Font shape … not found, LaTeX Font Warning Fix (but see the harmless cases in §6)
Missing packages File … not found Always
Multiply-defined labels multiply defined Always

Read the full file on GitHub · 159 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 159 lines · 79 tokens per session scan A 54b50302bcd3

Subscribe to this mod's changes

latex-compile is a skill published in the GitHub repository Mexregkan/claude-for-researchers (52 stars, last pushed 9d ago), licensed MIT. It adds 79 tokens to every session and 2,644 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

beamer-deck

Create an academic presentation as a LaTeX Beamer source and reviewed PDF with an original theme. Use when the requested deliverable is a conference, seminar, or lecture deck in Beamer. Not for PowerPoint or RevealJS; use $pptx or $quarto-deck.

flonat/flonat-research · 63 tokens

bib-parse

Extract citations from a PDF and generate a validated .bib file. Use when the user asks to extract citations from a PDF and generate a validated .bib file. Reads the PDF, identifies referenced works, constructs BibTeX entries, and verifies metadata.

flonat/flonat-research · 54 tokens

latex-polish

Inspect a cleanly compiling LaTeX document for source pathologies and rendered visual defects by linting and viewing selected PDF pages. Use when compilation succeeds but title pages, floats, tables, figures, or layout still need publication-quality review. Not for basic compilation health; use $latex-health-check.

flonat/flonat-research · 64 tokens

latex-health-check

Compile all LaTeX projects and report cross-project build consistency. Use when checking whether a collection of papers builds cleanly. Not for rendered visual inspection after a clean build; use $latex-polish.

flonat/flonat-research · 45 tokens

extracting-lab-tables

Detects and extracts tabular laboratory panels from PDFs, scans, and images into structured rows ready for OpenMed and FHIR. Use when the user has a CBC, CMP, lipid panel, or other lab report as a scanned image / PDF / spreadsheet and needs the test name, value, unit, reference range, and abnormal flag as clean rows.…

maziyarpanahi/openmed · 210 tokens

paper-length-gate

Deterministic artifact-backed manuscript readiness gate for meta-paper-write. Validates the workspace LaTeX artifact before compilation while leaving final page-count enforcement to compilepdf.

opensquilla/opensquilla · 38 tokens