Mermaid
by achhina
This skill should be used when the user asks to "create a mermaid diagram", "draw a flowchart", "make a sequence diagram", "update diagram theme", "customize diagram colors", "add icons to architecture diagram", or mentions working with architecture diagrams, state diagrams, gantt charts, timelines, mindmaps, entity relationships, sankey diagrams, or user journeys. Always use when creating, editing, or customizing mermaid diagrams in markdown files.
Skill Details
Repository Files
14 files in this skill directory
name: mermaid description: This skill should be used when the user asks to "create a mermaid diagram", "draw a flowchart", "make a sequence diagram", "update diagram theme", "customize diagram colors", "add icons to architecture diagram", or mentions working with architecture diagrams, state diagrams, gantt charts, timelines, mindmaps, entity relationships, sankey diagrams, or user journeys. Always use when creating, editing, or customizing mermaid diagrams in markdown files. version: 0.1.0
Mermaid Diagrams
Basic Frontmatter Syntax
All diagram customization uses YAML frontmatter at the top of the diagram:
---
config:
theme: dark
---
For details on all configuration options, see references/configuration.md and references/styling.md.
Workflow Selection
Determine whether the user wants to create a new diagram or edit an existing diagram:
- Creating: User requests a new diagram, asks to "draw", "create", "make", or "generate" a diagram
- Editing: User requests changes to an existing diagram, asks to "change theme", "update", "modify", "customize", or "edit"
Follow the appropriate workflow below based on the user's intent.
Creating New Diagrams
Follow this workflow when creating new Mermaid diagrams:
1. Determine Diagram Type and Theme
If the user's request doesn't clearly indicate which diagram type or theme to use, use the AskUserQuestion tool once to ask both questions:
Question 1 - Diagram Type:
- Flowchart - Decision trees, algorithms, process flows
- Sequence - Time-ordered interactions between actors/components
- State - State machines, workflows, state transitions
- Architecture - System components and relationships
- Entity Relationship - Database schemas and data models
- Gantt - Project schedules and task dependencies
- Timeline - Chronological events and milestones
- Mindmap - Hierarchical concepts and brainstorming
- User Journey - User experience flows and touchpoints
- Sankey - Flow quantities and value relationships
Question 2 - Theme:
- Default - The default theme for all diagrams
- Neutral - Great for black and white documents that will be printed
- Dark - Goes well with dark-colored elements or dark-mode
- Forest - Contains shades of green
- Base - The only theme that can be modified with custom colors
Reference the selection flowchart below to guide your questions, or consult references/diagrams/ for detailed examples of each type.
2. Create the Diagram
- Read the diagram type reference in
references/diagrams/for syntax examples and conventions - Apply the selected theme using YAML frontmatter at the top of the diagram
- Create the diagram in a markdown file
Common Issues:
- If encountering syntax errors or special character issues, read
references/conventions.md - For custom colors or theme variables, read
references/styling.md - For diagram-specific configuration options, read
references/configuration.md
Diagram Type Selection Guide
Use this flowchart to determine the appropriate diagram type:
flowchart TD
Start[What are you trying to show?] --> Question1{Process or<br/>Structure?}
Question1 -->|Process| Question2{Does time<br/>matter?}
Question1 -->|Structure| Question3{System or<br/>Data?}
Question2 -->|Yes, sequential| Question4{Multiple actors<br/>interacting?}
Question2 -->|No, just logic| Flowchart[Flowchart]
Question2 -->|Time-based events| Question5{Project plan<br/>or events?}
Question4 -->|Yes| Sequence[Sequence Diagram]
Question4 -->|No, state changes| State[State Diagram]
Question3 -->|System| Architecture[Architecture Diagram]
Question3 -->|Data model| Entity[Entity Relationship]
Question3 -->|Flow quantities| Sankey[Sankey Diagram]
Question5 -->|Project plan| Gantt[Gantt Chart]
Question5 -->|Events| Timeline[Timeline]
Start --> Question6{Concept or<br/>Experience?}
Question6 -->|Concepts/Ideas| Mindmap[Mindmap]
Question6 -->|User experience| UserJourney[User Journey]
Editing Existing Diagrams
Follow this workflow when editing or customizing existing Mermaid diagrams:
1. Read the Existing Diagram
Use the Read tool to view the current diagram file and understand its structure.
2. Identify the Change Type
Determine what the user wants to modify:
- Theme/Styling - Change colors, fonts, visual appearance
- Configuration - Modify diagram-specific settings (layout, spacing, options)
- Content - Update nodes, edges, text, structure
- Icons - Add or change icons (architecture diagrams)
3. Apply Changes Based on Type
- Theme/Styling - Read
references/styling.mdfor theme options, color customization, and theme variables - Configuration - Read
references/configuration.mdfor diagram settings, frontmatter syntax, and options - Content - Read the diagram type reference in
references/diagrams/for syntax - Icons - Read
references/configuration.md"Icon Registration" section (architecture diagrams only)
4. Make the Edit
Use the Edit tool to update the diagram file with the changes, preserving the existing structure and only modifying what the user requested.
Additional Resources
Reference Files
For detailed documentation, consult:
references/configuration.md- Complete configuration options, frontmatter syntax, icon registration. Read when user wants to modify diagram settings, add icons, or change configuration.references/styling.md- Theming capabilities, all theme variables, color customization, examples. Read when user wants to change colors, themes, or visual appearance.references/conventions.md- Syntax guide, escaping special characters, layout best practices, performance tips, accessibility. Read when encountering syntax issues or layout problems.
Diagram Type References
Located in references/diagrams/, each file includes use cases, complete examples with themes, and conventions:
- Process & Flow: flowchart.md, sequence.md, state.md, sankey.md
- System Design: architecture.md, entity-relationship.md
- Planning & Timeline: gantt.md, timeline.md
- Conceptual: mindmap.md, user-journey.md
Related Skills
Team Composition Analysis
This skill should be used when the user asks to "plan team structure", "determine hiring needs", "design org chart", "calculate compensation", "plan equity allocation", or requests organizational design and headcount planning for a startup.
Startup Financial Modeling
This skill should be used when the user asks to "create financial projections", "build a financial model", "forecast revenue", "calculate burn rate", "estimate runway", "model cash flow", or requests 3-5 year financial planning for a startup.
Startup Metrics Framework
This skill should be used when the user asks about "key startup metrics", "SaaS metrics", "CAC and LTV", "unit economics", "burn multiple", "rule of 40", "marketplace metrics", or requests guidance on tracking and optimizing business performance metrics.
Market Sizing Analysis
This skill should be used when the user asks to "calculate TAM", "determine SAM", "estimate SOM", "size the market", "calculate market opportunity", "what's the total addressable market", or requests market sizing analysis for a startup or business opportunity.
Anndata
This skill should be used when working with annotated data matrices in Python, particularly for single-cell genomics analysis, managing experimental measurements with metadata, or handling large-scale biological datasets. Use when tasks involve AnnData objects, h5ad files, single-cell RNA-seq data, or integration with scanpy/scverse tools.
Geopandas
Python library for working with geospatial vector data including shapefiles, GeoJSON, and GeoPackage files. Use when working with geographic data for spatial analysis, geometric operations, coordinate transformations, spatial joins, overlay operations, choropleth mapping, or any task involving reading/writing/analyzing vector geographic data. Supports PostGIS databases, interactive maps, and integration with matplotlib/folium/cartopy. Use for tasks like buffer analysis, spatial joins between dat
Market Research Reports
Generate comprehensive market research reports (50+ pages) in the style of top consulting firms (McKinsey, BCG, Gartner). Features professional LaTeX formatting, extensive visual generation with scientific-schematics and generate-image, deep integration with research-lookup for data gathering, and multi-framework strategic analysis including Porter's Five Forces, PESTLE, SWOT, TAM/SAM/SOM, and BCG Matrix.
Plotly
Interactive scientific and statistical data visualization library for Python. Use when creating charts, plots, or visualizations including scatter plots, line charts, bar charts, heatmaps, 3D plots, geographic maps, statistical distributions, financial charts, and dashboards. Supports both quick visualizations (Plotly Express) and fine-grained customization (graph objects). Outputs interactive HTML or static images (PNG, PDF, SVG).
Excel Analysis
Analyze Excel spreadsheets, create pivot tables, generate charts, and perform data analysis. Use when analyzing Excel files, spreadsheets, tabular data, or .xlsx files.
Neurokit2
Comprehensive biosignal processing toolkit for analyzing physiological data including ECG, EEG, EDA, RSP, PPG, EMG, and EOG signals. Use this skill when processing cardiovascular signals, brain activity, electrodermal responses, respiratory patterns, muscle activity, or eye movements. Applicable for heart rate variability analysis, event-related potentials, complexity measures, autonomic nervous system assessment, psychophysiology research, and multi-modal physiological signal integration.
