Install
openclaw skills install mermaid-image-exportMermaid diagram image export using mermaid-cli. When Claude needs to export Mermaid diagrams as high-quality images (PNG, SVG, PDF) for documentation, presentations, print materials, or web embedding. Uses mermaid-cli with Puppeteer-based rendering for pixel-perfect outputs.
openclaw skills install mermaid-image-exportProfessional image export skill for Mermaid diagrams using mermaid-cli. Converts Mermaid code into high-quality PNG, SVG, and PDF images suitable for documentation, presentations, and print materials.
# Check if Node.js is installed
node --version
# Check if npm is installed
npm --version
python scripts/install_mermaid_cli.py --check
Export a Mermaid diagram to PNG:
python scripts/export_mermaid_image.py diagram.mmd -o output.png
Export to SVG:
python scripts/export_mermaid_image.py diagram.mmd -f svg -o diagram.svg
Batch export multiple files:
python scripts/export_mermaid_image.py *.mmd -d outputs/
--scale)--background)--width, --height)--css)default, forest, dark, neutral--config)Ensure Node.js and mermaid-cli are installed:
npm install -g @mermaid-js/mermaid-cli
Create Mermaid diagrams using standard syntax.
Use appropriate format based on needs:
Embed exported images in:
| Feature | Termaid | Mermaid-CLI Export |
|---|---|---|
| Output | ASCII terminal | PNG/SVG/PDF images |
| Dependencies | Pure Python | Node.js + Puppeteer |
| Use Case | Terminal preview | Professional export |
| Quality | Terminal-friendly | Print-ready |
| Speed | Instant | Requires browser |
# Custom CSS
python scripts/export_mermaid_image.py diagram.mmd --css custom.css -o output.png
# Specific theme
python scripts/export_mermaid_image.py diagram.mmd -t dark -o output.png
# High resolution
python scripts/export_mermaid_image.py diagram.mmd --scale 2.0 -o output.png
# CI/CD integration
python scripts/export_mermaid_image.py docs/*.mmd -d generated/
# Documentation generation
find . -name "*.mmd" -exec python scripts/export_mermaid_image.py {} -o images/{}.png \;
npm install -g @mermaid-js/mermaid-cliSee assets/examples/ for complete examples:
Complete documentation in references/:
overview.md: Skill overviewinstallation.md: Installation guideusage.md: Usage instructionsformats.md: Format specificationstroubleshooting.md: Problem solvingNote: This skill requires Node.js and mermaid-cli installation. For terminal-only rendering without dependencies, use the termaid skill.