markdown-to-word-mermaid

Installation
SKILL.md

Markdown to Word with Mermaid

Export technical documents without manually replacing Mermaid fences with screenshots. The bundled converter renders each diagram locally, embeds the SVG through Office OOXML relationships, and retains a 3x PNG fallback. Word is not required to generate the file; an SVG-capable Word version is needed to inspect vector rendering.

When to use

  • A design document, runbook, or report contains Mermaid code fences and must be delivered as DOCX.
  • Diagram labels must remain sharp when zoomed or printed.
  • A tall diagram needs page-aware placement rather than being split across pages.

For general Markdown-to-DOCX conversion with existing PNG images, a general converter such as md-to-docx may be simpler. This skill focuses on rendering and packaging Mermaid diagrams. SVG embedding does not create editable Word shapes, connectors, or text boxes.

Requirements and setup

  • Python 3.10+ and the packages in scripts/requirements.txt.
  • Node.js compatible with the chosen Mermaid CLI release, plus @mermaid-js/mermaid-cli.
  • A local browser usable by Puppeteer and an installed font covering the document's characters.
  • Default font: Noto Sans JP. Use --font-family to select another installed family.
Installs
1
GitHub Stars
40.5K
First Seen
2 days ago