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-code

Installs 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

  1. Analyze user description to determine the most suitable diagram type
  2. Read the corresponding syntax reference documentation (see Step 2 below)
  3. 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
  4. Identify all components, connections, and data flow
  5. 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
1wanshuiyin avatarresult-to-claimwanshuiyin/auto-claude-code-research-in-sleepUse when experiments complete to judge what claims the results support, what they don't, and what evidence is still missing. Codex MCP evaluates results against537skills.sh installs
2wanshuiyin avatarrebuttalwanshuiyin/auto-claude-code-research-in-sleepWorkflow 4: Submission rebuttal pipeline. Parses external reviews, enforces coverage and grounding, drafts a safe text-only rebuttal under venue limits, and man532skills.sh installs
3wanshuiyin avatarexperiment-bridgewanshuiyin/auto-claude-code-research-in-sleepWorkflow 1.5: Bridge between idea discovery and auto review. Reads EXPERIMENT_PLAN.md, implements experiment code, deploys to GPU, collects initial results. Use531skills.sh installs
4wanshuiyin avatarpaper-posterwanshuiyin/auto-claude-code-research-in-sleepDEPRECATED — superseded by /paper-poster-html. Kept only as a redirect for muscle memory; do not use for new posters.528skills.sh installs
5wanshuiyin avatarauto-review-loop-llmwanshuiyin/auto-claude-code-research-in-sleepAutonomous research review loop using any OpenAI-compatible LLM API. Configure via llm-chat MCP server or environment variables. Trigger with "auto review loop 525skills.sh installs
6wanshuiyin avatarauto-review-loop-minimaxwanshuiyin/auto-claude-code-research-in-sleepAutonomous multi-round research review loop using MiniMax API. Use when you want to use MiniMax instead of Codex MCP for external review. Trigger with "auto rev519skills.sh installs