spillwavesolutions/agent_rulez/design-doc-mermaid

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Create Mermaid diagrams (activity, deployment, sequence, architecture) from text descriptions or source code. Use when asked to "create a diagram", "generate mermaid", "document architecture", "code to diagram", "create design doc", or "convert code to diagram". Supports hierarchical on-demand guide loading, Unicode semantic symbols, and Python utilities for diagram extraction and image conversion.

Install

npx vskill@latest install spillwavesolutions/agent_rulez/design-doc-mermaid

SKILL.md

Mermaid Architect - Hierarchical Diagram and Documentation Skill

Mermaid diagram and documentation system with specialized guides and code-to-diagram capabilities.

Table of Contents

Decision Tree

How this skill works:

  1. User makes a request → Skill analyzes intent
  2. Skill determines diagram/document type → Loads appropriate guide(s)
  3. AI reads specialized guide → Generates diagram/document using templates
  4. Result delivered → With validation and export options

User Intent Analysis:

mermaid
flowchart TD
Start([User Request]) --> Analyze{Analyze Intent}
Analyze -->|"workflow, process, business logic"| Activity[Load Activity Diagram Guide<br/>references/guides/diagrams/activity-diagrams.md]
Analyze -->|"infrastructure, deployment, cloud"| Deploy[Load Deployment Diagram Guide<br/>references/guides/diagrams/deployment-diagrams.md]
Analyze -->|"system architecture, components"| Arch[Load Architecture Guide<br/>references/guides/diagrams/architecture-diagrams.md]
Analyze -->|"API flow, interactions"| Sequence[Load Sequence Diagram Guide<br/>references/guides/diagrams/sequence-diagrams.md]
Analyze -->|"code to diagram"| CodeToDiag[Load Code-to-Diagram Guide<br/>references/guides/code-to-diagram/ + examples/]
Analyze -->|"design document, full docs"| DesignDoc[Load Design Document Template<br/>assets/*-design-template.md]
Analyze -->|"unicode symbols, icons"| Unicode[Load Unicode Symbols Guide<br/>references/guides/unicode-symbols/guide.md]
Analyze -->|"extract, validate, convert"| Scripts[Use Python Scripts<br/>scripts/extract_mermaid.py<br/>scripts/mermaid_to_image.py]
Activity --> Generate[Generate Diagram]
Deploy --> Generate
Arch --> Generate
Sequence --> Generate
CodeToDiag --> Generate
DesignDoc --> Generate
Unicode --> Generate
Scripts --> Execute[Execute Script]
Generate --> Validate{Validate?}
Validate -->|Yes| RunValidation[Run mmdc validation]
Validate -->|No| Output
RunValidation --> Output[Output Result]
Execute --> Output
classDef decision fill:#FFD700,stroke:#333,stroke-width:2px,color:black
classDef guide fill:#90EE90,stroke:#333,stroke-width:2px,color:darkgreen
classDef action fill:#87CEEB,stroke:#333,stroke-width:2px,color:darkblue
class Analyze,Validate decision
class Activity,Deploy,Arch,Sequence,CodeToDiag,DesignDoc,Unicode,Scripts guide
class Generate,Execute,RunValidation,Output action

Available Guides and Resources

Diagram Type Guides (references/guides/diagrams/)
GuideFull PathLoad When User WantsExamples
Activity Diagramsreferences/guides/diagrams/activity-diagrams.mdWorkflows, processes, business logic, user flows, decision trees"Show checkout flow", "Document ETL pipeline", "Create approval workflow"
Deployment Diagramsreferences/guides/diagrams/deployment-diagrams.mdInfrastructure, cloud architecture, K8s, serverless, network topology"Show AWS architecture", "Document GCP deployment", "Create K8s diagram"
Architecture Diagramsreferences/guides/diagrams/architecture-diagrams.mdSystem architecture, component design, high-level structure"Show system components", "Document microservices", "Architecture overview"
Sequence Diagramsreferences/guides/diagrams/sequence-diagrams.mdAPI interactions, service communication, request/response flows"Show API call sequence", "Document auth flow", "Service interactions"
Code-to-Diagram Guide & Examples
ResourceFull PathWhat It Provides
Master Guidereferences/guides/code-to-diagram/README.mdComplete workflow for analyzing any codebase and extracting diagrams
Spring Bootexamples/spring-boot/README.mdController→Service→Repository architecture, deployment config, sequence from methods, activity from business logic
FastAPIexamples/fastapi/README.mdPython async patterns, Pydantic models, dependency injection, cloud deployment
Reactexamples/react/README.mdComponent hierarchy, state management, data flow, build pipeline
Python ETLexamples/python-etl/README.mdData pipeline, transformation steps, error handling, scheduling
Node/Expressexamples/node-webapp/README.mdMiddleware chain, route handlers, async patterns, deployment
Java Web Appexamples/java-webapp/README.mdTraditional MVC, servlet containers, WAR deployment
Design Document Templates
TemplateFull PathUse ForLoad When
Architecture Designassets/architecture-design-template.mdSystem-wide architecture"Create architecture doc", "Document system design"
API Designassets/api-design-template.mdAPI specifications"API design doc", "Document REST API"
Feature Designassets/feature-design-template.mdFeature planning"Feature design", "Plan new feature"
Database Designassets/database-design-template.mdDatabase schema"Database design", "Document schema"
System Designassets/system-design-template.mdComplete system"System design doc", "Full system documentation"
Unicode Symbols Guide

Full Path: references/guides/unicode-symbols/guide.md

Load when user mentions: "unicode symbols", "emoji in diagrams", "semantic icons", "add symbols"

Quick Reference:

  • 📦 Infrastructure: ☁️ 🌐 🔌 📡 🗄️
  • ⚙️ Compute: ⚙️ ⚡ 🔄 ♻️ 🚀 💨
  • 💾 Data: 💾 📦 📊 📈 🗃️ 🧊
  • 📨 Messaging: 📨 📬 📤 📥 🐰 📢
  • 🔐 Security: 🔐 🔑 🛡️ 🚪 👤 🎫
  • 📝 Monitoring: 📝 📊 🚨 ⚠️ ✅ ❌
Python Scripts (scripts/)
ScriptUse ForLoad When
extract_mermaid.pyExtract diagrams from Markdown, validate syntax, replace with images"extract diagrams", "validate mermaid", "find all diagrams"
mermaid_to_image.pyConvert .mmd to PNG/SVG, batch conversion, custom themes"convert to image", "render diagram", "create PNG"
resilient_diagram.pyFull workflow: save .mmd, generate image, validate, error recovery"generate diagram", "create diagram with validation", "resilient diagram"

Usage Patterns

Common request patterns and guide selection. See When to Use What for complete mapping.

PatternExample RequestGuides to Load
Single Diagram"Create activity diagram for login flow"Diagram type guide + Unicode symbols
Code-to-Diagram"Generate deployment from application.yml"Framework example + Deployment guide
Design Document"Create API design document"Template from assets/ + Relevant diagram guides
Extract/Validate"Extract diagrams from design.md"Use scripts/extract_mermaid.py
Batch Convert"Convert all .mmd to PNG"Use scripts/mermaid_to_image.py

Resilient Workflow

CRITICAL: This is the recommended approach for ALL diagram generation. It ensures validation, error recovery, and consistent file organization.

Full Guide: references/guides/resilient-workflow.md

Workflow Overview
mermaid
flowchart LR
A[1. Identify Type] --> B[2. Save .mmd + Image]
B --> C{3. Valid?}
C -->|Yes| D[4. Add to Markdown]
C -->|No| E[5. Error Recovery]
E --> F{Fix Found?}
F -->|Yes| A
F -->|No| G[Search External]
G --> A
classDef step fill:#90EE90,stroke:#333,color:darkgreen
classDef decision fill:#FFD700,stroke:#333,color:black
class A,B,D,E,G step
class C,F decision
Key Principle

NEVER add a diagram to markdown until it passes validation. This prevents broken diagrams in documentation.

Using the Script (Recommended)
bash
# Generate with full error recovery
python scripts/resilient_diagram.py \
--code "flowchart TD; A-->B" \
--markdown-file design_doc \
--diagram-num 1 \
--title "process_flow" \
--format png \
--json

Output: Both .mmd and .png files in ./diagrams/ directory.

File Naming Convention
./diagrams/<markdown_file>_<num>_<type>_<title>.mmd
./diagrams/<markdown_file>_<num>_<type>_<title>.png

Example: ./diagrams/api_design_01_sequence_auth_flow.png

Error Recovery Priority

When validation fails, the workflow automatically:

  1. Check troubleshooting guide - references/guides/troubleshooting.md (28 documented errors)
  2. Search with perplexity - perplexity_ask MCP for syntax questions
  3. Search with brave - brave_web_search MCP for recent solutions
  4. Ask gemini - gemini skill for alternative perspective
  5. General search - WebSearch tool as fallback
Manual Fallback Steps

If the script is unavailable:

  1. Identify diagram type from first line (flowchart, sequence, etc.)
  2. Load reference guide from references/guides/diagrams/
  3. Save to ./diagrams/<markdown_file>_<num>_<type>_<title>.mmd
  4. Validate: mmdc -i file.mmd -o file.png -b transparent
  5. On error: Search references/guides/troubleshooting.md for matching error
  6. If not found: Use search tools in priority order above
  7. Add reference: ![Description](./diagrams/filename.png)
Pattern 6: Resilient Diagram Generation

User: "Create a sequence diagram and add it to the design doc"

Skill Actions:

  1. Identify intent: diagram generation + markdown integration
  2. Load workflow guide: references/guides/resilient-workflow.md
  3. Identify diagram type: sequence
  4. Load diagram guide: references/guides/diagrams/sequence-diagrams.md
  5. Generate Mermaid code using templates
  6. Execute resilient workflow:

``bash python scripts/resilient_diagram.py \ --code "[generated code]" \ --markdown-file design_doc \ --diagram-num 1 \ --title "api_sequence" \ --json ``

  1. If validation fails → Apply troubleshooting fix → Retry
  2. On success → Add ![API Sequence](./diagrams/design_doc_01_sequence_api_sequence.png) to markdown

Unicode Semantic Symbols

Always use Unicode symbols to enhance diagram clarity. Common patterns:

Infrastructure & Deployment
mermaid
graph TB
Client[👤 User] --> LB[🌐 Load Balancer]
LB --> App1[⚙️ App Server 1]
LB --> App2[⚙️ App Server 2]
App1 --> DB[(💾 Database)]
App1 --> Cache[(⚡ Redis)]
Activity Flow with States
mermaid
flowchart TD
Start([🚀 Start]) --> Process[⚙️ Process Data]
Process --> Check{✓ Valid?}
Check -->|Yes| Save[💾 Save]
Check -->|No| Error[❌ Error]
Save --> Complete([✅ Complete])
Microservices Architecture
mermaid
graph TB
API[🌐 API Gateway] --> Auth[🔐 Auth Service]
API --> Orders[📋 Order Service]
Orders --> Queue[📬 Message Queue]
Queue --> Worker[⚙️ Background Worker]
Worker --> Storage[📦 Object Storage]

For complete symbol reference, load: references/guides/unicode-symbols/guide.md

Python Utilities

Extract Mermaid Diagrams
bash
# List all diagrams
python scripts/extract_mermaid.py document.md --list-only
# Extract to separate files
python scripts/extract_mermaid.py document.md --output-dir diagrams/

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
34
Repository forks
8
7-day trend score
18

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 25 Mar 2026, 7 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/spillwavesolutions/agent_rulez/design-doc-mermaid/badge)](https://verified-skill.com/skills/spillwavesolutions/agent_rulez/design-doc-mermaid)

Something wrong with this skill or its page? Tell us.