SOP-Writer

April 30, 2026 · View on GitHub

Project-scoped Claude Code plugin for authoring Standard Operating Procedures and decision flowcharts, compiling them to printable PDFs via Typst, and assembling them into multi-document binders.

The plugin operates on the current project directory — there is no global source of truth. Drop it into any documentation repo and the skills work on the files there.

Skills

SkillWhat it does
new-sopScaffold an SOP from a template (first-aid, emergency, household-procedure, troubleshooting-flow, recipe-method).
import-to-sopRestructure raw source material (URL, pasted text, PDF) into one of the SOP templates.
new-flowchartScaffold a Mermaid or D2 decision flowchart with a Typst wrapper for embedded SVG.
compileRender a single SOP or flowchart to PDF (typst compile plus mmdc/d2 for diagrams).
bundle-binderConcatenate a list of SOPs into one PDF binder with cover page, TOC, and page numbers. Configured via binders.yaml in the project.
bump-revisionUpdate revision date / version metadata across one or many docs and recompile.

Dependencies

Runtime tools the skills shell out to (install on the host):

  • typst — primary compiler
  • mmdc (Mermaid CLI, via npm i -g @mermaid-js/mermaid-cli) — for Mermaid flowcharts
  • d2 — for D2 flowcharts (optional, alternative to Mermaid)
  • qpdf or pdfunite (poppler-utils) — for binder concatenation

Installation

# Project scope (recommended — only enabled in the documentation repo you're working in)
claude plugins install sop-writer@danielrosehill --scope project

# Or user scope (always available)
claude plugins install sop-writer@danielrosehill

Project layout the plugin expects

The plugin doesn't enforce structure, but the skills work best when SOPs and flowcharts live in predictable folders inside your project:

your-doc-project/
├── sops/                  # SOP source (.typ)
├── flowcharts/            # Mermaid/D2 source + Typst wrapper
├── output/                # Compiled PDFs
├── binders.yaml           # Optional — defines bundles for bundle-binder
└── templates/             # Optional — local overrides for plugin templates

License

MIT