c4-diagram
Installation
SKILL.md
C4 Diagram
Workflow
- Pick the C4 level — match diagram depth to the question (see table below)
- Choose the tool — Structurizr DSL by default; Mermaid for quick inline previews (see table below)
- Generate the diagram — follow Diagram Rules, then the DSL reference for the chosen tool
- Render — follow the Rendering fallback chain
C4 Level Selector
| Question type | C4 level | Structurizr view type |
|---|---|---|
| "What does this system do?" / "Who uses it?" | Level 1 — Context | systemContext |
| "What are the main services/apps/databases?" | Level 2 — Container | container |
| "How is this service structured internally?" | Level 3 — Component | component |
| "How does this specific class/module work?" | Level 4 — Code | No diagram — Level 4 has no C4 diagram equivalent |
Default to Level 2 (Container) — it covers most "show me the architecture" requests. Level 1 for stakeholder overviews, Level 3 for deep dives into a single service.