empiricalwiki: Skill for Claude Code

.claude/skills/paper-compile/SKILL.md

paper-compile is a skill for Claude Code from Lambenthan/empiricalwiki. It costs 37 tokens per session (2,617 once invoked), scanned B, original, MIT.

A LaTeX-to-PDF build and submission check for academic papers. LaTeX is a document system commonly used to format research papers.

In plain words
What is it for?
Use it to compile a paper directory containing main.tex, repair selected common errors, and produce a submission checklist.
Why use it?
It finds common build problems and checks requirements such as page limits, anonymous submission rules, embedded fonts, and unresolved citations or markers.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths; mentions Claude Code.

This is Lambenthan/empiricalwiki's own configuration. It tells Claude Code how to work on empiricalwiki itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything empiricalwiki configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 tools/research_wiki.py log wiki/ \.

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/Lambenthan/empiricalwiki/main/.claude/skills/paper-compile/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Lambenthan/empiricalwiki

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/lambenthan/empiricalwiki/paper-compile/github.svg)](https://agentmods.dev/skills/lambenthan/empiricalwiki/paper-compile)
Your own site
<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.

agentmods 80×15 button for paper-compile

Your own site · 80×15
<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>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,617 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00037 $0.02617
Opus 5 $0.00018 $0.01308
Sonnet 5 $0.00007 $0.00523
Haiku 4.5 $0.00004 $0.00262

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

Security

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)
.claude/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 论文为 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)

  1. 首次编译

    cd paper/ && latexmk -pdf -interaction=nonstopmode main.tex 2>&1
    
  2. 解析编译输出

    • 收集所有 errors(! ...
    • 收集所有 warnings(Warning: / Overfull / Underfull
    • 分类:
      • Missing package! LaTeX Error: File 'xxx.sty' not found
      • Undefined referenceLaTeX Warning: Reference 'xxx' on page N undefined
      • Undefined citationLaTeX Warning: Citation 'xxx' on page N undefined
      • Missing figure! LaTeX Error: File 'figures/xxx' not found
      • Syntax error:其他 ! 开头的错误
      • Overfull/Underfull:排版警告(非阻塞)
  3. 若编译成功(main.pdf 生成):进入 Step 3

  4. 若编译失败:进入 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 包)

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. 10d ago First seen · 244 lines · 37 tokens per session scan B 39334f02a2e6

Subscribe to this mod's changes

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.

Related

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.

gxgeek-n/wenqu-mem · 65 tokens

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-spine

Build, rewrite, audit, submit, revise, or transfer scholarly papers end to end, producing verified LaTeX/PDF/Word and target-specific publication packages.

WUBING2023/PaperSpine · 37 tokens

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.

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