mermaid-tools

Extract Mermaid diagrams from markdown files and generate PNG images.

Updated Mar 3, 2026
One-click install
npx skills add https://github.com/abudhahir/projects-pkm --skill mermaid-tools-abudhahir
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mermaid-tools
Source: https://github.com/abudhahir/projects-pkm/tree/main/SKILLS/mermaid-tools
Command: npx skills add https://github.com/abudhahir/projects-pkm --skill mermaid-tools-abudhahir

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the conversion of Mermaid diagrams embedded in markdown files into high-quality PNG images, streamlining documentation and presentation workflows.

Core Features & Use Cases

  • Automated Diagram Extraction: Extracts all Mermaid code blocks from markdown files.
  • High-Resolution PNG Generation: Creates crisp, scalable PNG images using bundled scripts.
  • Smart Sizing: Automatically adjusts image dimensions based on diagram type (e.g., timelines, architectures).
  • Use Case: Convert a markdown document containing multiple architecture diagrams into a set of presentation-ready PNG files with a single command.

Quick Start

Use the mermaid-tools skill to convert all Mermaid diagrams in '/path/to/document.md' into PNG images in '/path/to/output'.

Frequently Asked Questions about mermaid-tools

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert Mermaid diagrams in a markdown file to PNG images?

To convert Mermaid diagrams to PNG images, this Skill extracts all Mermaid code blocks from markdown files and generates high-resolution PNGs using bundled shell and Python scripts with a single command.

What dependencies do I need to generate PNGs from Mermaid diagrams?

Generating PNGs from Mermaid diagrams requires mermaid-cli, Google Chrome, and Python 3 installed in your environment for executing the bundled scripts and rendering the images.

Can I automatically extract multiple Mermaid diagrams from markdown documentation?

Yes, this Skill automates diagram extraction by scanning markdown files for all Mermaid code blocks, extracting them sequentially with automatic numbering, and converting each into a separate PNG image.

Does Mermaid PNG generation support automatic sizing for different diagram types?

Yes, Mermaid PNG generation includes smart sizing that automatically adjusts image dimensions based on the specific diagram type, such as timelines or architecture diagrams, for optimal output quality.

What is the best way to automate turning markdown architecture diagrams into presentation-ready images?

The best way to automate markdown architecture diagram conversion is using this Skill to batch extract Mermaid blocks and generate high-quality, presentation-ready PNG files in a designated output directory.