Doc Weaver

Prompts

Transform Markdown or outlines into polished Word/PDF documents with professional templates

Install

openclaw skills install doc-weaver

Doc Weaver

Convert Markdown documents or structured outlines into publication-ready Word (.docx) or PDF documents using built-in professional templates.

Workflow

  1. Parse input — Read headings, lists, code blocks, tables, and blockquotes from Markdown.
  2. Auto-detect type — Identify document purpose from structure: PRD, report, thesis, manual, or contract.
  3. Load template — Apply a matching template (10+ built-in) with covers, heading fonts, color schemes, and page styles.
  4. Auto-number headings — Multi-level heading numbering (1, 1.1, 1.1.1) with configurable starting level.
  5. Table of contents — Generate TOC from heading hierarchy with clickable page references.
  6. Format tables — Apply borders, auto-width columns, style header rows, alternating row shading.
  7. Special elements — Code blocks → monospace + shaded background; blockquotes → indented + gray sidebar; images → inline with captions.
  8. Headers & footers — Title, page numbers (X of Y), date, and document path.
  9. Export — Write .docx (direct) or .pdf (via pandoc/md-to-pdf).

Sample Prompts

  • doc-weaver generate --input prd.md --template prd --output prd.docx
  • doc-weaver generate --input thesis.md --template academic --output thesis.pdf
  • doc-weaver preview --template report --show-templates
  • doc-weaver batch --inputs *.md --template manual --outdir ./output

Safety

  • All input stays local; no data is sent to external conversion services.
  • Template engine supports custom CSS for PDF styling when using --pdf-engine pandoc.
  • Requires pandoc and/or python-docx installed for PDF output.