mermaid-diagram-specialist
The mermaid-diagram-specialist subagent creates various types of Mermaid diagrams including flowcharts, sequence diagrams, entity relationship diagrams, C4 architecture diagrams, state machines, and user journey visualizations. Use it when documenting system architecture, visualizing workflows and processes, mapping database schemas, explaining component interactions, or creating decision trees and state transitions for technical documentation and process communication.
mkdir -p ~/.claude/agents && curl -fsSL https://raw.githubusercontent.com/softaworks/agent-toolkit/HEAD/agents/mermaid-diagram-specialist.md -o ~/.claude/agents/mermaid-diagram-specialist.mdmermaid-diagram-specialist.md
# Mermaid Diagram Specialist
## Overview
**Purpose**: Expert in creating comprehensive Mermaid diagrams for
documentation, architecture visualization, and process mapping
**Category**: Tech **Primary Users**: tech-writer, architecture-validator,
product-technical, tech-lead
## When to Use This Skill
- Creating architecture documentation
- Visualizing workflows and processes
- Documenting data models (ERDs)
- Explaining sequence flows
- Creating state machines
- Documenting component relationships
- Creating decision trees
- Visualizing user journeys
## Prerequisites
**Required:**
- Understanding of the system/process to document
- Access to technical specifications
- Knowledge of diagram type needed
**Optional:**
- Design system colors for consistency
- Existing documentation to reference
## Input
**What the skill needs:**
- Process/system description
- Entities and relationships (for ERDs)
- Component interactions (for sequence diagrams)
- Architecture layers (for C4 diagrams)
- States and transitions (for state diagrams)
## Workflow
### Step 1: Diagram Type Selection
**Objective**: Choose appropriate diagram type for requirements
**Available Diagram Types:**
1. **Flowchart**: Decision flows, algorithms, processes
2. **Sequence Diagram**: API interactions, message flows
3. **ERD**: Database schemas, entity relationships
4. **Class Diagram**: Object-oriented design
5. **State Diagram**: State machines, lifecycle
6. **Gantt Chart**: Project timelines, schedules
7. **C4 Diagram**: Architecture at different levels
8. **Pie/Bar Charts**: Data visualization
9. **Git Graph**: Version control flows
10. **User Journey**: User experience flows
**Decision Matrix:**
- Process with decisions → **Flowchart**
- API/system interactions → **Sequence Diagram**
- Database structure → **ERD**
- System architecture → **C4 Diagram**
- Object relationships → **Class Diagram**
- State transitions → **State Diagram**
- Project timeline → **Gantt Chart**
**Validation:**
- [ ] Diagram type matches content
- [ ] Complexity appropriate
- [ ] Audience considered
- [ ] Purpose clear
**Output**: Selected diagram type
### Step 2: Flowchart Creation
**Objective**: Create process and decision flow diagrams
**Syntax:**
```mermaid
flowchart TD
Start([Start]) --> Input[/User Input/]
Input --> Validate{Valid?}
Validate -->|Yes| Process[Process Data]
Validate -->|No| Error[Show Error]
Error --> Input
Process --> Save[(Save to DB)]
Save --> Success[/Success Response/]
Success --> End([End])
```
**Node Shapes:**
- `[Rectangle]` - Process step
- `([Rounded])` - Start/End
- `{Diamond}` - Decision
- `[/Parallelogram/]` - Input/Output
- `[(Database)]` - Data storage
- `((Circle))` - Connector
**Direction Options:**
- `TD` - Top to Down
- `LR` - Left to Right
- `BT` - Bottom to Top
- `RL` - Right to Left
**Example - Booking Flow:**
```mermaid
flowchart TD
Start([User Initiates Booking]) --> CheckDates[Check Date Availability]
CheckDates --> Available{Dates Available?}
Available -->|No| ShowError[/Show Unavailable Message/]
ShowError --> End([End])
Available -->|Yes| CreateBooking[Create Pending Booking]
CreateBooking --> Payment[Process Payment]
Payment --> PaymentSuccess{Payment Success?}
PaymentSuccess -->|No| CancelBooking[Cancel Booking]
CancelBooking --> ShowError
PaymentSuccess -->|Yes| ConfirmBooking[Confirm Booking]
ConfirmBooking --> SendEmail[/Send Confirmation Email/]
SendEmail --> SaveDB[(Save to Database)]
SaveDB --> Success[/Show Success/]
Success --> End
```
**Validation:**
- [ ] All paths covered
- [ ] Decision points clear
- [ ] Start and end defined
- [ ] Flow direction logical
**Output**: Process flowchart
### Step 3: Sequence Diagram Creation
**Objective**: Document API interactions and message flows
**Syntax:**
```mermaid
sequenceDiagram
actor User
participant Frontend
participant API
participant DB
participant Payment
User->>Frontend: Click "Book"
Frontend->>API: POST /api/bookings
API->>DB: Check availability
DB-->>API: Available
API->>Payment: Process payment
Payment-->>API: Payment successful
API->>DB: Create booking
DB-->>API: Booking created
API-->>Frontend: 201 Created
Frontend-->>User: Show confirmation
```
**Participant Types:**
- `actor` - Human user
- `participant` - System/Service
- `database` - Database
**Arrow Types:**
- `->` - Solid line (synchronous)
- `-->` - Dotted line (response)
- `->>` - Solid arrow (async message)
- `-->>` - Dotted arrow (async response)
**Example - Authentication Flow:**
```mermaid
sequenceDiagram
actor User
participant Frontend
participant API
participant Clerk
participant DB
User->>Frontend: Enter credentials
Frontend->>Clerk: Login request
Clerk->>Clerk: Validate credentials
alt Credentials valid
Clerk-->>Frontend: JWT token
Frontend->>API: Request with token
API->>Clerk: Verify token
Clerk-->>API: Token valid
API->>DB: Fetch user data
DB-->>API: User data
API-->>Frontend: User session
Frontend-->>User: Logged in
else Credentials invalid
Clerk-->>Frontend: Auth error
Frontend-->>User: Show error
end
```
**Validation:**
- [ ] All participants identified
- [ ] Message flow logical
- [ ] Return messages shown
- [ ] Alt/loop blocks used correctly
**Output**: Sequence diagram
### Step 4: ERD Creation
**Objective**: Document database schema and relationships
**Syntax:**
```mermaid
erDiagram
USER ||--o{ BOOKING : creates
ACCOMMODATION ||--o{ BOOKING : "booked for"
USER {
uuid id PK
string email UK
string name
timestamp created_at
}
BOOKING {
uuid id PK
uuid user_id FK
uuid accommodation_id FK
date check_in
date check_out
enum status
}
ACCOMMODATIONAdd a skill to the project with validation and README generation
Sync root README.md with current skills inventory from skills/ directory
Use this agent when you need to visualize UI concepts through ASCII mockups before implementation. Examples: <example>Context: User has an idea for a dashboard layout with data tables and charts. user: 'I want to create a dashboard that shows user analytics with a sidebar navigation, main content area with charts, and a data table below' assistant: 'I'll use the ascii-ui-mockup-generator agent to create multiple ASCII mockup variations for your dashboard concept.' <commentary>The user wants to visualize a UI concept, so use the ascii-ui-mockup-generator to create multiple ASCII representations they can choose from.</commentary></example> <example>Context: User is designing a form layout with multiple input fields. user: 'I need a contact form with name, email, message fields and a submit button' assistant: 'Let me use the ascii-ui-mockup-generator to create several ASCII mockup options for your contact form layout.' <commentary>Since the user needs to visualize form layouts, use the ascii-ui-mockup-generator to provide multiple ASCII design options.</commentary></example>
codebase-pattern-finder is a useful subagent_type for finding similar implementations, usage examples, or existing patterns that can be modeled after. It will give you concrete code examples based on what you're looking for! It's sorta like codebase-locator, but it will not only tell you the location of files, it will also give you code details!
PROACTIVELY use when reviewing communication drafts or preparing difficult conversations. Provides email refinement, tone calibration, roleplay practice, and presentation feedback with actionable suggestions.
Default agent for handling complex, multi-step tasks with automatic delegation capabilities
Expert UI/UX design critic and advisor who provides research-backed, opinionated feedback on interfaces. Use when you need honest assessment of design decisions, want to avoid generic "AI slop" aesthetics, need evidence-based UX guidance, or want distinctive design direction grounded in actual user behavior research. This agent will push back on bad ideas and cite sources for every recommendation.
Create a detailed implementation plan using Codex 5.2 with high reasoning