plugins/sc-skills/skills/sc-mermaid/SKILL.md
Generate mermaid diagrams — flowcharts for architecture, sequence diagrams for interactions. This skill SHOULD be used when the user asks to "create a diagram", "draw an architecture diagram", "sequence diagram", "flowchart", "visualize the system", or "generate mermaid".
npx skillsauth add kylesnowschwartz/simpleclaude sc-mermaidInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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
testing
Use when writing or editing a Slack message, email, pull request body, GitHub issue, Reddit post, agenda, or doc. Enforces a direct, warm, unfilled tone and removes AI tells. Always scores the final draft and runs a self-audit pass before delivery.
development
Reframe code design through functional programming principles for agent-assisted development. This skill SHOULD be used when the user says "think functional", "think FP", "make this pure", "separate effects", "where should this side effect go", "this function does too much", "how should I structure this for agents", "make this easier to review", "reduce context needed", or when planning module structure, store design, or code that agents will write and humans will review. Applies FP discipline within any language to maximize agent effectiveness and human reviewability.
development
Use when the user is clarifying beliefs, assumptions, goals, or framing before committing to decision or plan.
testing
Audit and improve project memory files (CLAUDE.md, AGENTS.md, .claude.local.md) — assess against a quality rubric, then apply additions and removals. This skill SHOULD be used when the user asks to audit, improve, edit, fix, tighten, rewrite, or update a memory file, or to check whether one is too long, stale, or bloated.