Tools & Utilitiessyllr/skills
c4-container-diagram
Draw **container-based layered diagrams** with D2 (d2lang.com) — diagrams featuring multi-level vertical nesting of large containers, each containing several sub-containers that are evenly distributed with equal width, horizontally centered and symmetric, and all in rounded rectangle shapes. Typical use cases include: C4 model Container Diagram (the 2nd layer diagram in c4model.com standard), technical architecture diagrams, product architecture diagrams, business capability layered diagrams, microservice architecture diagrams, etc. **Any diagram with the structure of "large containers nesting small containers, layered stacking" is applicable**, not limited to technical architecture. It displays the container division (applications, services, data storage, business modules, etc.) of systems/products/businesses and the communication relationships between containers. Rendered via Markdown embedded ```d2 code blocks. Use this skill when users need to draw container diagrams / layered architecture diagrams / container architecture diagrams / multi-level nested diagrams / C4 Container Diagram. **Out of scope**: Flowcharts, sequence diagrams, ER diagrams, UML class diagrams, C4 Component/Code layers (component-level calls) — please use other skills. ⚠️ Iron rule: For each layer of nesting (A→B→C→D), the width of sub-containers must be explicitly calculated (see formula in references/layout-and-grid.md; **the only exception: single-column vertical bars do not require setting width**, let ELK automatically wrap and center them). ⚠️ Multi-board diagrams (layers/scenarios/steps) are prohibited.