mermaid-diagram
Skill by wecode-ai
Draws diagrams for AI assistants using Mermaid syntax. It validates each diagram before showing it, so users see flowcharts, charts and architecture views in chat.
Install mermaid-diagram
Built from the published package, never by AI.
git clone --depth 1 https://github.com/wecode-ai/Wegent /tmp/Wegent && mkdir -p ~/.claude/skills && cp -r /tmp/Wegent/backend/init_data/skills/mermaid-diagram ~/.claude/skills/mermaid-diagramRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/wecode-ai/Wegent /tmp/Wegent && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/Wegent/backend/init_data/skills/mermaid-diagram ~/.gemini/antigravity-cli/skills/mermaid-diagramAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The mermaid-diagram skill lets an AI assistant create diagrams with Mermaid syntax. It covers flowcharts, sequence, class, state and ER diagrams, Gantt charts, pie and XY charts, architecture and C4 diagrams, and several other types. Before showing a diagram, the assistant calls a render_mermaid tool to check the syntax, then outputs the mermaid code block in its reply.
If validation fails, the tool retries automatically up to three times with AI-based fixes. If every retry fails, the skill tells the assistant to explain the error and not output broken code. The read_mermaid_reference tool loads documentation for each diagram type. The skill is aimed at users who want visual diagrams in chat, such as process flows, system architectures, project schedules or data charts.
Written from the project's SKILL.md and checked against it.
What it can do
- render_mermaidValidates Mermaid code and returns errors or the code to output, with optional diagram type and title.
- read_mermaid_referenceReads the reference documentation for a given diagram type, passed as a filename such as flowchart.md.
- Flowcharts and sequence diagramsDraws process flows, decision trees, and interactions between participants.
- Charts and planning diagramsCovers pie, XY bar and line, radar, Sankey, treemap, Gantt, kanban and timeline views.
- Architecture diagramsSupports architecture, C4 context, block and packet diagrams.
Try asking
- Draw a flowchart of our customer support escalation process
- Make a Gantt chart for a three-month product launch plan
- Show the system architecture of a web app with a database as a diagram
Good to know
- Automatic retries are limited to three attempts before the assistant must report the error.
- Large diagrams are hard to render and should be split into smaller ones.
- Node IDs with Chinese or special characters can cause failures, so labels must be quoted.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: backend/init_data/skills/mermaid-diagram/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to mermaid-diagram
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
mermaid-diagram: common questions
What happens if a Mermaid diagram has a syntax error?
The render_mermaid tool returns the parser error and suggestions, and the assistant fixes the code and tries again. The tool also retries automatically up to three times.
Which diagram types does the skill support?
The source lists flowcharts, sequence, class, state, ER, user journey, Gantt, pie, quadrant, requirement, gitgraph, mindmap, timeline, Sankey, XY chart, block, packet, kanban, architecture, C4, radar, treemap and ZenUML.
Can Chinese text be used in diagram labels?
Yes, but the source says to wrap Chinese labels in quotes, such as A["用户"], and to use English alphanumeric characters for node IDs.
How do I install mermaid-diagram?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is mermaid-diagram free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is mermaid-diagram safe to use?
It scores 77 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to mermaid-diagram?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
