markdown-to-word-mermaid
Skill by github
Exports Markdown files with Mermaid code fences to Word (.docx) documents, embedding SVG diagrams with PNG fallbacks. It suits technical documents such as design documents, runbooks, and reports where diagram sharpness matters.
Install markdown-to-word-mermaid
Built from the published package, never by AI.
git clone --depth 1 https://github.com/github/awesome-copilot /tmp/awesome-copilot && mkdir -p ~/.claude/skills && cp -r /tmp/awesome-copilot/skills/markdown-to-word-mermaid ~/.claude/skills/markdown-to-word-mermaidRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install markdown-to-word-mermaid in Claude Code
git clone --depth 1 https://github.com/github/awesome-copilot /tmp/awesome-copilot && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/awesome-copilot/skills/markdown-to-word-mermaid ~/.gemini/antigravity-cli/skills/markdown-to-word-mermaidAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install markdown-to-word-mermaid in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill converts Markdown that contains Mermaid code fences into Word (.docx) files. The bundled converter renders each diagram locally with the Mermaid CLI, embeds the SVG through Office OOXML relationships, and keeps a 3x PNG fallback. Diagrams are centered, keep their aspect ratio, and are kept from splitting across pages. Diagrams that occupy most of the page body start on a new page, and oversized ones are scaled to fit.
The skill is aimed at people who deliver technical documents such as design documents, runbooks, and reports as DOCX. It is useful when diagram labels must stay sharp when zoomed or printed. It does not create editable Word shapes and does not convert Word files back to Markdown. Output is staged in a temporary directory, and existing output files are never overwritten.
Written from the project's SKILL.md and checked against it.
What it can do
- Mermaid renderingRenders each Mermaid fence locally to SVG and a 3x PNG using the Mermaid CLI.
- SVG embeddingEmbeds diagrams as SVG through Office OOXML relationships, with the PNG as the normal image fallback.
- Page-aware placementCenters diagrams, keeps their aspect ratio, and starts large diagrams on a new page.
- Font selectionApplies a chosen font to Word paragraph styles and Mermaid, defaulting to Noto Sans JP.
- Safe output handlingStages the DOCX in a temporary directory and stops rather than overwriting an existing file.
- Package verificationChecks that Mermaid fence count matches SVG parts and SVG image references in the DOCX.
- Frontmatter titleUses a simple single-line frontmatter title as the document title.
What you need
- Python 3.10 or later
- Node.js compatible with the chosen Mermaid CLI release
- A local browser usable by Puppeteer
- An installed font that covers the document's characters
Try asking
- Export design.md to design.docx with the Mermaid diagrams embedded as SVG.
- Convert this runbook with Mermaid fences to Word, using the Noto Sans JP font.
- Make a DOCX from report.md and check that every diagram has a PNG fallback.
Good to know
- Diagrams are not editable Word shapes, connectors, or text boxes.
- Fonts are not embedded, so unavailable fonts may be substituted.
- Word rendering and pagination must be checked in Word, which the skill does not automate.
- Large diagrams can have readability problems and should only be split with the user's approval.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/markdown-to-word-mermaid/SKILL.md, skills/markdown-to-word-mermaid/scripts/markdown_to_word.py, skills/markdown-to-word-mermaid/tests/test_markdown_to_word.py. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md8 KB -
assets/example.md1 KB -
references/publication.md2 KB -
scripts/markdown_to_word.py26 KB -
scripts/requirements.txt73 B
Show all 6 files
-
tests/test_markdown_to_word.py26 KB
Alternatives to markdown-to-word-mermaid
All alternatives →Creates importable JSON templates for the Obsidian Web Clipper. It is for users who want to clip a site, understand the available variables, or format clipped content.
Harness Creator builds, audits, and improves the instruction and state files that help AI coding agents stay reliable across sessions. It is for developers whose agents forget context, drift out of scope, or claim work is done too early.
Guides an assistant through extracting text from scanned PDFs, photographed pages, and images with OCR. Covers backends, language packs, force-OCR, and performance tuning.
Edits a named local file in place to remove AI-writing patterns, using minimal targeted changes and post-edit verification. Built for users who explicitly ask to clean, rewrite, or humanize that specific file.
Polishes, translates, or tightens existing academic manuscript prose while preserving facts, terminology, and evidence boundaries. Made for researchers revising drafts, including Chinese-to-English translation and LaTeX layout fixes.
Adds PDF form analysis and filling, table extraction, OCR, validation and batch processing to an AI assistant. Aimed at developers who run complex or high-volume PDF workflows.
Compare with obsidian-clipper-template-creator, harness-creator or xberg-extracting-with-ocr
markdown-to-word-mermaid: common questions
Does it need Microsoft Word installed?
Word is not required to generate the file. An SVG-capable Word version is needed to inspect the vector rendering.
Does it send diagrams to an external service?
The converter does not call an external rendering service or a separate AI API. Browser execution is not an offline sandbox, so untrusted diagram content should be reviewed first.
What happens if a Mermaid diagram is invalid?
The conversion stops with an error. The skill does not silently repair invalid Mermaid source.
How do I install markdown-to-word-mermaid?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is markdown-to-word-mermaid free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is markdown-to-word-mermaid safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to markdown-to-word-mermaid?
Similar skills: obsidian-clipper-template-creator, harness-creator, xberg-extracting-with-ocr, file-edit-in-place.
