markdown-to-document
БесплатноЗапускает вложенные скриптыНе проверен**WORKFLOW SKILL** — Generate formatted documents from Markdown or structured content. USE FOR: creating PowerPoint presentations, Word documents, Excel…
от gabrielmoreira★ 23 звезды на GitHubОб этом скилле
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
Установить markdown-to-document в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл markdown-to-document?
**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.
Как установить скилл markdown-to-document?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл markdown-to-document запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
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…
от 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…
от 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…
от 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…
от Anthropic