Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
ccheney avatar

Mermaid Diagrams

  • 360 installs
  • 57 repo stars
  • Updated July 7, 2026
  • ccheney/robust-skills

mermaid-diagrams is a Claude Code skill that generates Mermaid syntax diagrams in markdown for developers who need architecture, sequence, ER, state, and Gantt visuals in GitHub, GitLab, or Obsidian docs.

About

mermaid-diagrams is a documentation skill from ccheney/robust-skills that proactively suggests and authors Mermaid diagram blocks renderable in GitHub, GitLab, VS Code, Obsidian, and Notion. A quick decision tree routes problems to ten diagram types: flowchart for processes, sequenceDiagram for API flows, erDiagram for database schemas, classDiagram for domain models, stateDiagram-v2 for state machines, C4Context for architecture, gantt for timelines, journey for UX flows, gitGraph for branches, and pie or quadrantChart for distributions. The skill ships seven reference files covering flowcharts, sequence, class and ER, state and journey, data charts, architecture, and a full syntax cheatsheet. Best practices emphasize one concept per diagram, meaningful labels, subgraph grouping, and correct flow direction. Developers reach for mermaid-diagrams when explaining service architecture in READMEs, documenting API request flows in PRs, or visualizing database relationships without maintaining separate image assets.

  • Mermaid syntax patterns
  • Architecture and sequence diagrams
  • Flowchart conventions for systems
  • Diagrams embedded in markdown docs
  • Readable visual communication

Mermaid Diagrams by the numbers

  • 360 all-time installs (skills.sh)
  • Ranked #425 of 1,879 Documentation skills by installs in the Skillselion catalog
  • Data as of Aug 3, 2026 (Skillselion catalog sync)
npx skills add https://github.com/ccheney/robust-skills --skill mermaid-diagrams

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs360
repo stars57
Last updatedJuly 7, 2026
Repositoryccheney/robust-skills

How do you create Mermaid architecture diagrams?

Author clear architecture, flow, and sequence diagrams in Mermaid syntax for design docs, PRs, READMEs, and team alignment.

Who is it for?

Developers documenting systems in markdown who need version-controlled architecture, API flow, and database diagrams without separate drawing tools.

Skip if: Pixel-perfect UI mockups, animated presentations, or teams that require proprietary diagram formats outside Mermaid markdown.

When should I use this skill?

A developer asks for flowcharts, sequence diagrams, architecture diagrams, ER diagrams, or any Mermaid visualization in markdown documentation.

What you get

Mermaid markdown code blocks with flowcharts, sequence diagrams, ER schemas, state machines, or C4 architecture diagrams ready for GitHub and GitLab rendering.

  • Mermaid markdown code blocks
  • architecture or flow diagram

By the numbers

  • Supports 10 Mermaid diagram types from flowchart through gitGraph
  • Bundles 7 reference syntax guides for Mermaid diagram authoring

Files

SKILL.mdMarkdownGitHub ↗

Mermaid Diagrams

Generate diagrams in markdown that render in GitHub, GitLab, VS Code, Obsidian, Notion.

Quick Start

````markdown

flowchart LR
    A[Start] --> B{Decision}
    B -->|Yes| C[Action]
    B -->|No| D[End]

````

Quick Decision Tree

What to visualize?
├─ Process, algorithm, decision flow    → flowchart
├─ API calls, service interactions      → sequenceDiagram
├─ Database tables, relationships       → erDiagram
├─ OOP, type hierarchy, domain model    → classDiagram
├─ State machine, lifecycle             → stateDiagram-v2
├─ System architecture, services        → flowchart + subgraphs (or C4Context)
├─ Project timeline, sprints            → gantt
├─ User experience, pain points         → journey
├─ Git branches                         → gitGraph
├─ Data distribution                    → pie
└─ Priority matrix                      → quadrantChart

Diagram Types

TypeDeclarationBest For
Flowchartflowchart LR/TBProcesses, decisions, data flow
SequencesequenceDiagramAPI flows, service calls
ERerDiagramDatabase schemas
ClassclassDiagramTypes, domain models
StatestateDiagram-v2State machines
GanttganttProject timelines
JourneyjourneyUser experience
C4C4ContextSystem architecture
GitgitGraphBranch visualization

Common Patterns

System Architecture

flowchart LR
    subgraph Client
        Browser & Mobile
    end
    subgraph Services
        API --> Auth & Core
    end
    subgraph Data
        DB[(PostgreSQL)]
    end
    Client --> API
    Core --> DB

API Request Flow

sequenceDiagram
    autonumber
    Client->>+API: POST /orders
    API->>Auth: Validate
    Auth-->>API: OK
    API->>+DB: Insert
    DB-->>-API: ID
    API-->>-Client: 201 Created

Database Schema

erDiagram
    USER ||--o{ ORDER : places
    ORDER ||--|{ LINE_ITEM : contains
    USER { uuid id PK; string email UK }
    ORDER { uuid id PK; uuid user_id FK }

State Machine

stateDiagram-v2
    [*] --> Draft
    Draft --> Submitted : submit()
    Submitted --> Approved : approve()
    Submitted --> Rejected : reject()
    Approved --> [*]

Syntax Quick Reference

Flowchart Nodes

[Rectangle]  (Rounded)  {Diamond}  [(Database)]  [[Subroutine]]
((Circle))   >Asymmetric]   {{Hexagon}}

Flowchart Edges

A --> B       # Arrow
A --- B       # Line
A -.-> B      # Dotted arrow
A ==> B       # Thick arrow
A -->|text| B # Labeled

Sequence Arrows

->>   # Solid arrow (request)
-->>  # Dotted arrow (response)
-x    # X end (async)
-)    # Open arrow

ER Cardinality

||--||   # One to one
||--o{   # One to many
}o--o{   # Many to many

Best Practices

1. Choose the right type — Use decision tree above 2. Keep focused — One concept per diagram 3. Use meaningful labels — Not just A, B, C 4. Direction mattersLR for flows, TB for hierarchies 5. Group with subgraphs — Organize related nodes

Reference Documentation

FilePurpose
references/FLOWCHARTS.mdNodes, edges, subgraphs, styling
references/SEQUENCE.mdParticipants, messages, activation
references/CLASS-ER.mdClasses, ER diagrams, relationships
references/STATE-JOURNEY.mdStates, user journeys
references/DATA-CHARTS.mdGantt, Pie, Timeline, Quadrant
references/ARCHITECTURE.mdC4, Block, Kanban
references/CHEATSHEET.mdAll syntax quick reference

Resources

  • Official Documentation: https://mermaid.js.org
  • Live Editor: https://mermaid.live
  • GitHub Repository: https://github.com/mermaid-js/mermaid
  • GitHub Markdown Support: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-diagrams
  • GitLab Markdown Support: https://docs.gitlab.com/ee/user/markdown.html#diagrams-and-flowcharts

Related skills

How it compares

Pick mermaid-diagrams over ASCII art or image-based diagram skills when you need version-controlled markdown diagrams that render directly in GitHub and GitLab without external tools.

FAQ

Where do mermaid-diagrams render?

mermaid-diagrams produces fenced ```mermaid code blocks that render natively in GitHub, GitLab, VS Code, Obsidian, and Notion. Diagrams can also be previewed in the Mermaid Live Editor at mermaid.live.

Which diagram type should I use?

mermaid-diagrams includes a decision tree: flowchart for processes, sequenceDiagram for API calls, erDiagram for database tables, classDiagram for OOP models, stateDiagram-v2 for lifecycles, and C4Context for system architecture.

What reference docs ship with mermaid-diagrams?

mermaid-diagrams bundles seven reference files: FLOWCHARTS, SEQUENCE, CLASS-ER, STATE-JOURNEY, DATA-CHARTS, ARCHITECTURE, and CHEATSHEET. Each covers syntax patterns, edge types, cardinality notation, and styling for that diagram family.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.