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.
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionmermaid-toolsExecute the skills CLI command in your project's root directory to begin installation:
Fetches mermaid-tools from daymade/claude-code-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate mermaid-tools. Access via /mermaid-tools in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
784
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
784
stars
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.
Extract Mermaid diagrams from a markdown file and generate PNG images using the bundled extract-and-generate.sh script:
cd ~/.claude/skills/mermaid-tools/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>/diagramsExample:
cd ~/.claude/skills/mermaid-tools/scripts
./extract-and-generate.sh "/path/to/document.md" "/path/to/output"
.mmd files for each diagramFor each diagram, the script generates:
01-diagram-name.mmd - Extracted Mermaid code01-diagram-name.png - High-resolution PNG imageThe numbering ensures diagrams maintain their order from the source document.
Override default dimensions using environment variables:
cd ~/.claude/skills/mermaid-tools/scripts
MERMAID_WIDTH=1600 MERMAID_HEIGHT=1200 ./extract-and-generate.sh "<markdown_file>" "<output_directory>"
Available variables:
MERMAID_WIDTH (default: 1200) - Base width in pixelsMERMAID_HEIGHT (default: 800) - Base height in pixelsMERMAID_SCALE (default: 2) - Scale factor for high-resolution outputcd ~/.claude/skills/mermaid-tools/scripts
MERMAID_WIDTH=2400 MERMAID_HEIGHT=1800 MERMAID_SCALE=4 ./extract-and-generate.sh "<markdown_file>" "<output_directory>"
cd ~/.claude/skills/mermaid-tools/scripts
MERMAID_SCALE=5 ./extract-and-generate.sh "<markdown_file>" "<output_directory>"
The script automatically adjusts dimensions based on diagram type (detected from filename):
Context-aware naming in the extraction process helps trigger appropriate smart sizing.
CRITICAL: Use the bundled extract-and-generate.sh script from this skill's scripts/ directory. All necessary dependencies are bundled together.
Run the script from its own directory to properly locate dependencies (extract_diagrams.py and puppeteer-config.json):
cd ~/.claude/skills/mermaid-tools/scripts
./extract-and-generate.sh "<markdown_file>" "<output_directory>"
Running the script without changing to the scripts directory first may fail due to missing dependencies.
Before running the script, verify dependencies are installed:
mmdc --versiongoogle-chrome-stable --versionpython3 --versionIf any are missing, consult references/setup_and_troubleshooting.md for installation instructions.
For detailed troubleshooting guidance, refer to references/setup_and_troubleshooting.md, which covers:
Quick fixes for common issues:
Permission denied:
chmod +x ~/.claude/skills/mermaid-tools/scripts/extract-and-generate.sh
Low quality output:
MERMAID_SCALE=3 ./extract-and-generate.sh "<markdown_file>" "<output_directory>"
Chrome/Puppeteer errors: Verify all WSL2 dependencies are installed (see references for full list).
This skill bundles all necessary scripts for Mermaid diagram generation:
All scripts must be run from the scripts/ directory to properly locate dependencies.
Comprehensive reference documentation including:
Load this reference when dealing with setup issues, installation problems, or advanced customization needs.
Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
daymade/claude-code-skills
daymade/claude-code-skills
intellectronica/agent-skills
gmh5225/awesome-game-security
davila7/claude-code-templates
am-will/codex-skills
I recommend mermaid-tools for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
We added mermaid-tools from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
Solid pick for teams standardizing on skills: mermaid-tools is focused, and the summary matches what you get after install.
Keeps context tight: mermaid-tools is the kind of skill you can hand to a new teammate without a long onboarding doc.
Registry listing for mermaid-tools matched our evaluation — installs cleanly and behaves as described in the markdown.
mermaid-tools fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
mermaid-tools has been reliable in day-to-day use. Documentation quality is above average for community skills.
mermaid-tools reduced setup friction for our internal harness; good balance of opinion and flexibility.
mermaid-tools fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
mermaid-tools is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
showing 1-10 of 52