askill
mermaid-syntax

mermaid-syntaxSafety 100Repository

Authoritative reference for Mermaid diagram syntax. Provides diagram types, syntax patterns, examples, and platform integration guidance for generating accurate Mermaid diagrams.

26 stars
1.2k downloads
Updated 1/19/2026

Package Files

Loading files...
SKILL.md

Mermaid Syntax Reference

Overview

Mermaid is a JavaScript-based diagramming tool that renders diagrams from Markdown-inspired text definitions. Diagrams render as SVG directly in browsers and are natively supported by GitHub, GitLab, Azure DevOps, Obsidian, and Notion.

Key advantages:

  • Zero setup (browser-based rendering)
  • Native Markdown integration (diagrams auto-sync with definitions)
  • Simpler syntax than PlantUML
  • No external dependencies

Limitations:

  • Less customization than PlantUML
  • C4 support is experimental
  • No MindMap or JSON visualization

Diagram Types Quick Reference

TypeKeywordBest For
Flowchartflowchart or graphProcess flows, decision trees, workflows
SequencesequenceDiagramAPI calls, request/response flows
ClassclassDiagramOOP structures, inheritance, relationships
StatestateDiagram-v2State machines, lifecycle states
ERerDiagramDatabase schemas, entity relationships
GanttganttProject timelines, schedules
PiepieDistribution, proportions
Git GraphgitGraphBranching strategies, commit history
C4 ContextC4ContextSystem architecture (experimental)
TimelinetimelineChronological events

Markdown Integration

Mermaid diagrams are embedded in Markdown using fenced code blocks:

```mermaid
flowchart TD
    A[Start] --> B[End]
```

Platform support:

  • GitHub: Native rendering in README, issues, PRs, wikis
  • GitLab: Native rendering in Markdown files
  • Azure DevOps: Native rendering in wikis and repos
  • Obsidian: Native with core plugin
  • VS Code: With Markdown Preview Mermaid Support extension

Quick Reference Card

Flowchart

flowchart TD
    A[Box] --> B{Decision}
    B -->|Yes| C[Action]
    B -->|No| D[Other]

Sequence

sequenceDiagram
    A->>B: Request
    B-->>A: Response

Class

classDiagram
    class Name {
        +attribute type
        +method() return
    }
    A <|-- B : inherits

State

stateDiagram-v2
    [*] --> State1
    State1 --> State2 : event
    State2 --> [*]

ER

erDiagram
    ENTITY1 ||--o{ ENTITY2 : relationship
    ENTITY1 {
        type attribute PK
    }

References

For detailed syntax and complete examples, see:

ReferenceContentWhen to Load
flowchart.mdNode shapes, edge types, subgraphsCreating flowcharts
sequence.mdParticipants, arrows, activation, alt/loopCreating sequence diagrams
class.mdClasses, visibility, relationships, cardinalityCreating class diagrams
state-er.mdState machines, ER diagrams, relationshipsCreating state/ER diagrams
special-diagrams.mdGantt, Git Graph, C4, styling, gotchasCreating special diagrams

Test Scenarios

Scenario 1: Creating a flowchart

Query: "Create a Mermaid flowchart for user registration process"

Expected: Skill activates, provides flowchart syntax with decision nodes and subgraphs

Scenario 2: Creating a sequence diagram

Query: "Generate a Mermaid sequence diagram for API authentication"

Expected: Skill activates, provides sequence syntax with participants and alt/loop blocks

Scenario 3: Creating an ER diagram

Query: "Create a Mermaid ER diagram for a blog database"

Expected: Skill activates, directs to state-er.md reference for entity attributes and relationships


Last Updated: 2025-12-28 Mermaid Version: 10.x / 11.x

Version History

  • v1.1.0 (2025-12-28): Refactored to progressive disclosure - extracted content to references/
  • v1.0.0 (2025-12-26): Initial release

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

94/100Analyzed 2/19/2026

High-quality technical reference skill for Mermaid diagram syntax. Provides comprehensive coverage of all diagram types with clear examples, platform integration guidance, and progressive disclosure via reference files. Well-structured with test scenarios for skill activation. Located in dedicated skills folder with proper metadata. While it's a reference (not step-by-step), it includes quick reference cards and examples that make it highly actionable for its purpose. Tags are somewhat mismatched but don't detract from overall quality.

100
95
95
90
80

Metadata

Licenseunknown
Version-
Updated1/19/2026
Publishermelodic-software

Tags

apidatabasegithubtesting