Create a Mermaid architecture or flow diagram document in docs/system-diagrams tied to a feature, module, or ADR. Use when visualizing system structure or request/data flow.
Create a diagram doc at docs/system-diagrams/[area-or-flow-name].md.
Usage: /diagram auth-login-flow or /diagram project-lifecycle
This skill writes only to docs/system-diagrams/.
Clarify one primary question the diagram should answer:
If scope is broad, produce one main diagram plus a short "Not Covered" section.
Read relevant:
docs/features/)docs/technical/)docs/architecture/) if architecture decisions are involvedUse this template:
# [Area or Flow] Diagram
## Purpose
[What this diagram explains]
## Related Docs
- Feature: [link]
- Technical: [link]
- ADR: [link]
## Diagram
```mermaid
flowchart TD
user[User] --> app[NextApp]
app --> useCase[UseCase]
useCase --> repo[Repository]
repo --> db[(Database)]
```
## Key Notes
- [Non-obvious relationship]
- [Boundary/constraint]
## Not Covered
- [Explicit exclusions]
Before finalizing:
end, graph, subgraphLink diagram to the related feature/technical/ADR docs so it remains discoverable and maintainable.
docs/system-diagrams/[area-or-flow-name].mddocs/system-diagrams/