generate-diagrams
Generate Mermaid flowchart TD diagrams for project call chains, relationships, architectures, and flows. Use when asked to "draw project call chain diagram", "generate relationship diagram", "generate architecture diagram", "draw flow chart", "generate call graph", or "generate dependency relationship diagram".
Generate Diagrams Skill
Description
Generate Mermaid flowchart TD (Top-Down) format diagrams for project relationships, call chains, architectures, and flows.
How It Works
When user requests to generate relationship diagrams, call chains, or architecture diagrams:
-
Analyze code structure: Explore project directory structure, file organization, and dependencies
-
Identify key components: Find major layers (presentation, business, data layers), modules, services, controllers, etc.
-
Analyze call relationships: Read code files to understand component calls and dependencies
-
Generate Mermaid flowchart TD diagram:
flowchart TD %% Use subgraph to organize layers subgraph LayerName ["Layer Name"] NodeA[Node Name] NodeB[Node Name] end %% Define relationships between nodes NodeA -->|Relationship| NodeB NodeB -.->|Dotted relationship| NodeC %% Apply styles (optional) classDef styleName fill:#color,stroke:#borderColor,stroke-width:2px,color:#textColor class NodeA,NodeB styleName -
Common symbols:
-->Solid arrow (direct call/dependency)-.-.->Dotted arrow (indirect relationship/implementation)==>Thick arrow (important relationship)|description|Description text on the linesubgraphSubgraph (for layer organization)classDefDefine style classes
-
Style color suggestions:
- Web/API Layer:
#2196F3(Blue) - Business Logic Layer:
#4CAF50(Green) - Data Access Layer:
#FF9800(Orange) - Database/Storage:
#9C27B0(Purple) - External Systems:
#607D8B(Gray) - Background Tasks:
#E91E63(Pink)
- Web/API Layer:
-
For complex diagrams, split into multiple subgraphs:
- Main architecture diagram
- Typical business flow diagram
- Data flow diagram
- Dependency relationship diagram
-
After generation:
- Provide diagram explanation
- Explain key components and relationships
- Provide detailed text description if needed