mermaid tools

AI Community

Skill notes

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.

Standard Diagram Extraction and Generation

Extract Mermaid diagrams from a markdown file and generate PNG images using the bundled extract-and-generate.sh script: 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:

What the Script Does

Extracts all Mermaid code blocks from the markdown file Numbers them sequentially (01, 02, 03, etc.) in order of appearance Generates .mmd files for each diagram Creates high-resolution PNG images with smart sizing Validates all generated PNG files

Output Files

For each diagram, the script generates: 01-diagram-name.mmd - Extracted Mermaid code 01-diagram-name.png - High-resolution PNG image The numbering ensures diagrams maintain their order from the source document.

Custom Dimensions and Scaling

Override default dimensions using environment variables: Available variables: MERMAID_WIDTH (default: 1200) - Base width in pixels MERMAID_HEIGHT (default: 800) - Base height in pixels MERMAID_SCALE (default: 2) - Scale factor for high-resolution output

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
AI
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
88 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@daymade · no license declared
Token usage
Lean
Setup complexity
Plug-and-play
External API key
Not required
Operating systems
Unspecified (assume cross-platform)
Runtime requirements
Python
Detected file/system behavior
  • Read-only
  • Write / modify
  • Env read
Network behavior
Local-only
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

Output preview mermaid-tools.preview
# High-Resolution Output for Presentations

cd "${CLAUDE_SKILL_DIR}/scripts"
MERMAID_WIDTH=2400 MERMAID_HEIGHT=1800 MERMAID_SCALE=4 ./extract-and-generate.sh "<markdown_file>" "<output_directory>"

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.