Learning Commands · Reference & Visualization
/mermaid command
Interactive Mermaid.js diagram for any topic (23 diagram types)
2 min read
Interactive Mermaid.js diagram for any topic (23 diagram types)
At a glance
| Field | Value |
|---|---|
| Command | /mermaid |
| Usage | `/mermaid [--topic=] [--scope=free |
| Category | reference |
| Execution | server |
| Context | pok |
| Response type | mini-canvas |
| Active PoK required | yes |
Parameters
- topic (optional) — Topic to visualize as a mermaid diagram
Examples
/mermaid
/mermaid --topic=TCP Handshake --type=sequenceDiagram
/mermaid --scope=unit --type=classDiagram
/mermaid --scope=free --topic=OSI Model --type=flowchart
/mermaid --type=erDiagram
/mermaid --type=stateDiagram --topic=HTTP Connection States
How it works
The mermaid command creates interactive Mermaid.js diagrams for your learning content.
Supported diagram types (23):
- flowchart: Decision flows, process steps, branching logic
- sequenceDiagram: Message passing between participants over time
- classDiagram: OOP class structures with relationships
- stateDiagram: State machines with transitions
- erDiagram: Entity-Relationship database schemas
- journey: User journey maps with satisfaction scores
- gantt: Project timeline with tasks and dependencies
- pie: Proportional data visualization
- mindmap: Hierarchical concept maps
- timeline: Chronological events
- gitGraph: Git branching and merge history
- C4Context/C4Container/C4Component/C4Dynamic: C4 architecture model diagrams
- block: Generic block diagrams
- architecture: System architecture layouts
- kanban: Task boards with columns
- requirementDiagram: Requirements and their relationships
- xychart: XY scatter/line charts
- quadrantChart: 2x2 matrix analysis
- sankey: Flow quantity diagrams
- packet: Network packet structure
How it works:
- The AI generates mermaid syntax AND structured node metadata
- Mermaid.js renders the syntax into an interactive SVG diagram
- Click nodes to explore descriptions and answer check questions
- Correct answers mark nodes as completed (green checkmark)
- Complete all nodes to see your results
Options:
- topic: Specific topic to visualize (optional - uses current topic if not specified)
- scope: Content scope -
pok(current topic),unit(entire unit),all(all units),free(any topic) - type: Diagram type (optional - AI chooses the best type if not specified)
Tips:
- Use
--type=sequenceDiagramfor protocol interactions and API flows - Use
--type=classDiagramfor OOP designs and data models - Use
--type=stateDiagramfor state machines and lifecycle flows - Use
--type=erDiagramfor database schema visualization - Use
--type=C4Contextfor high-level system architecture
Was this article helpful?