Create specialized diagrams with Mermaid including Git graphs, Sankey flows, mindmaps, and other advanced visualization types
Scope: GitGraph, Sankey, mindmaps, and advanced diagram types in Mermaid.js Lines: ~430 Last Updated: 2025-10-27 Format Version: 1.0 (Atomic)
Activate this skill when:
Linear commits:
gitGraph
commit
commit
commit
Feature branch:
gitGraph
commit
commit
branch feature
checkout feature
commit
commit
checkout main
commit
merge feature
commit
Commits with IDs and tags:
gitGraph
commit id: "Initial commit"
commit id: "Add authentication" tag: "v0.1"
branch develop
checkout develop
commit id: "Feature work"
commit id: "Bug fixes"
checkout main
merge develop tag: "v1.0"
commit id: "Hotfix" tag: "v1.0.1"
Visual emphasis:
gitGraph
commit type: NORMAL
commit type: HIGHLIGHT id: "Important change"
commit type: REVERSE id: "Reverted change"
branch hotfix
checkout hotfix
commit type: HIGHLIGHT id: "Critical fix"
checkout main
merge hotfix tag: "v1.0.1"
Commit types:
NORMAL - Standard commit (default)HIGHLIGHT - Important commit (emphasized)REVERSE - Reverted or rolled back commitgitGraph
commit id: "Initial"
commit id: "Setup project"
branch develop
checkout develop
commit id: "Add core features"
branch feature/login
checkout feature/login
commit id: "Add login UI"
commit id: "Add authentication"
checkout develop
merge feature/login
commit id: "Integrate login"
branch release/1.0
checkout release/1.0
commit id: "Bump version"
commit id: "Update changelog"
checkout main
merge release/1.0 tag: "v1.0.0"
checkout develop
merge release/1.0
branch hotfix/security
checkout hotfix/security
commit id: "Fix vulnerability" type: HIGHLIGHT
checkout main
merge hotfix/security tag: "v1.0.1"
checkout develop
merge hotfix/security
gitGraph
commit id: "Base"
branch feature-a
commit id: "Feature A work"
checkout main
branch feature-b
commit id: "Feature B work"
checkout main
merge feature-a
commit id: "CI/CD deploy"
merge feature-b
commit id: "CI/CD deploy"
commit tag: "v1.0" type: HIGHLIGHT
gitGraph
commit id: "v0.9"
branch release/1.0
checkout release/1.0
commit id: "RC1" tag: "v1.0-rc1"
commit id: "Bug fixes"
commit id: "RC2" tag: "v1.0-rc2"
checkout main
branch develop
checkout develop
commit id: "New features for v1.1"
checkout release/1.0
commit id: "Final polish"
checkout main
merge release/1.0 tag: "v1.0.0" type: HIGHLIGHT
checkout develop
merge main
commit id: "Continue v1.1 work"
Simple data flow:
sankey-beta
Source,Process,100
Process,Output A,60
Process,Output B,40
Energy distribution:
sankey-beta
Power Plant,Transmission,1000
Transmission,Industrial,400
Transmission,Commercial,350
Transmission,Residential,200
Transmission,Loss,50
Data pipeline:
sankey-beta
Raw Data,Cleaning,10000
Cleaning,Valid Records,8500
Cleaning,Rejected,1500
Valid Records,Processing,8500
Processing,Output DB,7000
Processing,Archive,1500
sankey-beta
Landing Page,Sign Up,10000
Landing Page,Browse,5000
Landing Page,Exit,15000
Sign Up,Complete Profile,7000
Sign Up,Abandon,3000
Browse,Add to Cart,2000
Browse,Exit,3000
Add to Cart,Checkout,1500
Add to Cart,Abandon Cart,500
Checkout,Purchase,1200
Checkout,Abandon,300
sankey-beta
Total Budget,Engineering,450000
Total Budget,Sales,300000
Total Budget,Marketing,150000
Total Budget,Operations,100000
Engineering,Salaries,350000
Engineering,Infrastructure,70000
Engineering,Tools,30000
Sales,Salaries,200000
Sales,Travel,50000
Sales,CRM,50000
Marketing,Ads,80000
Marketing,Events,40000
Marketing,Content,30000
sankey-beta
Total Memory,Application Heap,2048
Total Memory,Native Memory,512
Total Memory,System,512
Application Heap,Active Objects,1500
Application Heap,Cached Data,548
Active Objects,User Sessions,800
Active Objects,Business Logic,500
Active Objects,Framework,200
Simple structure:
mindmap
root((Project))
Planning
Requirements
Design
Development
Frontend
Backend
Testing
Unit Tests
Integration Tests
Different shapes for emphasis:
mindmap
root((Core Concept))
[Important Category]
(Sub-item 1)
(Sub-item 2)
{Cloud Topic}
((Circle Item))
[!Bang Item!]
{{Hexagon Topic}}
Shape reference:
((text)) - Circle (root default)(text) - Rounded square[text] - Square{text} - Cloud{{text}} - Hexagon[!text!] - BangWith icons:
mindmap
root((Project))::icon(fa fa-project-diagram)
Planning::icon(fa fa-calendar)
Requirements
Timeline
Development::icon(fa fa-code)
Frontend
Backend
Deploy::icon(fa fa-rocket)
mindmap
root((E-commerce Platform))
Frontend
Web App
React
TypeScript
Vite
Mobile App
React Native
iOS
Android
Backend
API Gateway
Kong
Rate Limiting
Microservices
User Service
Order Service
Payment Service
Databases
PostgreSQL
Redis
MongoDB
Infrastructure
AWS
EC2
RDS
S3
Monitoring
Prometheus
Grafana
CI/CD
GitHub Actions
Docker
mindmap
root((Full-Stack Development))
Frontend
HTML/CSS
Semantic HTML
Flexbox
Grid
JavaScript
ES6+
Async/Await
DOM
React
Hooks
Context
Router
Backend
Node.js
Express
NestJS
Databases
SQL
PostgreSQL
Joins
NoSQL
MongoDB
Redis
DevOps
Docker
Containers
Compose
Kubernetes
Pods
Services
AWS
EC2
S3
Lambda
mindmap
root((Launch New Feature))
Research
User Interviews
Competitor Analysis
Market Research
Design
Wireframes
Mockups
User Flows
Design System
Development
Backend API
Database Schema
Endpoints
Auth
Frontend
Components
Pages
State Management
Testing
Unit Tests
Integration
E2E
Launch
Beta Release
Marketing
Documentation
Training
Requirements traceability:
requirementDiagram
requirement UserAuth {
id: REQ-001
text: Users must authenticate
risk: high
verifymethod: test
}
functionalRequirement LoginAPI {
id: FREQ-001
text: Provide login endpoint
}
element AuthService {
type: service
docRef: auth-service.md
}
UserAuth - satisfies -> LoginAPI
LoginAPI - implements -> AuthService
Do:
Don't:
Do:
Don't:
Do:
Don't:
gitGraph
commit
branch feat1
branch feat2
branch feat3
%% ... 10 more branches
Solution: Split into multiple diagrams or show just relevant branches
sankey-beta
Input,Process,100
Process,Output,120 %% Where did extra 20 come from?
✅ Better: Flows must balance
mindmap
root
Item1
Item2
Item3
%% No grouping or structure
✅ Better: Group related concepts into hierarchies
mermaid-flowcharts.md - Process flowsmermaid-sequence-diagrams.md - Interactionsmermaid-architecture-diagrams.md - System designversion-control.md - Git workflows