Borrowing it
Nothing to install: this file belongs to Lambenthan/empiricalwiki. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Lambenthan/empiricalwiki/main/.claude/skills/paper-compile/SKILL.mdgit clone --depth 1 https://github.com/Lambenthan/empiricalwikiWrote 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.
[](https://agentmods.dev/skills/lambenthan/empiricalwiki/paper-compile)<a href="https://agentmods.dev/skills/lambenthan/empiricalwiki/paper-compile"><img src="https://agentmods.dev/badge/skills/lambenthan/empiricalwiki/paper-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.
<a href="https://agentmods.dev/skills/lambenthan/empiricalwiki/paper-compile"><img src="https://agentmods.dev/badge/skills/lambenthan/empiricalwiki/paper-compile.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00037 | $0.02617 |
| Opus 5 | $0.00018 | $0.01308 |
| Sonnet 5 | $0.00007 | $0.00523 |
| Haiku 4.5 | $0.00004 | $0.00262 |
Grade B, and why
paper-compile scanned grade B with 2 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 10d 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.
- **latexmk 未安装**:报错,提供安装命令(`sudo apt install texlive-full` 或 `brew install --cask mactex`) Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
result = subprocess.run(['pdfinfo', 'paper/main.pdf'], capture_output=True, text=True) 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 论文为 PDF,自动修复常见错误,验证提交要求。 输入 paper/ 目录(由 /paper-draft 生成),执行 latexmk 编译, 解析错误并尝试自动修复(缺失包、引用未定义、figure 路径), 验证页数限制、匿名合规、字体嵌入、[UNCONFIRMED] 标记清除。 生成提交清单。
Inputs
paper_dir(可选,默认paper/):LaTeX 项目目录,包含main.tex--fix(可选):启用自动修复模式(自动安装缺失包、修正路径)--checklist(可选):生成详细提交清单(不编译,只检查)
Outputs
paper/main.pdf— 编译后的 PDF- COMPILE_REPORT(输出到终端)— 编译状态、检查结果、提交清单
- 若
--fix:修改的 .tex 文件(自动修复)
Wiki Interaction
Reads
wiki/outputs/paper-plan-*.md— 获取 venue 信息(页数限制、匿名要求).claude/skills/shared-references/citation-verification.md— [UNCONFIRMED] 标记检查规则
Writes
paper/main.pdf— 编译输出wiki/log.md— 追加编译日志
Graph edges created
- 无
Workflow
前置:确认 paper/main.tex 存在。确认 latexmk 已安装(which latexmk)。
Step 1: 编译(Compile)
-
首次编译:
cd paper/ && latexmk -pdf -interaction=nonstopmode main.tex 2>&1 -
解析编译输出:
- 收集所有 errors(
! ...) - 收集所有 warnings(
Warning:/Overfull/Underfull) - 分类:
- Missing package:
! LaTeX Error: File 'xxx.sty' not found - Undefined reference:
LaTeX Warning: Reference 'xxx' on page N undefined - Undefined citation:
LaTeX Warning: Citation 'xxx' on page N undefined - Missing figure:
! LaTeX Error: File 'figures/xxx' not found - Syntax error:其他
!开头的错误 - Overfull/Underfull:排版警告(非阻塞)
- Missing package:
- 收集所有 errors(
-
若编译成功(main.pdf 生成):进入 Step 3
-
若编译失败:进入 Step 2
Step 2: 自动修复(Auto-Fix)
若 --fix 启用,尝试自动修复每种错误类型:
2a. Missing package:
# 检查是否为 TeX Live 可安装包
tlmgr info {package-name} 2>/dev/null
# 若可安装且用户确认:
tlmgr install {package-name}
若无法安装:注释掉 \usepackage{xxx} 行并标注 % TODO: install package {xxx}
2b. Undefined reference/citation:
- Undefined reference:检查对应
\label{}是否存在,若不存在则添加占位 label - Undefined citation:检查
references.bib是否包含该 key- 若不包含:尝试从 wiki papers 匹配并添加 [UNCONFIRMED] 条目
- 若包含但 bibtex 未运行:重新运行
latexmk(通常 latexmk 自动处理)
2c. Missing figure:
- 检查
paper/figures/中是否存在不同扩展名的文件(.pdf vs .png vs .eps) - 若找到:修正
\includegraphics路径 - 若找不到:替换为占位符
\missingfigure{xxx}(需要todonotes包)
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.
- 10d ago First seen · 244 lines · 37 tokens per session scan B 39334f02a2e6
paper-compile is a skill published in the GitHub repository Lambenthan/empiricalwiki (82 stars, last pushed 2mo ago), licensed MIT. It adds 37 tokens to every session and 2,617 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
mem-thesis-build
A build workflow for compiling a ZJU MEM thesis in LaTeX, a system for producing formatted documents from source files. It checks formatting and the environment, compiles the document, and verifies the PDF output.
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.
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.
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.…
paper-spine
Build, rewrite, audit, submit, revise, or transfer scholarly papers end to end, producing verified LaTeX/PDF/Word and target-specific publication packages.
paper-compile
A build workflow that turns LaTeX source files into a PDF and checks whether the paper compiles correctly. LaTeX is a text-based system commonly used for academic papers.