mermaid

Create, validate, and render Mermaid diagrams from natural language or code analysis.

Updated Jul 31, 2026
One-click install
npx skills add https://github.com/Rasslonely/NexusXRP --skill mermaid-rasslonely
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mermaid
Source: https://github.com/Rasslonely/NexusXRP/tree/main/.agents/skills/mermaid
Command: npx skills add https://github.com/Rasslonely/NexusXRP --skill mermaid-rasslonely

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires mermaid-cli, and includes references (resource) components.

What problem does it solve? Writing Mermaid diagram syntax by hand is error-prone, and broken diagrams fail silently in documentation. This Skill generates syntactically correct Mermaid code, validates it with the mermaid-cli, auto-fixes errors, and renders output files on request. ## Core Features & Use Cases - Diagram Generation: Produces Mermaid code for 20+ diagram types including flowcharts, sequence diagrams, class diagrams, ER diagrams, Gantt charts, C4 architecture, and state diagrams. - Validation & Auto-Correction: Runs mmdc validation on every diagram and iteratively fixes syntax errors until the diagram compiles. - Code-to-Diagram Analysis: Converts source code structure into class, sequence, flowchart, or state diagrams by extracting entities, relationships, and control flow. - Use Case: Ask for a sequence diagram of your OAuth login flow; the Skill writes the .mmd file, validates it with mermaid-cli, fixes any errors, and renders an SVG preview. ## Quick Start Create a Mermaid sequence diagram showing the user authentication flow and save it as an SVG file.

Frequently Asked Questions about mermaid

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Mermaid diagram from a text description?

Describe the diagram type and content you need, such as a flowchart of a login process. The Skill generates the Mermaid code, saves it as a .mmd file, validates it with mmdc, and fixes any syntax errors automatically.

How to generate a class diagram from existing source code?

Provide the code to analyze and request a class diagram. The Skill extracts classes, methods, properties, inheritance, and interface relationships, then produces validated Mermaid classDiagram syntax representing the code structure.

What diagram types does Mermaid support?

This Skill covers flowcharts, sequence, class, state, ER, Gantt, user journey, timeline, kanban, pie, XY chart, quadrant, sankey, radar, treemap, git graph, C4, requirement, architecture, block, packet, mindmap, and ZenUML diagrams.

Why does my Mermaid diagram fail to render?

Common causes include unquoted labels containing spaces, incorrect arrow syntax, malformed node definitions, or invalid keywords. The Skill runs mmdc validation, reads the error message and line number, applies the fix, and re-validates until it succeeds.

Can I render Mermaid diagrams to PNG or PDF instead of SVG?

Yes. SVG is the default output format, but running mmdc with the -o flag targeting a .png or .pdf filename produces those formats. Rendering only occurs when you explicitly request a preview image.