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

Mermaid Diagramming

  • 65 installs
  • 28 repo stars
  • Updated June 29, 2026
  • nickcrew/claude-ctx-plugin

Helps with ai & agent building tasks.

About

mermaid-diagramming is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.

  • mermaid-diagramming
  • AI & Agent Building
  • AI-coding skill

Mermaid Diagramming by the numbers

  • 65 all-time installs (skills.sh)
  • +1 installs in the week ending Jul 26, 2026 (Skillselion tracking)
  • Ranked #5,943 of 16,556 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/nickcrew/claude-ctx-plugin --skill mermaid-diagramming

Add your badge

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

Listed on Skillselion
Installs65
repo stars28
Last updatedJune 29, 2026
Repositorynickcrew/claude-ctx-plugin

What it does

Helps with ai & agent building tasks.

Files

SKILL.mdMarkdownGitHub ↗

Mermaid Diagramming

Create clear, professional Mermaid diagrams for technical documentation. Covers all major diagram types with both basic and styled variants, rendering guidance, and export recommendations.

When to Use This Skill

  • Creating flowcharts for process documentation or decision trees
  • Drawing sequence diagrams for API interactions or system communication
  • Building ERDs for database schema documentation
  • Designing state machine diagrams for workflow states
  • Producing Gantt charts for project timelines
  • Documenting system architecture with C4 or network diagrams
  • Adding visual aids to README files, ADRs, or design docs

Quick Reference

ResourcePurposeLoad when
references/diagram-types.mdSyntax, patterns, and code examples for every Mermaid diagram typeChoosing or building a diagram

---

Workflow Overview

Phase 1: Scope     → Identify what to visualize, audience, and diagram type
Phase 2: Draft     → Write base Mermaid code with correct syntax
Phase 3: Style     → Add theming, colors, and accessibility annotations
Phase 4: Deliver   → Provide rendering instructions and suggest iterations

---

Phase 1: Scope

Before writing any code, clarify:

1. What is the narrative? The diagram should tell a story or answer a question. 2. Who is the audience? Developers need detail; stakeholders need overview. 3. What entities and relationships exist? List nodes and edges before drawing. 4. Which diagram type fits? Use the selection guide below.

Diagram Type Selection

If you need to show...Use
Process flow, decisions, branchingflowchart
Interactions over time between systems/actorssequenceDiagram
Data model and relationshipserDiagram
Object structure and inheritanceclassDiagram
States and transitionsstateDiagram-v2
Project schedule and dependenciesgantt
Proportions or distributionpie
Hierarchical idea mappingmindmap
Events over timetimeline
System architecture layersC4 context/container diagrams
Code version historygitGraph
User experience flowjourney

---

Phase 2: Draft

Structure Rules

1. One concept per diagram — split complex systems into multiple views 2. Limit nodes — keep under 15 nodes per diagram; split if larger 3. Meaningful labels — use descriptive text, not single letters 4. Consistent direction — prefer top-to-bottom (TB) or left-to-right (LR) 5. Group related nodes — use subgraph to cluster related elements

Code Conventions

%% Always start with a comment describing the diagram's purpose
%% Use consistent quoting for labels with special characters
flowchart LR
    A["User Request"] --> B{"Auth Check"}
    B -->|Valid| C["Process Request"]
    B -->|Invalid| D["Return 401"]
  • Use double quotes for labels containing special characters
  • Add comments (%%) explaining non-obvious relationships
  • Prefer --> for solid lines, -.-> for dashed, ==> for thick
  • Use descriptive edge labels: -->|"reason"| TargetNode

---

Phase 3: Style

Theming

Apply consistent styling using %%{init: ...}%% directives:

%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#4A90D9'}}}%%
flowchart TB
    A["Start"] --> B["End"]

Node Styling

flowchart LR
    A["Normal"]
    B["Highlighted"]:::highlight
    classDef highlight fill:#f9f,stroke:#333,stroke-width:2px

Accessibility

  • Use high-contrast color combinations
  • Do not rely on color alone to convey meaning — add labels and shapes
  • Include alt text when embedding: ![Diagram description](path)
  • Provide a text summary alongside complex diagrams

---

Phase 4: Deliver

Always Provide

1. Basic version — clean, unstyled diagram that renders anywhere 2. Styled version — themed variant with colors and emphasis 3. Rendering note — where to preview (GitHub, Mermaid Live, VS Code extension) 4. Suggestions — complementary diagrams or next iterations

Rendering Options

PlatformSupport
GitHub markdownNative rendering in .md files
GitLab markdownNative rendering
Mermaid Live Editorhttps://mermaid.live for interactive editing
VS CodeMermaid extension for preview
Docusaurus / MkDocsPlugin-based rendering

Export Formats

  • SVG: Best for web and docs (scalable, searchable text)
  • PNG: Fallback for platforms without Mermaid support
  • PDF: For print or formal documentation

---

Best Practices

  • Start simple — get the structure right before adding style
  • Test rendering — verify on the target platform before committing
  • Version diagrams — update diagrams when the underlying system changes
  • Colocate with docs — keep diagrams in the same directory as related documentation
  • Use subgraphs — group related nodes to reduce visual complexity

Anti-Patterns

  • Putting too many nodes in one diagram (split at 15+ nodes)
  • Using single-letter node IDs without labels
  • Relying on color alone to convey meaning
  • Hard-coding pixel widths that break on different renderers
  • Leaving diagrams out of date after system changes

Related skills

This week in AI coding

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

unsubscribe anytime.