Skip to content

Extracts Mermaid diagrams from markdown and renders them as validated, size-adjusted PNG images.

CCM score
61 of 100
skills.sh installs
1.5K
GitHub stars
1.6K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the full pipeline: extracting code blocks, numbering them in order, writing .mmd files, and rendering PNGs
  • Includes extract-and-generate.sh, extract_diagrams.py, and puppeteer-config.json, which must run from the scripts/ directory
  • Adjusts output dimensions by diagram name, with wide sizes for timeline, workflow, and sequence diagrams and large sizes for architecture diagrams
  • Designed for WSL2 environments where Chrome and mermaid-cli dependencies need manual setup and environment overrides like MERMAID_SCALE

Install

$ npx -y skills add daymade/claude-code-skills --skill mermaid-tools -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Mermaid Tools

Overview

This skill enables extraction of Mermaid diagrams from markdown files and generation of high-quality PNG images. The skill bundles all necessary scripts (extract-and-generate.sh, extract_diagrams.py, and puppeteer-config.json) in the scripts/ directory for portability and reliability.

Core Workflow

Standard Diagram Extraction and Generation

Extract Mermaid diagrams from a markdown file and generate PNG images using the bundled extract-and-generate.sh script:

cd "${CLAUDE_SKILL_DIR}/scripts"
./extract-and-generate.sh "<markdown_file>" "<output_directory>"

Parameters:

  • <markdown_file>: Path to the markdown file containing Mermaid diagrams
  • <output_directory>: (Optional) Directory for output files. Defaults to <markdown_file_directory>/diagrams

Example:

cd "${CLAUDE_SKILL_DIR}/scripts"
./extract-and-generate.sh "<markdown_file>" "<output_directory>"

What the Script Does

Details

Repository
github.com/daymade/claude-code-skills
Categories
Technical Documentation, Workflow Automation
First seen
Jun 3, 2026

More from daymade/claude-code-skills

All 50

Similar to Mermaid Tools

More Technical Documentation