From sc-skills
Generates Mermaid flowcharts for architecture visualization using semantic shapes and sequence diagrams for interactions with mermaid-ascii compatibility. Validates and explains diagrams.
How this skill is triggered — by the user, by Claude, or both
Slash command
/sc-skills:sc-mermaidThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate mermaid diagrams for architecture visualization and interaction flows.
Generate mermaid diagrams for architecture visualization and interaction flows.
Input: $ARGUMENTS
Parse $ARGUMENTS to determine diagram type:
| Signal | Mode |
|---|---|
flowchart, architecture, system, component relationships | Flowchart |
sequence, flow, interaction, request/response patterns | Sequence |
| Ambiguous | Ask the user or infer from context |
[Rectangle] — services, applications[(Database)] — data stores (PostgreSQL, Redis, OpenSearch)((Circle)) — external services, APIs[[Subroutine]] — modules, workers, background jobs{Rhombus} — decision points, routing logic{{Hexagon}} — gateways, proxies, middleware{descriptive-name}.mmd)mmdc -i <file>.mmd --parseOnly (fix errors if any)mmdc -i <file>.mmd -o preview.png)Generate diagrams compatible with mermaid-ascii for terminal rendering.
Works:
sequenceDiagram # REQUIRED first line
participant A as Alice # aliases (optional)
"Quoted Name" # spaces in names
A->>B: message # solid arrow (colon REQUIRED)
A-->>B: message # dotted arrow (colon REQUIRED)
A->>A: self # self-message (use for notes)
%% comment # ignored by parser
Fails:
A->B: msg # wrong arrow (needs ->>)
A-->B: msg # wrong arrow (needs -->>)
A->>B # missing colon
Note over A # not implemented
loop/alt/opt # not implemented
activate A # not implemented
A->>B: text works, A->>B failsA->>A: (thinking) instead of Note%% Phase 1: or %% alt: if X then Ycat <file> | mermaid-ascii -f -%% Flow: [title]
%% Render: cat <file> | mermaid-ascii -f -
sequenceDiagram
participant A as ActorOne
participant B as ActorTwo
%% Phase 1: [description]
A->>B: request
B-->>A: response
%% Flow: API authentication
%% Render: cat api-auth.mmd | mermaid-ascii -f -
sequenceDiagram
participant C as Client
participant G as Gateway
participant A as Auth
participant S as Service
C->>G: POST /api/data
G->>A: validate token
A-->>G: valid
G->>S: forward request
S-->>G: response
G-->>C: 200 OK
%% alt: invalid token
%% A-->>G: 401
%% G-->>C: 401 Unauthorized
Before saving, ALWAYS test with:
cat <<'EOF' | mermaid-ascii -f -
[your diagram here]
EOF
If it errors, fix the syntax. Common fixes:
A->>B -> A->>B:A->B: -> A->>B:Write diagram to {descriptive-name}.mmd in the current directory (or ask user for location).
Include in the file:
$ARGUMENTS
npx claudepluginhub kylesnowschwartz/simpleclaude --plugin sc-skillsGenerates Mermaid diagrams from text descriptions by analyzing intent to select types like activity, sequence, deployment, architecture, class, ER, or state.
Generates valid Mermaid diagrams from written descriptions using a plan-confirm-generate-review loop. Useful for turning architecture, lifecycle, or flow descriptions into diagrams.
Generates Mermaid diagrams for flowcharts, sequences, states, classes, and architecture using semantic styling, shapes, and visual hierarchy.