law-build

law-build is a skill for Claude Code, Codex from li-ch/law-skills. It costs 44 tokens per session (955 once invoked), scanned A, original, MIT.

A build workflow for compiling an academic paper written in LaTeX into a PDF.

In plain words
What is it for?
Use it to build the paper with pdflatex, run the required post-build checks, report the output PDF, and commit the changes.
Why use it?
It combines compilation with page counts and checks for references, citations, punctuation, and formatting, then saves the successful state in git.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to build the paper with pdflatex, run the required post-build checks, report the output PDF, and commit the changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/li-ch/law-skills/law-build
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 li-ch/law-skills --skill law-build
Clone the repo
git clone --depth 1 https://github.com/li-ch/law-skills

Made for: Claude Code, Codex.

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 law-build

README.md
[![agentmods](https://agentmods.dev/badge/skills/li-ch/law-skills/law-build/github.svg)](https://agentmods.dev/skills/li-ch/law-skills/law-build)
Your own site
<a href="https://agentmods.dev/skills/li-ch/law-skills/law-build"><img src="https://agentmods.dev/badge/skills/li-ch/law-skills/law-build/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 law-build

Your own site · 80×15
<a href="https://agentmods.dev/skills/li-ch/law-skills/law-build"><img src="https://agentmods.dev/badge/skills/li-ch/law-skills/law-build.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 955 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.
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.00044 $0.00955
Opus 5 $0.00022 $0.00477
Sonnet 5 $0.00009 $0.00191
Haiku 4.5 $0.00004 $0.00096

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

Security

Grade A, and why

law-build 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 11d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/build.bat, scripts/build.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.

law-build/SKILL.md · 82 lines

How it starts

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

LAW Build

Compile a LaTeX paper using pdflatex, producing a timestamped PDF main-YYYYMMDDHHMM.pdf. The build script opens this file automatically after compilation.

Workflow

Step 1: Detect platform and run build script

  • macOS/Linux: bash scripts/build.sh
  • Windows: build.bat

The script detects whether bibtex is needed by checking for \bibliography{ in main.tex.

Step 2: After build succeeds

Tell the user the build succeeded and show the output filename. Then:

  1. Run law-pagecount — counts pages per section from the compiled PDF
  2. Run law-verify — runs post-build checks (emdashes, refs, cites, formatting)
  3. Commit to git with a meaningful message

If either skill is not installed, tell the user the install command.

Step 3: Commit after build

After every successful build, commit all changes to git. This creates a recoverable snapshot of the paper state at each build.

To generate a meaningful commit message, run git diff --staged (or git diff if nothing staged) and git status --short to see what changed. Summarize the changes in one line. Examples:

  • "write §1 introduction with SCQA structure"
  • "add §3 system overview and architecture diagram"
  • "fix: replace bold numbers with normal text per writing rules"
  • "build: add real citations for related work"
  • "shrink §4 from 2.5 to 1.8 pages to fit page limit"

If nothing changed (rebuild with no edits), do not create an empty commit. Only commit when there are actual changes.

Use git add -A to stage everything, then git commit -m "message".

Step 4: Check nref.bib for unresolved citations

The paper uses two bib files:

  • refs.bib — verified citations with complete entries
  • nref.bib — placeholder entries for citations that need the user to fill in

After every build, check nref.bib:

  1. Count entries with TODO in the title field (unresolved)
  2. Count entries without TODO in the title field (user has filled them in)
  3. For newly filled entries: move them from nref.bib to refs.bib by:
    • Appending the complete entry to the end of refs.bib
    • Removing it from nref.bib
  4. Report to the user:
    • "nref.bib: N entries moved to refs.bib, M entries still need attention"
    • If any unresolved entries remain, list them with their TODO descriptions

Read the full file on GitHub · 82 lines

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. 11d ago First seen · 82 lines · 44 tokens per session scan A 8c12bd18ea61

Subscribe to this mod's changes

law-build is a skill published in the GitHub repository li-ch/law-skills (11 stars, last pushed 1mo ago), licensed MIT. It adds 44 tokens to every session and 955 once invoked, about $0.0002 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

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

nsfc-budget

A tool that creates an editable LaTeX budget justification and renders it as a PDF for an NSFC research-funding application. NSFC is China’s National Natural Science Foundation, and a budget justification explains why proposed costs are needed.

huangwb8/ChineseResearchLaTeX · 138 tokens