Install
openclaw skills install @harrylabsj/doc-weaverTransform Markdown or outlines into polished Word/PDF documents with professional templates
openclaw skills install @harrylabsj/doc-weaverConvert Markdown documents or structured outlines into publication-ready Word (.docx) or PDF documents using built-in professional templates.
# 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
.docx via python-docx (native Word formatting); .pdf via pandoc + weasyprint.| 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 |
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".
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.
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
| 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 |
Cloud-native adoption grew 47% YoY according to CNCF 2025 survey.
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.
pip install python-docx) — for .docx generationbrew install pandoc) — for .pdf generationpip install weasyprint) — PDF engine for pandocRun 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.
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.