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.
npx claudepluginhub crazymeal/claude-architect-marketplace --plugin diagrams-as-codeThis skill is limited to using the following tools:
Create effective architecture visualizations during technical discussions. A good diagram communicates what paragraphs of text cannot -- spatial relationships, boundaries, and flow direction.
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Analyzes competition with Porter's Five Forces, Blue Ocean Strategy, and positioning maps to identify differentiation opportunities and market positioning for startups and pitches.
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.