Convert supported documents into Markdown for agent-side reading, with local output and optional image-preserving packages.
Documents
Doc Weaver
Try itTransform Markdown or outlines into polished Word/PDF documents with professional templates
What it does
Transform Markdown or outlines into polished Word/PDF documents with professional templates
The skill document
Doc Weaver
Convert Markdown documents or structured outlines into publication-ready Word (.docx) or PDF documents using built-in professional templates.
Quick Start
# Generate a Word document from Markdown
python3 scripts/weaver.py --input doc.md --template prd --output output.docx
# Generate a PDF
python3 scripts/weaver.py --input doc.md --template report --output output.pdf
# Auto-detect the best template
python3 scripts/weaver.py --input doc.md --output output.docx
# List all available templates
python3 scripts/weaver.py --show-templates
# Check local conversion dependencies
python3 scripts/weaver.py --doctor
# Preview without generating a file
python3 scripts/weaver.py --input doc.md --template proposal --preview
# Run release verification against bundled examples
python3 scripts/verify.py
Workflow
- Parse input — Read headings, lists, code blocks, tables, and blockquotes from Markdown.
- Auto-detect type — Identify document purpose from structure: PRD, proposal, resume, whitepaper, and more (10 types).
- Load template — Apply a matching template with covers, heading fonts, color schemes, and page styles.
- Auto-number headings — Multi-level heading numbering (1, 1.1, 1.1.1) with configurable starting level.
- Table of contents — Generate TOC field from heading hierarchy (clickable in Word, update field to populate).
- Format tables — Apply borders, styled header rows (white text on primary color), alternating row shading.
- Special elements — Code blocks → monospace (Courier New) + grey background; blockquotes → indented + left grey border; inline code → highlighted.
- Headers & footers — Running title in header; page numbers (Page X of Y) + date in footer.
- Export —
.docxvia python-docx (native Word formatting);.pdfvia pandoc + weasyprint.
Built-in Templates (10)
| Key | Name | Cover | Heading Font | Primary |
|---|---|---|---|---|
prd | Product Requirements Doc | Yes | Arial | #1a73e8 |
report | Report | Yes | Georgia | #333333 |
academic | Academic Paper | Yes | Times New Roman | #000000 |
manual | User Manual | Yes | Helvetica | #005a9e |
contract | Contract | Yes | Times New Roman | #000000 |
proposal | Business Proposal | Yes | Helvetica | #2d5f8a |
resume | Resume / CV | No | Calibri | #2c3e50 |
newsletter | Email Newsletter | Yes | Georgia | #c0392b |
meeting-minutes | Meeting Minutes | Yes | Arial | #27ae60 |
whitepaper | Technical Whitepaper | Yes | Times New Roman | #1a1a2e |
Real-world Examples
Example 1: Product Requirements Document
Scenario: You have a feature spec written in Markdown and need to share it as a professional Word document with stakeholders.
Input (prd.md):
# Chat Feature PRD
## Overview
Add real-time chat to the dashboard. Supports **1:1** and **group** conversations.
## User Stories
- As a user, I can send messages in real time
- As an admin, I can moderate chat rooms
## API Design
| Endpoint | Method | Description |
|----------------|--------|-------------------|
| /chat/send | POST | Send a message |
| /chat/history | GET | Get chat history |
> **Note:** WebSocket connections require authentication tokens.
## Timeline
1. Alpha: Week 1-2
2. Beta: Week 3-4
3. Launch: Week 5
Command:
python3 scripts/weaver.py -i prd.md -t prd -o ChatFeaturePRD.docx
Expected output: A Word document with cover page showing "1 Chat Feature PRD", table of contents, blue-themed headings, numbered structure (1.1 User Stories, 1.2 API Design), styled table with blue header, grey-background code block, and indented blockquote. Header shows "Chat Feature PRD", footer shows "Page X of Y | 2026-06-15".
Example 2: Meeting Minutes → PDF
Scenario: You took meeting notes in Markdown and need to distribute a polished PDF.
Input (minutes.md):
# Sprint Planning Meeting
## Attendees
- Alice (Product)
- Bob (Engineering)
- Charlie (Design)
## Agenda
1. Sprint goal review
2. Backlog grooming
3. Capacity planning
## Decisions
- **Sprint goal**: Ship user dashboard v2
- **Scope**: 8 story points for frontend, 5 for backend
## Action Items
- [ ] Alice: Finalize mockups by Wednesday
- [ ] Bob: Set up CI/CD pipeline
- [ ] Charlie: Design system audit
## Next Meeting
Friday, 3:00 PM — Sprint Review
Command:
python3 scripts/weaver.py -i minutes.md -t meeting-minutes -o SprintPlanning.pdf
Expected output: Both .docx and .pdf files. Green (#27ae60) theme with Arial fonts. Cover page with meeting title and date. Green-styled table headers, proper list formatting. PDF rendered with green headings and professional typography.
Example 3: Technical Whitepaper with Auto-Detection
Scenario: You drafted a technical whitepaper and want the system to auto-detect and format it.
Input (architecture.md):
# Cloud-Native Architecture Whitepaper
## Executive Summary
This whitepaper presents a **benchmark analysis** of cloud-native patterns.
## Architecture Overview
The solution architecture consists of three tiers:
```yaml
tiers:
- presentation: React SPA
- application: Python microservices
- data: PostgreSQL + Redis
Performance Benchmarks
| Pattern | P99 Latency | Throughput | Cost/Month |
|---|---|---|---|
| Monolith | 450ms | 1.2K rps | $1,200 |
| Microservices | 120ms | 8.5K rps | $3,800 |
| Serverless | 80ms | 12K rps | $2,100 |
Industry Analysis
Cloud-native adoption grew 47% YoY according to CNCF 2025 survey.
Conclusion
Serverless offers the best latency/cost ratio for variable workloads.
**Command:**
```bash
python3 scripts/weaver.py -i architecture.md -t auto -o Whitepaper.docx
# Output: [doc-weaver] Auto-detected document type: whitepaper (Technical Whitepaper)
Expected output: System auto-detects whitepaper type. Dark navy (#1a1a2e) theme with Times New Roman. Cover page with "1 Cloud-Native Architecture Whitepaper". Properly numbered sections (1.1 Architecture Overview, 1.2 Performance Benchmarks), YAML code block with grey background, styled table with dark header row and alternating row shading.
Requirements
- python-docx (
pip install python-docx) — for .docx generation - pandoc (
brew install pandoc) — for .pdf generation - weasyprint (
pip install weasyprint) — PDF engine for pandoc
Run python3 scripts/weaver.py --doctor before using PDF output. If PDF
dependencies are missing, .docx generation can still work as long as
python-docx is installed.
Verification
Before publishing or sharing a new package version, run:
python3 -m py_compile scripts/weaver.py scripts/verify.py
python3 scripts/weaver.py --doctor
python3 scripts/verify.py
The verification script renders a preview, generates a sample Word document, and generates a sample PDF when the optional PDF toolchain is available.
Safety
- All input stays local; no data is sent to external conversion services.
- Template engine uses built-in dictionaries; no external CSS files required.
- PDF output uses local pandoc + weasyprint pipeline.
Related skills
doc to video, word to video, markdown to video, document to video — parse the document, outline, storyboard, voiceover, build, validate. Use when the user gives a Doc / Word / Markdown file and wants an explainer, report broadcast, or training video.
Convert a Markdown file or raw Markdown string into a polished Word DOCX document. Supports custom Word template files, includes built-in DOCX templates, and...
Beautify Word documents (.docx) using a professional general template. Trigger when the user asks to: beautify/美化/排版/格式化 a Word document, apply a template/style to a .docx file, make a document look professional/clean/formatted, or clean up a document's formatting. Works by reading the source .docx,
Turn Word documents into polished PDFs.
Convert Word (.doc, .docx), PowerPoint (.ppt, .pptx), Excel (.xls, .xlsx), OpenDocument (.odt, .ods, .odp), RTF, EPUB, CSV, and PDF files to GitHub-Flavored Markdown. Use when a task needs the contents of an office document, spreadsheet, presentation, ebook, or PDF you cannot read directly.