markdown-to-document
FreeRuns bundled scriptsNot checked**WORKFLOW SKILL** — Generate formatted documents from Markdown or structured content. USE FOR: creating PowerPoint presentations, Word documents, Excel…
by gabrielmoreira★ 23 GitHub starsAbout this skill
Markdown to Document — Agent Guide
You are helping a developer generate formatted documents from Markdown content, structured JSON data, or chat context. The output can be PowerPoint, Word, Excel, MS Project (MSPDI), or PDF. Templates are the preferred approach for polished output — ask the user for one before generating from scratch.
Installation
All generation scripts include dependency checks — if a required package is missing, the script auto-installs it in non-interactive environments (LLM agents, CI). In interactive terminals, the user is prompted for confirmation.
| Format | Package | Install |
|---|---|---|
| PowerPoint (.pptx) | python-pptx | pip install python-pptx |
| Word (.docx) | docxtpl | pip install docxtpl |
| Excel (.xlsx) | openpyxl | pip install openpyxl |
| PDF (.pdf) | xhtml2pdf + markdown | pip install xhtml2pdf markdown |
| PDF (.pdf) — optional engines | fpdf2, weasyprint | pip install fpdf2 / pip install weasyprint |
| MS Project (.mspdi) | mpxj | pip install mpxj (requires Java 11+) |
Quick Install (all dependencies)
pip install python-pptx docxtpl openpyxl xhtml2pdf markdown fpdf2 mpxj jpype1
Note: All generation scripts overwrite existing output files without warning.
Fallback: Pandoc (universal converter)
Pandoc supports PPTX, DOCX, and PDF generation from Markdown with --reference-doc for templates.
# Windows
choco install pandoc
# Linux
apt install pandoc
# macOS
brew install pandoc
Standalone Scripts
This skill includes ready-to-run Python scripts in the scripts/ directory.
⚠️ IMPORTANT: Treat scripts as black boxes. Run
python scripts/<script>.py --helpto learn usage. Do NOT read the source code of these scripts — it will pollute your context window with implementation details you don't need. The scripts are designed to be used via their CLI interface only.
When the user needs document generation, execute these directly via run_in_terminal instead of generating code from scratch.
| Script | Purpose | Quick Usage |
|---|---|---|
generate_pptx.py |
JSON/MD → PowerPoint | python scripts/generate_pptx.py input.json -t template.pptx -o output.pptx |
generate_docx.py |
JSON/MD → Word | python scripts/generate_docx.py input.json -t template.docx -o output.docx |
generate_xlsx.py |
JSON/MD → Excel | python scripts/generate_xlsx.py input.json -o output.xlsx |
generate_project.py |
JSON → MSPDI XML | python scripts/generate_project.py input.json -o output.xml |
generate_project.py (inject) |
Inject into MSPDI | python scripts/generate_project.py input.json -t template.xml -o output.xml --mode inject |
validate_project.py |
Validate MSPDI XML | python scripts/validate_project.py output.xml (no Java required) |
generate_pdf.py |
MD/HTML → PDF | python scripts/generate_pdf.py input.md -o output.pdf --css style.css |
analyze_template.py |
Extract style profile | python scripts/analyze_template.py input.pptx -o profile.json (also .docx, .xlsx, .mpp, .mspdi, .mpx, .xml) |
runtime_resolver.py |
Check runtime deps | python scripts/runtime_resolver.py java --min-version 11 |
audit_overflow.py |
Detect text overflow risks | python scripts/audit_overflow.py output.pptx |
check_placeholders.py |
Detect leftover placeholders | python scripts/check_placeholders.py output.pptx --strict |
All scripts accept --help for full usage. Paths are passed as parameters — never hardcoded.
Working directory: Run scripts from any directory using absolute paths, or from the skill's root directory using relative paths.
Format → Tool Mapping
| Format | Extensions | Primary Tool | Fallback | Template Support |
|---|---|---|---|---|
| PowerPoint | .pptx | python-pptx | pandoc --reference-doc |
Yes — placeholder injection |
| Word | .docx | docxtpl | pandoc --reference-doc |
Yes — Jinja2 tags |
| Excel | .xlsx | openpyxl | XlsxWriter (from scratch) | Yes — load_workbook |
| xhtml2pdf | fpdf2, WeasyPrint, pandoc | Yes — CSS/HTML templates | ||
| MS Project | .mspdi (.xml) | MPXJ + Java | — | No — programmatic only |
⚠ MS Project trade-off: The
.mppformat is proprietary — no open-source library can write it directly. This skill generates MSPDI XML, which is the official MS Project interchange format. MS Project opens MSPDI natively with full fidelity (tasks, predecessors, resources, assignments). The user simply opens the.xmlin Project and can save as.mpp. Always inform the user about this when generating project files.
The Template Workflow
This is the core decision flow. Follow it for every document generation request.
User request arrives
│
├─ User provides EXAMPLE document (not a template)?
│ └─ YES → Run analyze_template.py to extract style profile
│ → Use profile to guide generation (fonts, co
Install markdown-to-document in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
FAQ
What does the markdown-to-document skill do?
**WORKFLOW SKILL** — Generate formatted documents from Markdown or structured content. USE FOR: creating PowerPoint presentations, Word documents, Excel spreadsheets, MS Project files, PDFs from Markdown/JSON/chat context using templates. DO NOT USE FOR: converting documents TO Markdown (use doc-to-markdown), general file I/O, web scraping.
How do I install the markdown-to-document skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the markdown-to-document skill run scripts?
Yes, this skill bundles executable scripts. Review the source before installing.
Related skills
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
by AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
by Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
by Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
by Anthropic