From diagrams-as-code
Generate architecture diagrams as code. Use this skill whenever the user discusses system structure, wants to visualize components or flows, creates documentation, or asks for any kind of architecture diagram -- including C4, sequence, activity, ER, or deployment diagrams. Applies C4 thinking to maintain proper abstraction levels.
How this skill is triggered — by the user, by Claude, or both
Slash command
/diagrams-as-code:diagram-generationopusThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create effective architecture visualizations during technical discussions. A good diagram communicates what paragraphs of text cannot -- spatial relationships, boundaries, and flow direction.
Create effective architecture visualizations during technical discussions. A good diagram communicates what paragraphs of text cannot -- spatial relationships, boundaries, and flow direction.
| Discussion Topic | Diagram Type | Format | Why This Type |
|---|---|---|---|
| System scope & external actors | C4 Context | PlantUML | Shows what the system is and who/what it interacts with |
| Tech stack & deployables | C4 Container | PlantUML | Shows the major technical building blocks and how they communicate |
| Internal structure of a container | C4 Component | PlantUML | Shows the components inside a single container |
| "What happens when..." | Sequence | PlantUML/Mermaid | Shows the order of interactions between participants |
| Business process flow | Activity | Mermaid | Shows decision points and parallel paths in a process |
| Entity lifecycle | State | Mermaid | Shows the valid states and transitions for an entity |
| Data structure & relationships | ER/Domain | Mermaid | Shows entities, attributes, and how they relate |
| Infrastructure mapping | Deployment | PlantUML | Shows how containers map to infrastructure |
Use PlantUML for C4 diagrams -- the C4-PlantUML library provides proper stereotypes, boundaries, and legends that Mermaid lacks. Also prefer PlantUML for deployment diagrams where nesting and grouping matter.
Use Mermaid for diagrams in markdown-rendered contexts (GitHub, GitLab READMEs) where PlantUML rendering isn't available, and for simpler diagrams (flowcharts, ER, state) where C4 abstraction levels don't apply.
When in doubt, ask what the user's rendering environment supports.
Read shared/c4-templates.md for PlantUML syntax and templates.
Key principles:
Before finalizing a diagram, verify:
docs/diagrams/ before creating. Update existing diagrams rather than creating parallel versions.npx claudepluginhub crazymeal/claude-architect-marketplace --plugin diagrams-as-codeGenerates Mermaid diagrams for class models, sequences, flowcharts, ERDs, C4 architecture, git graphs, gantt charts to visualize software architecture, flows, databases, and processes.
Generates Mermaid or PlantUML diagrams from natural language, supporting sequence, class, ER, flowchart, C4, and git graphs for visualizing flows, schemas, and architectures.
Provides Mermaid templates for flowcharts, sequence diagrams, class diagrams, ER diagrams, and C4 models for technical documentation.