From programmatic-doc-generation
Take an existing document sample (PDF/image/Word) — typically an invoice, receipt, statement, or business letter — and convert it into a Typst template plus a JSON schema describing its variable fields. Use when the user says they have an example document they want to "templatise", "convert to Typst", "extract a schema from", or use as the basis for programmatic generation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/programmatic-doc-generation:ingest-document-sampleThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Convert a sample billing/business document into a reusable parameterised template.
Convert a sample billing/business document into a reusable parameterised template.
Auto-trigger when the user provides or references a sample document (PDF, image, DOCX) and wants to:
pandoc <file.docx> -o <out.md> or unzip + parse), then read.Walk the document and label each region:
brand.json, not from the per-document data.from: {...}, to: {...}).items: [{description, qty, unit_price, total}, ...]).Write schema.json (JSON Schema draft-07) describing every variable field, with types, descriptions, and which are required.
Write template.typ that:
data.json.#for loops for repeating rows.Write data.example.json matching the schema, populated from the values actually in the sample (so the user can immediately render and visually compare to the original).
Run typst compile template.typ sample-rendered.pdf against the example data. Show the user both the original and the rendered version side-by-side (or at least describe the diff if visual comparison isn't available).
<output-dir>/
├── template.typ
├── schema.json
├── data.example.json
├── sample-rendered.pdf # produced by the round-trip step
└── README.md # what each schema field maps to
<output-dir> is user-chosen — suggest ~/Documents/doc-templates/<doc-type>/ or a path under their existing repo.
Templates and schemas live where the user wants them — never under the plugin install dir. The plugin may cache the most recent ingestion under $CLAUDE_USER_DATA_ROOT/cache/last-ingest/ for reference, but this is regenerable.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub danielrosehill/claude-code-plugins --plugin programmatic-doc-generation