chapter-compilation

A workflow for compiling one LaTeX chapter separately from the rest of a paper. LaTeX is a system commonly used to write and typeset research papers.

In plain words
What is it for?
Use it to compile a selected chapter, such as a methods chapter, and check for local LaTeX regressions before handoff.
Why use it?
It lets you catch chapter-specific compilation errors without waiting for unrelated chapters to be complete.

Skill for Claude CodeCodex

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/sillydaibo/reasflow-dev/chapter-compilation
Any agent
npx skills add sillyDaibo/reasflow-dev --skill chapter-compilation
Clone the repo
git clone --depth 1 https://github.com/sillyDaibo/reasflow-dev

Made for: Claude Code, Codex.

Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 534 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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 $0.00024 $0.00534
Opus 5 $0.00012 $0.00267
Sonnet 5 $0.00005 $0.00107
Haiku 4.5 $0.00002 $0.00053

Measured 2d ago against content hash 6da82362071c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

chapter-compilation 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 2d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/compile_chapter.py, scripts/compile-chapter.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/reasflow/paper/chapter-compilation/SKILL.md · 81 lines

What it actually says

Installed Root

Resolve the installed reasflow-dev private skills root before running packaged scripts:

REASFLOW_PRIVATE_SKILLS_ROOT="${REASFLOW_PRIVATE_SKILLS_ROOT:-}"
if [ -z "$REASFLOW_PRIVATE_SKILLS_ROOT" ]; then
  if [ -d ./.codex/reasflow-skills ]; then
    REASFLOW_PRIVATE_SKILLS_ROOT="$(pwd)/.codex/reasflow-skills"
  elif [ -d "$HOME/.codex/reasflow-skills" ]; then
    REASFLOW_PRIVATE_SKILLS_ROOT="$HOME/.codex/reasflow-skills"
  else
    echo "reasflow private skills not found in ./.codex/reasflow-skills or $HOME/.codex/reasflow-skills" >&2
    exit 1
  fi
fi

Chapter Compilation

Overview

This skill restores the original paper-agent behavior: compile one chapter independently without waiting for unrelated chapters to be finished.

Installed Paths

Set:

SKILL_ROOT="$REASFLOW_PRIVATE_SKILLS_ROOT/paper/chapter-compilation"

Helper Commands

Wrapper:

bash "$SKILL_ROOT/scripts/compile-chapter.sh" paper/main.tex paper/method.tex

Direct Python:

python3 "$SKILL_ROOT/scripts/compile_chapter.py" \
  --project-dir paper \
  --main-file main.tex \
  --chapter method.tex

Python env fallback:

uv run python "$SKILL_ROOT/scripts/compile_chapter.py" \
  --project-dir paper \
  --main-file main.tex \
  --chapter method.tex

Output

The helper returns structured JSON with:

  • success
  • pdf_path
  • total_pages
  • preview_images
  • errors
  • warnings

What The Helper Does

  1. Extract preamble from main.tex.
  2. Generate _chapter_<name>.tex with only the target \input{...}.
  3. Compile via latexmk or manual engine plus BibTeX passes.
  4. Parse compiler output into structured errors and warnings.
  5. Render a small set of preview PNGs when local PDF tools are available.

Deliverables

  • isolated chapter compile status
  • preview image paths for visual inspection when available
  • explicit list of chapter-local errors to fix before handoff
Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 81 lines · 24 tokens per session scan A 6da82362071c

Subscribe to this mod's changes

chapter-compilation is a skill published in the GitHub repository sillyDaibo/reasflow-dev (2 stars, last pushed 6d ago), licensed MIT. It adds 24 tokens to every session and 534 once invoked, about $0.0001 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-31.

Related

Other skills, from other repositories

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

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

paper-artifact-runtime

Internal cross-platform artifact persistence, assembly, citation-audit, and PDF compilation runtime for meta-paper-write.

opensquilla/opensquilla · 26 tokens