
Mermaid Diagram
This generates Mermaid diagrams from natural language descriptions, supporting 20+ diagram types from flowcharts to ER diagrams to Gantt charts. What's smart here is the verification loop: it actually renders the diagram with the Mermaid CLI, reads the PNG output, and does a strict visual review checking that arrows point to the right targets and blocks contain the right labels. If something's off, it fixes and re-renders up to three times. You get three files out: the raw .mmd source, a markdown wrapper for GitHub previews, and a rendered PNG. The workflow is thorough, maybe even rigid, but that's the point when you need diagrams that are actually correct instead of plausible looking.
- skills.sh installs
- 537
- GitHub stars
- 18.9K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add wanshuiyin/auto-claude-code-research-in-sleep --skill mermaid-diagram --agent claude-codeInstalls into .claude/skills of the current project.
Files
Mermaid Diagram Generator
Generate high-quality Mermaid diagram code based on user requirements, with file output and verification.
Constants
- OUTPUT_DIR =
figures/— Output directory for all generated files - MAX_ITERATIONS = 3 — Maximum refinement rounds for syntax errors
Workflow: MUST EXECUTE ALL STEPS
Step 0: Pre-flight Check
# Create output directory
mkdir -p figures
Step 1: Understand Requirements & Select Diagram Type
Parse the input: $ARGUMENTS
- Analyze user description to determine the most suitable diagram type
- Read the corresponding syntax reference documentation (see Step 2 below)
- If the diagram involves mathematical notation (formulas, equations, Greek letters, subscripts, superscripts, fractions, matrices, etc.), apply the math syntax rules from the Math Formulas in Diagrams section below
- Identify all components, connections, and data flow
- Plan the diagram structure
Step 2: Read Documentation
Select the appropriate diagram type based on the use case. Use your built-in knowledge of Mermaid syntax, or fetch up-to-date docs via the context7 MCP server if needed.
Sponsors
Details
- Repository
- github.com/wanshuiyin/auto-claude-code-research-in-sleep
- Categories
- Data Science & ML, Sales & Marketing
- First seen
- Jun 3, 2026
More from wanshuiyin/auto-claude-code-research-in-sleep
All 41- Result To Claim537
- Research Refine Pipeline533
- Rebuttal532
- Experiment Bridge531
- Idea Discovery Robot530
- Paper Poster528
- Auto Review Loop Llm525
- Auto Review Loop Minimax519
- Dse Loop519
- Feishu Notify517
- Training Check512
- System Profile503
- Comm Lit Review Claude Single200
- Semantic Scholar670
- Paper Figure657
- Research Lit651
- Idea Discovery613
- Idea Creator609
- Auto Review Loop602
- Arxiv601
- Paper Writing595
- Research Review595
- Research Pipeline594
- Grant Proposal590