mermaid-tools

Extract Mermaid diagram code blocks from markdown files and render them as PNG images.

Updated Jul 6, 2026
One-click install
npx skills add https://github.com/shirulot/codex-skill --skill mermaid-tools-shirulot
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mermaid-tools
Source: https://github.com/shirulot/codex-skill/tree/main/mermaid-tools
Command: npx skills add https://github.com/shirulot/codex-skill --skill mermaid-tools-shirulot

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires mermaid-cli, google-chrome-stable, python3, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill solves the challenge of visualizing complex system architectures and workflows by automatically extracting Mermaid diagrams from markdown files and rendering them as high-quality, professional PNG images.

Core Features & Use Cases

  • Automated Extraction: Scans markdown files to identify and isolate Mermaid code blocks.
  • Smart Sizing: Automatically adjusts image dimensions based on diagram type, such as timelines, system architectures, or sequence flows.
  • High-Resolution Output: Generates print-quality PNGs with configurable scaling factors for presentations or documentation.

Quick Start

Run the extract and generate script from the scripts directory providing the path to your markdown file to create diagrams in a new output folder.

Frequently Asked Questions about mermaid-tools

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

FAQPage Schema
How do I convert markdown Mermaid diagrams into PNG images?

To convert markdown Mermaid diagrams into PNG images, this skill extracts Mermaid code blocks from markdown files and renders them into high-resolution PNGs using headless Chrome. It supports automated documentation workflows by automatically scanning and isolating diagram code for visualization.

Do I need Google Chrome and Python 3 to render Mermaid diagrams from markdown?

Yes, you need Google Chrome, Python 3, and mermaid-cli installed to render Mermaid diagrams from markdown. These dependencies manage the headless Chrome execution and dependency resolution required to generate high-resolution PNG outputs.

What is the best way to automate architectural diagram generation for technical documentation?

Automating architectural diagram generation is best handled by extracting Mermaid diagram code from markdown documentation and rendering it into print-quality PNGs. This skill automatically adjusts image dimensions based on diagram type, such as system architectures or sequence flows, for technical design visualization.

Can I automatically adjust image dimensions when extracting Mermaid diagrams from markdown?

Yes, you can automatically adjust image dimensions when extracting Mermaid diagrams from markdown. The skill features smart sizing that automatically configures output dimensions based on the specific diagram type, including timelines, system architectures, and sequence flows.

Does this tool support configurable scaling factors for high-resolution Mermaid PNG output?

Yes, it supports configurable scaling factors for high-resolution Mermaid PNG output. This allows you to generate print-quality images suitable for presentations or technical documentation directly from your extracted markdown diagram code blocks.