Skills softaworks agent-toolkit
mermaid-diagrams
- Use it when:
- You want a domain model, API flow, user journey, database schema or system architecture drawn as a diagram that lives as text beside your code.
- It does:
- Picks the diagram type for what you're showing and writes it in Mermaid, with a detailed guide for each main type.
- You get:
- Mermaid code that GitHub, GitLab, Notion, Obsidian and Confluence render as is, or that you export to PNG or SVG with Mermaid Live or the Mermaid CLI.
- Unlike design-doc-mermaid:
- That one saves and renders each diagram to validate it before adding it to your docs; this one has no scripts: rendering and checking are up to you.
- Covers:
- Class, sequence, flowchart, ER, C4 and architecture diagrams in depth; state diagrams, git graphs, Gantt and pie or bar charts by name only.
TL;DR
Mermaid is a text format that renders as diagrams, so a diagram can sit in version control and change with the code. The skill opens with a guide to choosing the type: class diagrams for domain models and object-oriented design, sequence diagrams for API calls and login flows, flowcharts for processes, algorithms and user journeys, ER diagrams for database schemas, C4 diagrams for architecture at system, container and component level, plus state diagrams, git graphs, Gantt charts and pie or bar charts. It gives a starter example of a class, sequence, flowchart and ER diagram, and points to a reference for each main type: relationships and multiplicity, alt, loop and par blocks, node shapes and subgraphs, cardinality and keys, C4 boundaries, and cloud, infrastructure and CI/CD diagrams. Another covers themes, the ELK layout, the hand-drawn look and styling. Its advice: start simple, keep one diagram per concept, comment with %%, and store .mmd files next to the code. It tells the agent to diagram whenever a project or feature starts, a schema is designed or an architecture decision is explained.
Summarizes the skill at 3027f20.
npx skills add https://github.com/softaworks/agent-toolkit --skill mermaid-diagrams skills.sh pageSource on GitHubAll skills from softaworks/agent-toolkit
- Total Downloads
- 5,200 on skills.sh, Nov 9, 2026
- Repo stars
- 2,651 softaworks/agent-toolkit
- First seen
- Jan 20, 2026 on skills.sh
Weekly values
| Week to | Installs |
|---|---|
| Sep 21 | 44 |
| Sep 28 | 42 |
| Oct 5 | 43 |
| Oct 12 | 42 |
| Oct 19 | 44 |
| Oct 26 | 42 |
| Nov 2 | 41 |
| Nov 9 | 38 |
| Category |
Research reproduction, financial data, charts and diagrams. Articles, docs, internal comms, research write-ups and prose that doesn't read as generated. |
|---|---|
| Type |
Knowledge and rules the agent applies while it works: best practices, design principles, API references. |
| Effect |
Adds no side effects of its own. It shapes how the agent thinks, writes or reviews. Guidelines and routers are always effect:none, even when the task they support edits code. |
| Needs |
Instructions only. Works in any agent that supports skills. |
| Publisher |
Everyone else. Unverified vendor claims default to community. |
| Topics | |
| Stack |
SKILL.md
From softaworks/agent-toolkit at 3027f20. Checked daily, last changed Nov 7, 2026.
Frontmatter
name: mermaid-diagrams
description: Comprehensive guide for creating software diagrams using Mermaid syntax. Use when users need to create, visualize, or document software through diagrams including class diagrams (domain modeling, object-oriented design), sequence diagrams (application flows, API interactions, code execution), flowcharts (processes, algorithms, user journeys), entity relationship diagrams (database schemas), C4 architecture diagrams (system context, containers, components), state diagrams, git graphs, pie charts, gantt charts, or any other diagram type. Triggers include requests to "diagram", "visualize", "model", "map out", "show the flow", or when explaining system architecture, database design, code structure, or user/application flows.Mermaid Diagramming
Create professional software diagrams using Mermaid's text-based syntax. Mermaid renders diagrams from simple text definitions, making diagrams version-controllable, easy to update, and maintainable alongside code.
Core Syntax Structure
All Mermaid diagrams follow this pattern:
diagramType
definition content
Key principles:
- First line declares diagram type (e.g.,
classDiagram,sequenceDiagram,flowchart) - Use
%%for comments - Line breaks and indentation improve readability but aren't required
- Unknown words break diagrams; parameters fail silently
Diagram Type Selection Guide
Choose the right diagram type:
-
Class Diagrams - Domain modeling, OOP design, entity relationships
- Domain-driven design documentation
- Object-oriented class structures
- Entity relationships and dependencies
-
Sequence Diagrams - Temporal interactions, message flows
- API request/response flows
- User authentication flows
- System component interactions
- Method call sequences
-
Flowcharts - Processes, algorithms, decision trees
- User journeys and workflows
- Business processes
- Algorithm logic
- Deployment pipelines
-
Entity Relationship Diagrams (ERD) - Database schemas
- Table relationships
- Data modeling
- Schema design
-
C4 Diagrams - Software architecture at multiple levels
- System Context (systems and users)
- Container (applications, databases, services)
- Component (internal structure)
- Code (class/interface level)
-
State Diagrams - State machines, lifecycle states
-
Git Graphs - Version control branching strategies
-
Gantt Charts - Project timelines, scheduling
-
Pie/Bar Charts - Data visualization
Quick Start Examples
Class Diagram (Domain Model)
classDiagram
Title -- Genre
Title *-- Season
Title *-- Review
User --> Review : creates
class Title {
+string name
+int releaseYear
+play()
}
class Genre {
+string name
+getTopTitles()
}
Sequence Diagram (API Flow)
sequenceDiagram
participant User
participant API
participant Database
User->>API: POST /login
API->>Database: Query credentials
Database-->>API: Return user data
alt Valid credentials
API-->>User: 200 OK + JWT token
else Invalid credentials
API-->>User: 401 Unauthorized
end
Flowchart (User Journey)
flowchart TD
Start([User visits site]) --> Auth{Authenticated?}
Auth -->|No| Login[Show login page]
Auth -->|Yes| Dashboard[Show dashboard]
Login --> Creds[Enter credentials]
Creds --> Validate{Valid?}
Validate -->|Yes| Dashboard
Validate -->|No| Error[Show error]
Error --> Login
ERD (Database Schema)
erDiagram
USER ||--o{ ORDER : places
ORDER ||--|{ LINE_ITEM : contains
PRODUCT ||--o{ LINE_ITEM : includes
USER {
int id PK
string email UK
string name
datetime created_at
}
ORDER {
int id PK
int user_id FK
decimal total
datetime created_at
}
Detailed References
For in-depth guidance on specific diagram types, see:
- references/class-diagrams.md - Domain modeling, relationships (association, composition, aggregation, inheritance), multiplicity, methods/properties
- references/sequence-diagrams.md - Actors, participants, messages (sync/async), activations, loops, alt/opt/par blocks, notes
- references/flowcharts.md - Node shapes, connections, decision logic, subgraphs, styling
- references/erd-diagrams.md - Entities, relationships, cardinality, keys, attributes
- references/c4-diagrams.md - System context, container, component diagrams, boundaries
- references/architecture-diagrams.md - Cloud services, infrastructure, CI/CD deployments
- references/advanced-features.md - Themes, styling, configuration, layout options
Best Practices
- Start Simple - Begin with core entities/components, add details incrementally
- Use Meaningful Names - Clear labels make diagrams self-documenting
- Comment Extensively - Use
%%comments to explain complex relationships - Keep Focused - One diagram per concept; split large diagrams into multiple focused views
- Version Control - Store
.mmdfiles alongside code for easy updates - Add Context - Include titles and notes to explain diagram purpose
- Iterate - Refine diagrams as understanding evolves
Configuration and Theming
Configure diagrams using frontmatter:
---
config:
theme: base
themeVariables:
primaryColor: "#ff6b6b"
---
flowchart LR
A --> B
Available themes: default, forest, dark, neutral, base
Layout options:
layout: dagre(default) - Classic balanced layoutlayout: elk- Advanced layout for complex diagrams (requires integration)
Look options:
look: classic- Traditional Mermaid stylelook: handDrawn- Sketch-like appearance
Exporting and Rendering
Native support in:
- GitHub/GitLab - Automatically renders in Markdown
- VS Code - With Markdown Mermaid extension
- Notion, Obsidian, Confluence - Built-in support
Export options:
- Mermaid Live Editor - Online editor with PNG/SVG export
- Mermaid CLI -
npm install -g @mermaid-js/mermaid-clithenmmdc -i input.mmd -o output.png - Docker -
docker run --rm -v $(pwd):/data minlag/mermaid-cli -i /data/input.mmd -o /data/output.png
Common Pitfalls
- Breaking characters - Avoid
{}in comments, use proper escape sequences for special characters - Syntax errors - Misspellings break diagrams; validate syntax in Mermaid Live
- Overcomplexity - Split complex diagrams into multiple focused views
- Missing relationships - Document all important connections between entities
When to Create Diagrams
Always diagram when:
- Starting new projects or features
- Documenting complex systems
- Explaining architecture decisions
- Designing database schemas
- Planning refactoring efforts
- Onboarding new team members
Use diagrams to:
- Align stakeholders on technical decisions
- Document domain models collaboratively
- Visualize data flows and system interactions
- Plan before coding
- Create living documentation that evolves with code