compile

compile is a skill for Claude Code from danielrosehill/Claude-SOP-Writer-Plugin. It costs 85 tokens per session (539 once invoked), scanned A, original, MIT.

A tool that turns one SOP or flowchart into a PDF. An SOP is a written step-by-step procedure; a flowchart is a diagram showing decisions or process steps.

In plain words
What is it for?
Use it to compile `.typ` documents or render `.mmd` Mermaid and `.d2` D2 flowcharts into output files.
Why use it?
It handles the separate rendering and compiling steps needed when a document includes Mermaid or D2 diagrams. It also checks whether the required command-line tools are installed.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the sop-writer plugin — 6 skills shipped together

Good fit Use it to compile .typ documents or render .mmd Mermaid and .d2 D2 flowcharts into output files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/danielrosehill/claude-sop-writer-plugin/compile
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 danielrosehill/Claude-SOP-Writer-Plugin --skill compile
Clone the repo
git clone --depth 1 https://github.com/danielrosehill/Claude-SOP-Writer-Plugin

Made for: Claude Code.

Or install sop-writer, the plugin that ships this one along with the rest of its 6 skills.

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 compile

README.md
[![agentmods](https://agentmods.dev/badge/skills/danielrosehill/claude-sop-writer-plugin/compile/github.svg)](https://agentmods.dev/skills/danielrosehill/claude-sop-writer-plugin/compile)
Your own site
<a href="https://agentmods.dev/skills/danielrosehill/claude-sop-writer-plugin/compile"><img src="https://agentmods.dev/badge/skills/danielrosehill/claude-sop-writer-plugin/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 compile

Your own site · 80×15
<a href="https://agentmods.dev/skills/danielrosehill/claude-sop-writer-plugin/compile"><img src="https://agentmods.dev/badge/skills/danielrosehill/claude-sop-writer-plugin/compile.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 539 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.00085 $0.00539
Opus 5 $0.00043 $0.00269
Sonnet 5 $0.00017 $0.00108
Haiku 4.5 $0.00009 $0.00054

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

Security

Grade A, and why

compile 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 8d 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.

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/compile/SKILL.md · 52 lines

What it actually says

compile

Render a single document to PDF. Project-scoped — operates on files in the current working directory.

Inputs to gather

  1. Source path — the .typ, .mmd, or .d2 file to compile. Accept absolute or project-relative.
  2. Output path (optional) — defaults to output/<source-stem>.pdf in the project root, creating output/ if missing.

What to do

If the source is a .typ file

  1. Detect any sibling .mmd or .d2 files referenced by #image(...) in the Typst source. For each, render to SVG first (see flowchart steps below).
  2. Run:
    typst compile <source.typ> <output.pdf>
    
  3. Report the output path and file size.

If the source is a .mmd file (Mermaid)

mmdc -i <source.mmd> -o <source-stem>.svg

Then compile the sibling .typ wrapper if one exists, or just leave the SVG.

If the source is a .d2 file

d2 <source.d2> <source-stem>.svg

Same follow-up as Mermaid.

Pre-flight checks

  • command -v typst — if missing, tell the user to install it (cargo install typst-cli or distro package).
  • command -v mmdc — only required if any Mermaid sources exist; install via npm i -g @mermaid-js/mermaid-cli.
  • command -v d2 — only required if any D2 sources exist.

Notes

  • Don't auto-rebuild every doc in the project — this skill compiles one file. For batch-compiling everything in a project, the user can loop in shell or use bundle-binder (which compiles its inputs as a side effect).
  • If typst compile fails, surface the error verbatim — Typst's error messages are good and the user needs to see them.
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. 8d ago First seen · 52 lines · 85 tokens per session scan A 9b4680d4371d

Subscribe to this mod's changes

compile is a skill published in the GitHub repository danielrosehill/Claude-SOP-Writer-Plugin (3 stars, last pushed 4mo ago), licensed MIT. It adds 85 tokens to every session and 539 once invoked, about $0.0004 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.