paper-compile

paper-compile is a skill for Claude Code from llv22/AutoResearchWithEyes. It costs 53 tokens per session (2,055 once invoked), scanned B, original, MIT.

A workflow for turning a LaTeX research paper into a PDF. LaTeX is a system for writing documents, especially technical and academic papers, using source files and commands.

In plain words
What is it for?
Use it to compile a paper, run the bibliography and repeated build steps, check page limits, and inspect the final PDF.
Why use it?
It helps find and fix compilation errors and verify that the resulting PDF is ready for submission. It also checks required tools and paper files before building.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md.

Part of the auto-research-with-eyes plugin — 10 skills, 5 commands, 2 agents, 1 MCP server shipped together

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.

agentmods
npx agentmods add skills/llv22/autoresearchwitheyes/paper-compile
Any agent
npx skills add llv22/AutoResearchWithEyes --skill paper-compile
Clone the repo
git clone --depth 1 https://github.com/llv22/AutoResearchWithEyes

Made for: Claude Code.

Or install auto-research-with-eyes, the plugin that ships this one along with the rest of its 10 skills, 5 commands, 2 agents, 1 MCP server.

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 paper-compile

README.md
[![agentmods](https://agentmods.dev/badge/skills/llv22/autoresearchwitheyes/paper-compile.svg)](https://agentmods.dev/skills/llv22/autoresearchwitheyes/paper-compile)
Your own site
<a href="https://agentmods.dev/skills/llv22/autoresearchwitheyes/paper-compile"><img src="https://agentmods.dev/badge/skills/llv22/autoresearchwitheyes/paper-compile.svg" alt="Measured on agentmods" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,055 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
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.00053 $0.02055
Opus 5 $0.00026 $0.01027
Sonnet 5 $0.00011 $0.00411
Haiku 4.5 $0.00005 $0.00205

Measured 5d ago against content hash 16adebd87d27, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade B, and why

paper-compile scanned grade B with 1 finding 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 5d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

# Ubuntu: sudo apt-get install texlive-full
skills/paper-compile/SKILL.md · 244 lines

How it starts

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

Paper Compile: LaTeX to Submission-Ready PDF

Compile the LaTeX paper and fix any issues: $ARGUMENTS

Constants

All constants (COMPILER, ENGINE, MAX_COMPILE_ATTEMPTS, VENUE) are defined in the project's CLAUDE.md. Read them from there before proceeding. Page limits are venue-dependent — see CLAUDE.md.

  • PAPER_DIR = paper/ — Directory containing LaTeX source files.

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.

Read the full file on GitHub · 244 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. 5d ago First seen · 244 lines · 53 tokens per session scan B 16adebd87d27

Subscribe to this mod's changes

paper-compile is a skill published in the GitHub repository llv22/AutoResearchWithEyes (5 stars, last pushed 1mo ago), licensed MIT. It adds 53 tokens to every session and 2,055 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

pydicom

Use pydicom to read, inspect, write, transform, and safely preflight local DICOM datasets and pixel data. Applies to DICOM metadata, transfer syntaxes, compression plugins, frames, private elements, JSON, and bounded de-identification review.

K-Dense-AI/scientific-agent-skills · 56 tokens

pptx-posters

Create and audit editable scientific posters in macro-free PowerPoint (.pptx) from author-approved local content and assets. Use when the requested deliverable is a PowerPoint research/conference poster and exact physical, printer, accessibility, provenance, and package-security checks are required.

K-Dense-AI/scientific-agent-skills · 59 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-compile

Compile LaTeX paper to PDF, fix errors, and verify output. Use when user says "编译论文", "compile paper", "build PDF", "生成PDF", or wants to compile LaTeX into a submission-ready PDF.

wanshuiyin/Auto-claude-code-research-in-sleep · 53 tokens

nsfc-budget

当用户明确要求“写/生成 NSFC 预算说明书”“写预算说明”“生成 budget.tex / budget.pdf”“写国自然预算 justification”时使用。基于用户标书正文或补充材料,输出一份可提交的预算说明书 LaTeX 项目并渲染 budget.pdf。若用户未指定工作目录,必须暂停并先要求其指定。⚠️ 不适用:用户只是想了解预算原则;用户仅要预算表数字而不写说明书;或用户是 2026 青年 A/B/C 默认包干制且无需预算说明书的场景。.

huangwb8/ChineseResearchLaTeX · 138 tokens

nsfc-ref-alignment

检查 NSFC 标书正文引用与参考文献的一致性与真实性风险(只读):核查 bibkey 是否存在、BibTeX 字段与 DOI 等格式问题,并生成结构化输入供宿主 AI 逐条评估“正文表述是否真的在引用该文献”;默认仅输出审核报告,不直接修改标书或 .bib(除非用户明确要求)。.

huangwb8/ChineseResearchLaTeX · 90 tokens