
agent-mermaid-diagram-specialist
Diagram specialist agent that produces Mermaid flowcharts, sequence diagrams, ERDs, and architecture visualizations.
- GitHub stars
- 2.7K
What it does
- Adds the
mermaid-diagram-specialistagent for generating Mermaid diagram code from a description of a system or process - Covers flowcharts, sequence diagrams, entity-relationship diagrams, and architecture visualizations in one agent
- Designed for developers who need diagrams embedded in documentation or design notes without leaving Claude Code
Add marketplace
/plugin marketplace add softaworks/agent-toolkitRun it inside Claude Code once, then install the plugin below.
Install
/plugin install agent-mermaid-diagram-specialist@agent-toolkitRun it inside Claude Code after adding the marketplace.
Files
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:
- Flowchart: Decision flows, algorithms, processes
- Sequence Diagram: API interactions, message flows
- ERD: Database schemas, entity relationships
- Class Diagram: Object-oriented design
- State Diagram: State machines, lifecycle
- Gantt Chart: Project timelines, schedules
- C4 Diagram: Architecture at different levels
- Pie/Bar Charts: Data visualization
- Git Graph: Version control flows
- 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:
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 DownLR- Left to RightBT- Bottom to TopRL- Right to Left
Example - Booking Flow:
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:
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 userparticipant- System/Servicedatabase- Database
Arrow Types:
->- Solid line (synchronous)-->- Dotted line (response)->>- Solid arrow (async message)-->>- Dotted arrow (async response)
Example - Authentication Flow:
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:
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
}
ACCOMMODATION {
uuid id PK
string name
text description
decimal price_per_night
}
Relationship Types:
||--||- One to one||--o{- One to many}o--o{- Many to many||--o|- One to zero or one
Cardinality Symbols:
||- Exactly oneo|- Zero or one}o- Zero or more}|- One or more
Example - Full Hospeda ERD:
erDiagram
USER ||--o{ BOOKING : creates
USER ||--o{ REVIEW : writes
USER ||--o{ ACCOMMODATION : owns
ACCOMMODATION ||--o{ BOOKING : "has bookings"
ACCOMMODATION ||--o{ REVIEW : "has reviews"
ACCOMMODATION }o--o{ AMENITY : includes
BOOKING ||--|| PAYMENT : "has payment"
USER {
uuid id PK
string clerk_id UK
string email UK
string name
enum role
timestamp created_at
}
ACCOMMODATION {
uuid id PK
uuid owner_id FK
string name
text description
decimal price_per_night
int max_guests
enum status
}
BOOKING {
uuid id PK
uuid user_id FK
uuid accommodation_id FK
date check_in
date check_out
int guests
enum status
decimal total_price
}
REVIEW {
uuid id PK
uuid user_id FK
uuid accommodation_id FK
int rating
text comment
timestamp created_at
}
PAYMENT {
uuid id PK
uuid booking_id FK
string mercadopago_id UK
decimal amount
enum status
timestamp processed_at
}
AMENITY {
uuid id PK
string name
string icon
}
Validation:
- All entities defined
- Relationships accurate
- Cardinality correct
- Primary/Foreign keys marked
Output: ERD diagram
Step 5: C4 Architecture Diagrams
Objective: Document system architecture at different levels
Context Level (System in environment):
C4Context
title System Context - Hospeda Platform
Person(guest, "Guest", "Tourist looking for accommodation")
Person(owner, "Owner", "Accommodation owner")
System(hospeda, "Hospeda Platform", "Tourism booking platform")
System_Ext(clerk, "Clerk", "Authentication provider")
System_Ext(mercadopago, "Mercado Pago", "Payment processor")
System_Ext(email, "Email Service", "Transactional emails")
Rel(guest, hospeda, "Searches and books", "HTTPS")
Rel(owner, hospeda, "Manages listings", "HTTPS")
Rel(hospeda, clerk, "Authenticates users", "API")
Rel(hospeda, mercadopago, "Processes payments", "API")
Rel(hospeda, email, "Sends notifications", "SMTP")
Container Level (Applications and data stores):
C4Container
title Container - Hospeda Platform
Person(user, "User")
Container(web, "Web App", "Astro + React", "Public-facing website")
Container(admin, "Admin Panel", "TanStack Start", "Management interface")
Container(api, "API", "Hono", "Backend services")
ContainerDb(db, "Database", "PostgreSQL", "Stores all data")
Rel(user, web, "Uses", "HTTPS")
Rel(user, admin, "Manages", "HTTPS")
Rel(web, api, "Calls", "JSON/HTTPS")
Rel(admin, api, "Calls", "JSON/HTTPS")
Rel(api, db, "Reads/Writes", "SQL")
Component Level (Internal structure):
C4Component
title Components - API Application
Container(api, "API", "Hono")
Component(routes, "Routes", "Hono Router", "HTTP endpoints")
Component(services, "Services", "Business Logic", "Domain operations")
Component(models, "Models", "Data Access", "DB operations")
Component(middleware, "Middleware", "Cross-cutting", "Auth, logging, errors")
Rel(routes, middleware, "Uses")
Rel(routes, services, "Calls")
Rel(services, models, "Uses")
Rel(models, db, "Queries")
Validation:
- Appropriate level selected
- All systems/containers shown
- Relationships clear
- External systems identified
Output: C4 architecture diagrams
Step 6: State Diagram Creation
Objective: Document state machines and lifecycles
Syntax:
stateDiagram-v2
[*] --> Pending
Pending --> Confirmed : Payment Success
Pending --> Cancelled : Payment Failed
Pending --> Cancelled : User Cancels
Confirmed --> CheckedIn : Check-in Date
Confirmed --> Cancelled : Cancellation Request
CheckedIn --> CheckedOut : Check-out Date
CheckedOut --> Reviewed : User Submits Review
CheckedOut --> [*] : 30 Days Elapsed
Reviewed --> [*]
Cancelled --> [*]
Example - Booking Lifecycle:
stateDiagram-v2
[*] --> Draft : Create Booking
state "Pending Payment" as Pending
state "Payment Processing" as Processing
Draft --> Pending : Submit Booking
Pending --> Processing : Initiate Payment
Processing --> Confirmed : Payment Approved
Processing --> PaymentFailed : Payment Declined
PaymentFailed --> Pending : Retry Payment
PaymentFailed --> Cancelled : Max Retries
Confirmed --> Active : Check-in Date Reached
Active --> Completed : Check-out Date Reached
Confirmed --> CancelRequested : Cancellation Request
CancelRequested --> RefundProcessing : Approve Cancellation
RefundProcessing --> Cancelled : Refund Complete
Completed --> [*]
Cancelled --> [*]
note right of Confirmed
Owner notified
Calendar blocked
end note
note right of Completed
Review requested
Payment released
end note
Validation:
- All states defined
- Transitions logical
- Start/end states marked
- Notes explain key states
Output: State diagram
Step 7: Styling and Customization
Objective: Apply consistent styling to diagrams
Theme Application:
%%{init: {'theme':'base', 'themeVariables': {
'primaryColor':'#3B82F6',
'primaryTextColor':'#fff',
'primaryBorderColor':'#2563EB',
'lineColor':'#6B7280',
'secondaryColor':'#10B981',
'tertiaryColor':'#F59E0B'
}}}%%
flowchart TD
A[Start] --> B[Process]
B --> C[End]
Class Styling:
flowchart TD
A[Normal] --> B[Success]
B --> C[Error]
classDef successClass fill:#10B981,stroke:#059669,color:#fff
classDef errorClass fill:#EF4444,stroke:#DC2626,color:#fff
class B successClass
class C errorClass
Validation:
- Colors match brand
- Contrast sufficient
- Styling consistent
- Readable in both themes
Output: Styled diagrams
Output
Produces:
- Mermaid diagram code in markdown
- Multiple diagram types as needed
- Styled and themed diagrams
- Documentation-ready visualizations
Success Criteria:
- Diagram accurately represents system
- All elements properly labeled
- Relationships clear and correct
- Styling consistent with brand
- Renders correctly in markdown
Best Practices
- Simplicity: Keep diagrams focused and uncluttered
- Labels: Clear, descriptive labels for all elements
- Direction: Consistent flow direction (usually top-down or left-right)
- Grouping: Use subgraphs to group related elements
- Colors: Use color to highlight important elements
- Notes: Add notes to explain complex logic
- Levels: Use appropriate abstraction level for audience
- Updates: Keep diagrams in sync with code
- Comments: Add comments in mermaid code for maintainability
- Testing: Verify diagrams render in target platform
Common Patterns
API Request Flow
sequenceDiagram
Client->>+API: GET /resource
API->>+Service: fetchResource()
Service->>+Model: findById()
Model->>+DB: SELECT query
DB-->>-Model: Row data
Model-->>-Service: Entity
Service-->>-API: DTO
API-->>-Client: JSON response
Error Handling Flow
flowchart TD
Request[Incoming Request] --> Validate{Valid?}
Validate -->|No| ValidationError[Validation Error]
ValidationError --> ErrorHandler[Error Handler]
Validate -->|Yes| Process[Process Request]
Process --> DB{DB Success?}
DB -->|No| DBError[Database Error]
DBError --> ErrorHandler
DB -->|Yes| Success[Success Response]
ErrorHandler --> LogError[Log Error]
LogError --> ErrorResponse[Error Response]
Notes
- Mermaid renders in GitHub, GitLab, Notion, and most markdown viewers
- Live editor available at mermaid.live
- Maximum complexity: Keep under 20 nodes for readability
- Use subgraphs for grouping related nodes
- Test rendering in target platform before committing
- Keep diagram source in markdown files, not images
- Version control diagrams with code
- Update diagrams during code review
From the softaworks/agent-toolkit README
Softaworks Agent Skills
Opinionated skills shared by @leonardocouy for improving daily work efficiency with Claude Code. Skills are packaged instructions and scripts that extend agent capabilities across development, documentation, planning, and professional workflows.
Skills follow the Agent Skills format.
🧭 Quick Navigation
🚀 Installation • 📚 Available Skills • 🤖 Agents & Commands • 📖 Skill Structure • 🤝 Contributing • 📄 License • 🔗 Links
🚀 Installation
Quick Install (Recommended)
npx skills add softaworks/agent-toolkit
This method works with multiple AI coding agents (Claude Code, Codex, Cursor, AdaL, etc.)
Register as Plugin Marketplace
Run the following commands in Claude Code:
/plugin marketplace add softaworks/agent-toolkit
/plugin
Install Plugins
Option 1: Via Browse UI
- Switch to Marketplaces tab (use arrow keys or Tab)
- Select agent-toolkit, press Enter
- Browse and select the plugin(s) you want to install
- Select Install now
Option 2: Direct Install
# Install specific skill
/plugin install codex@agent-toolkit
/plugin install humanizer@agent-toolkit
# Install specific agent
/plugin install agent-codebase-pattern-finder@agent-toolkit
# Install specific command
/plugin install command-codex-plan@agent-toolkit
Option 3: Ask the Agent
Simply tell Claude Code:
Please install Skills from github.com/softaworks/agent-toolkit
Available Plugins
Each skill, agent, and command is an individual plugin that can be installed separately:
- Skills → See Available Skills for the full list
- Agents → See Agents (install as
agent-<name>@agent-toolkit) - Commands → See Slash Commands (install as
command-<name>@agent-toolkit)
Update Plugins
To update plugins to the latest version:
- Run
/pluginin Claude Code - Switch to Marketplaces tab
- Select agent-toolkit
- Choose Update marketplace
You can also Enable auto-update to get the latest versions automatically.
Manual Installation
For Claude Code (Manual) — Skills only
cp -r skills/<skill-name> ~/.claude/skills/
For claude.ai — Skills only
Add skills to project knowledge or paste SKILL.md contents into the conversation.
📚 Available Skills
| Category | Skill | Description |
|---|---|---|
| 🤖 AI Tools | codex | Advanced code analysis with GPT-5.2 |
| 🤖 AI Tools | gemini | Large-scale review (200k+ context) |
| 🤖 AI Tools | perplexity | Web search & research |
| 🔮 Meta | agent-md-refactor | Refactor bloated agent instruction files |
| 🔮 Meta | command-creator | Create Claude Code slash commands |
| 🔮 Meta | plugin-forge | Build Claude Code plugins & manifests |
| 🔮 Meta | skill-judge | Evaluate skill design quality |
| 📝 Documentation | backend-to-frontend-handoff-docs | API handoff docs for frontend |
| 📝 Documentation | c4-architecture | C4 architecture diagrams with Mermaid |
| 📝 Documentation | crafting-effective-readmes | Write effective README files |
| 📝 Documentation | draw-io | Create & edit draw.io diagrams |
| 📝 Documentation | excalidraw | Work with Excalidraw diagrams |
| 📝 Documentation | frontend-to-backend-requirements | Document API requirements |
| 📝 Documentation | marp-slide | Professional presentation slides |
| 📝 Documentation | mermaid-diagrams | Software diagrams with Mermaid |
| 📝 Documentation | writing-clearly-and-concisely | Clear, professional writing |
| 🎨 Design & Frontend | design-system-starter | Create design systems |
| 🎨 Design & Frontend | mui | Material-UI v7 patterns |
| 🎨 Design & Frontend | openapi-to-typescript | Convert OpenAPI to TypeScript |
| 🎨 Design & Frontend | react-dev | Type-safe React 18-19 with TypeScript |
| 🎨 Design & Frontend | react-useeffect | React useEffect best practices |
| 🛠️ Development | database-schema-designer | Design robust database schemas |
| 🛠️ Development | dependency-updater | Smart dependency management |
| 🛠️ Development | naming-analyzer | Suggest better variable/function names |
| 🛠️ Development | lesson-learned | Extract SE lessons from recent code changes |
| 🛠️ Development | reducing-entropy | Minimize codebase size |
| 🛠️ Development | session-handoff | Seamless AI session transfers |
| 🎯 Planning | game-changing-features | Find 10x product opportunities |
| 🎯 Planning | gepetto | Detailed implementation planning |
| 🎯 Planning | requirements-clarity | Clarify requirements before coding |
| 🎯 Planning | ship-learn-next | Turn learning into actionable reps |
| 👔 Professional | daily-meeting-update | Interactive daily standup generator |
| 👔 Professional | difficult-workplace-conversations | Navigate difficult conversations |
| 👔 Professional | feedback-mastery | Deliver constructive feedback |
| 👔 Professional | professional-communication | Technical communication guide |
| 🧪 Testing | qa-test-planner | Comprehensive QA test planning |
| 📦 Git | commit-work | High-quality git commits |
| 🔧 Utilities | datadog-cli | Debug with Datadog logs & metrics |
| 🔧 Utilities | domain-name-brainstormer | Generate & check domain names |
| 🔧 Utilities | humanizer | Remove AI writing patterns |
| 🔧 Utilities | meme-factory | Generate memes with API |
| 🔧 Utilities | jira | Natural language Jira interaction |
| 🔧 Utilities | web-to-markdown | Convert webpages to Markdown |
🤖 Agents & Commands
Requires Claude Code CLI — These agents and commands are exclusive to Claude Code users.
For full access, add the marketplace and install plugins:
/plugin marketplace add softaworks/agent-toolkit /plugin install codex@agent-toolkit
Agents
Specialized sub-agents that Claude Code can delegate tasks to:
| Agent | Description |
|---|---|
| ascii-ui-mockup-generator | Visualize UI concepts through ASCII mockups |
| codebase-pattern-finder | Find similar implementations and patterns |
| communication-excellence-coach | Email refinement, tone calibration, roleplay |
| general-purpose | Default agent for complex multi-step tasks |
| mermaid-diagram-specialist | Create flowcharts, sequence diagrams, ERDs |
| ui-ux-designer | Research-backed UI/UX design feedback |
Slash Commands
Reusable workflows invoked with /command-name:
| Command | Description |
|---|---|
/codex-plan | Create implementation plans using Codex 5.2 |
/compose-email | Draft professional emails |
/explain-changes-mental-model | Build mental model of code changes |
/explain-pr-changes | Generate PR summaries |
/sync-branch | Sync feature branch with main |
/sync-skills-readme | Update README skills table |
/viral-tweet | Optimize tweet ideas for X engagement |
📖 Skill Structure
Each skill contains:
SKILL.md- Detailed instructions for the agent (with YAML frontmatter)README.md- User-friendly documentation with examplesscripts/- Helper scripts for automation (optional)references/- Supporting documentation (optional)
🤝 Contributing
Contributions are welcome! When adding new skills:
- Follow the Agent Skills format
- Include both
SKILL.md(for agents) andREADME.md(for users) - Add YAML frontmatter to
SKILL.mdwithname:anddescription:fields - Update this README.md with a link to your skill
📄 License
MIT
🔗 Links
Details
- Marketplace
- softaworks/agent-toolkit
- Source
- dist/plugins/agent-mermaid-diagram-specialist
- Category
- Agents
- Keywords
- agents, mermaid, diagrams, visualization
- Listed since
- Apr 6, 2026
More from softaworks/agent-toolkit
All 56- agent-ui-ux-designer
- backend-to-frontend-handoff-docs
- c4-architecture
- codex
- command-codex-plan
- command-compose-email
- command-creator
- command-explain-changes-mental-model
- command-explain-pr-changes
- command-sync-branch
- command-sync-skills-readme
- command-viral-tweet
- commit-work
- crafting-effective-readmes
- daily-meeting-update
- database-schema-designer
- datadog-cli
- dependency-updater
- design-system-starter
- difficult-workplace-conversations
- domain-name-brainstormer
- draw-io
- excalidraw
- feedback-mastery
Similar to agent-mermaid-diagram-specialist
More Technical Documentation
mermaid-diagram-specialistSkilldavila7/claude-code-templates1.4K installsMermaid diagram specialist that produces flowcharts, sequence diagrams, ERDs, and architecture views for technical docs.
mermaid-expertSkillsickn33/agentic-awesome-skills355 installsMermaid diagram specialist that creates flowcharts, sequence diagrams, ERDs, state diagrams, and architecture visuals.
mermaid-diagramsPluginmahidalhan/claude-hacks34 starsGenerate publication-quality Mermaid diagrams for flowcharts, sequences, ERDs, and more.
draw.ioMCP serverjgraph5.9K starsCreate and display interactive draw.io diagrams from Mermaid or draw.io XML, with 10,000+ library shapes.
mermaidPluginchujianyun/skills756 starsMermaid 图绘制助手。适用于用户明确要求绘制 Mermaid 图,或提到流程图、架构图、时序图、状态图、甘特图、ER 图、用户旅程图、类图,并希望直接输出 Mermaid 代码块时使用。会先判断最合适的图类型,再生成可渲染、结构清晰的 Mermaid 代码。
visual-storytellerPluginananddtyagi/cc-marketplace689 starsUse this agent when creating visual narratives, designing infographics, building presentations, or communicating complex ideas through imagery. This agent speci