MCPInstall

mermaid-diagramming

Mermaid diagram creation covering flowcharts, sequence diagrams, ERDs, state machines, Gantt charts, and architecture views. Use when creating or updating technical diagrams in documentation.

Installs
105
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/nickcrew/claude-cortex --skill mermaid-diagramming
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads mermaid-diagramming automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

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

FAQ

What does the mermaid-diagramming skill do?

Mermaid diagram creation covering flowcharts, sequence diagrams, ERDs, state machines, Gantt charts, and architecture views. Use when creating or updating technical diagrams in documentation.

How do I install mermaid-diagramming?

Run npx skills add https://github.com/nickcrew/claude-cortex --skill mermaid-diagramming in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/mermaid-diagramming/ (personal) or .claude/skills/mermaid-diagramming/ (project).

Which AI agents can use mermaid-diagramming?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is mermaid-diagramming safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains mermaid-diagramming?

It is published by nickcrew in nickcrew/claude-cortex. It has 105 recorded installs.

More from nickcrew/claude-cortex

View all →

react-performance-optimization

nickcrew/claude-cortex

React performance optimization patterns using memoization, code splitting, and efficient rendering strategies. Use when optimizing slow React applications, reducing bundle size, or improving user experience with large datasets.

Frontend & Design1.9K installs

owasp-top-10

nickcrew/claude-cortex

OWASP Top 10 security vulnerabilities with detection and remediation patterns. Use when conducting security audits, implementing secure coding practices, or reviewing code for common security vulnerabilities.

Security758 installs

ui-design-aesthetics

nickcrew/claude-cortex

Generates high-quality, non-generic UI designs with a focus on performance, progressive disclosure, and distinctive aesthetics.

Frontend & Design358 installs

threat-modeling-techniques

nickcrew/claude-cortex

Threat modeling methodologies using STRIDE, attack trees, and risk assessment for proactive security analysis. Use when designing secure systems, conducting security reviews, or identifying potential attack vectors in applications.

Security357 installs

token-efficiency

nickcrew/claude-cortex

Compressed communication using symbols and abbreviations. Use when context is limited or brevity is needed.

228 installs

helm-chart-patterns

nickcrew/claude-cortex

Helm chart development patterns for packaging and deploying Kubernetes applications. Use when creating reusable Helm charts, managing multi-environment deployments, or building application catalogs for Kubernetes.

DevOps & Cloud179 installs

Popular docs & writing skills

View category →

grill-with-docs

mattpocock/skills

A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.

Docs & Writing1.2M installs

lark-markdown

open.feishu.cn

飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。

Docs & Writing778.7K installs

writing-beats

mattpocock/skills

Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.

Docs & Writing490.7K installs

writing-shape

mattpocock/skills

Writing, exploit: shape raw material into an article, paragraph by paragraph.

Docs & Writing490.2K installs

writing-fragments

mattpocock/skills

Writing, explore: mine raw fragments, no structure yet.

Docs & Writing489.6K installs

writing-for-agents

mattpocock/skills

Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.

Docs & Writing479.3K installs