/diagram
Generate Mermaid diagrams from codebase analysis or description.
$ npx -y skills add rohitg00/awesome-claude-code-toolkit --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/diagram
Context preview
What this command does when you run it.
Generate Mermaid diagrams from codebase analysis or description.
Command definition
diagram.mdGenerate Mermaid diagrams from codebase analysis or description.
Steps
1. Determine the diagram type from the argument or context:
- `flowchart` - Process flows, request handling, business logic.
- `sequenceDiagram` - API call sequences, service interactions.
- `classDiagram` - Module structure, class relationships.
- `erDiagram` - Database schema, entity relationships.
- `graph` - Dependency trees, module relationships.
- `stateDiagram-v2` - State machines, workflow states.
2. If generating from code:
- Scan imports and exports to map module dependencies.
- Read route definitions for sequence diagrams.
- Parse database schemas for ER diagrams.
- Analyze class hierarchies for class diagrams.
3. If generating from description, parse the user's requirements. 4. Build the Mermaid syntax with proper relationships and labels. 5. Write the diagram to a markdown file or embed in an existing doc. 6. Validate the syntax is correct Mermaid that will render properly.
Format
```mermaid
<diagram-type>
<nodes and relationships>
## Rules
- Keep diagrams focused; split large systems into multiple diagrams.
- Use descriptive labels on all edges and nodes.
- Limit diagrams to 20 nodes maximum for readability.
- Use consistent naming conventions matching the codebase.
- Add a brief text description above each diagram explaining what it shows.
- Use subgraphs to group related components.
Read more
Generate Mermaid diagrams from codebase analysis or description.
Steps
1. Determine the diagram type from the argument or context:
- `flowchart` - Process flows, request handling, business logic.
- `sequenceDiagram` - API call sequences, service interactions.
- `classDiagram` - Module structure, class relationships.
- `erDiagram` - Database schema, entity relationships.
- `graph` - Dependency trees, module relationships.
- `stateDiagram-v2` - State machines, workflow states.
2. If generating from code:
- Scan imports and exports to map module dependencies.
- Read route definitions for sequence diagrams.
- Parse database schemas for ER diagrams.
- Analyze class hierarchies for class diagrams.
3. If generating from description, parse the user's requirements. 4. Build the Mermaid syntax with proper relationships and labels. 5. Write the diagram to a markdown file or embed in an existing doc. 6. Validate the syntax is correct Mermaid that will render properly.
Format
```mermaid
<diagram-type>
<nodes and relationships>## Rules - Keep diagrams focused; split large systems into multiple diagrams. - Use descriptive labels on all edges and nodes. - Limit diagrams to 20 nodes maximum for readability. - Use consistent naming conventions matching the codebase. - Add a brief text description above each diagram explaining what it shows. - Use subgraphs to group related components.
The most comprehensive toolkit for Claude Code -- 135 agents, 35 curated skills (+400,000 via SkillKit), 42 commands, 176+ plugins, 20 hooks, 15 rules, 7 templates, 15 MCP configs, 26 companion apps, 53 ecosystem entries, and more.
Repo: rohitg00/awesome-claude-code-toolkit
Other commands on rohitg00-claude-code-toolkit.
- /adr
Write an Architecture Decision Record documenting a significant technical decision.
Open command - /design-review
Conduct a structured design review of a module, feature, or system component.
Open command - /migrate
Plan and execute a framework or library migration incrementally.
Open command - /plan
Create a structured implementation plan for the requested feature or change.
Open command - /refactor
Perform a systematic refactoring of the specified code area.
Open command - /ci-pipeline
Generate a CI pipeline configuration for GitHub Actions.
Open command

