A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
Mermaid diagrams (.mmd) from natural language with validation loop. 11+ types, multi-backend (mmdc / Kroki), PNG/SVG/PDF
English · 中文 · 📖 Online Docs
A skill that turns natural-language requests into .mmd source, validates syntax before export, and renders to PNG / SVG / PDF via the mmdc CLI or the Kroki HTTP API. Works with Claude Code, Cursor, Copilot, OpenClaw, Codex, Hermes, and any agent compatible with the Agent Skills format.
.mmd is parsed before export, so broken syntax never leaks into a PNGmmdc for best quality, Kroki HTTP API as zero-install fallback (only curl required).mmd is plain text, diffs cleanly in PRs, and embeds directly in GitHub / GitLab READMEsnpx installer needs Node, the skill itself does not)[!TIP] The hero image above was generated from this single prompt:
Create a microservices e-commerce architecture with Mobile/Web clients,
API Gateway, User/Order/Product/Payment services, and User DB / Order DB /
Product DB / Redis Cache
Mermaid auto-lays-out 11+ types — each of these was generated from a one-line prompt and run through the validate → export → self-check pipeline:
![]() Sequence · auth flow | ![]() Class · domain model | ![]() State · order lifecycle |
![]() ER · e-commerce schema | ![]() Gantt · launch plan | ![]() Git graph · branch strategy |
Full feature matrix in docs/features.md. Source .mmd files for the hero, workflow, and gallery images live alongside their PNGs in assets/ (example-{sequence,class,state,er,gantt,gitgraph}.mmd).
| Option | Command | When to use |
|---|---|---|
A — Local mmdc | npm install -g @mermaid-js/mermaid-cli && mmdc --version | Best quality, full theme control, offline use |
| B — Kroki API | curl --version | No install, no Node, CI/CD pipelines |
The skill probes mmdc first and falls back to Kroki automatically.
# Any agent (Claude Code, Cursor, Copilot, ...)
npx skills add Agents365-ai/365-skills -g
# Claude Code plugin marketplace
> /plugin marketplace add Agents365-ai/365-skills
> /plugin install mermaid
# Manual install
git clone https://github.com/Agents365-ai/mermaid-skill.git \
~/.claude/skills/mermaid-skill
Also indexed on SkillsMP and ClawHub.
Updating: /plugin update mermaid (Claude Code), skills update mermaid-skill (SkillsMP), clawhub update mermaid-pro-skill (OpenClaw), or git pull for manual installs.
After installation, just describe what you want — e.g. a JWT auth sequence:
Create a sequence diagram for JWT login: Client posts credentials to API
Gateway, gateway calls Auth Service, Auth Service reads the User DB,
verifies the password hash, and returns a signed JWT back through the
gateway to the client. Show the failure path for an invalid password too.
The skill picks the diagram type, writes the .mmd source, validates with mmdc (or Kroki), exports to your chosen format, and reports the output paths.
| Type | Keyword | Use for |
|---|---|---|
| Flowchart | flowchart TD/LR | processes, pipelines, decision trees |
| Sequence | sequenceDiagram | API calls, auth flows, message passing |
| Class | classDiagram | OOP models, domain entities, inheritance |
| ER | erDiagram | database schemas, relationships |
| State | stateDiagram-v2 | state machines, lifecycles |
| Gantt | gantt | project timelines, sprint plans |
| Pie | pie | proportions, distributions |
| Git Graph | gitGraph | branch strategies, GitFlow |
| C4 Context | C4Context | high-level architecture |
| Mind Map | mindmap | topic breakdowns, brainstorms |
| Journey | journey | user journeys |
Per-type syntax references live in skills/mermaid-skill/reference/ and full feature matrix in docs/features.md.
Behind the scenes: check deps (mmdc or Kroki) → pick diagram type → write .mmd → validate syntax (fix & re-validate on error) → export PNG/SVG/PDF → vision self-check the render and auto-fix readability/layout defects (≤2 rounds) → review loop on your feedback (≤5 rounds) → report output paths. Walkthrough in docs/workflow.md.
| Feature | Native agent | mermaid-skill |
|---|---|---|
| Writes Mermaid syntax | ✅ inline | ✅ guided by examples + reference files |
| Validation before export | ❌ exports broken .mmd silently | ✅ required step, retries on error |
| Self-check after export | ❌ never looks at the render | ✅ vision reads the PNG, auto-fixes layout/readability (≤2 rounds) |
| Iterative review loop | ❌ manual re-prompt | ✅ targeted .mmd edits, 5-round safety valve |
| Export to PNG / SVG / PDF | ❌ manual, you run mmdc yourself | ✅ automatic, one of two backends |
| Zero-install fallback | ❌ | ✅ Kroki API needs only curl |
| Proactive triggering | ❌ only when explicitly asked | ✅ auto-triggers on 3+ components, API flows, state machines |
| Bilingual triggers | ❌ English only | ✅ English + Chinese keywords |
| Diagram-type guidance | generic | ✅ 11+ type table with copy-paste templates |
Good fit:
Reach for a sibling skill instead when you need:
Part of the Agents365-ai diagram-skill family — pick the right tool for the job:
| Skill | Style | Best for |
|---|---|---|
| drawio-skill | XML, manual layout control | Polished architecture diagrams, ML model figures |
| excalidraw-skill | Hand-drawn / sketchy | Whiteboard mockups, informal diagrams |
| plantuml-skill | UML-focused | Class / sequence diagrams in CI pipelines |
| tldraw-skill | Whiteboard collaboration | Casual sketches, FigJam-style boards |
If this skill helps you, consider supporting the author:
WeChat Pay |
Alipay |
Buy Me a Coffee |
Give a Reward |
Agents365-ai
Claude Code skill for YouTube creators — channel audits, video SEO, retention scripts, thumbnails, content strategy, Sho
AI image generation skill for Claude Code -- Creative Director powered by Gemini
Universal SEO skill for Claude Code. 25 sub-skills + 18 sub-agents covering technical SEO, E-E-A-T, schema, GEO/AEO, bac
Human + AI music production workflow for Suno - skills, templates, and tools