Expert C4 Container-level documentation specialist. Synthesizes
Add this skill
npx mdskills install sickn33/c4-containerComprehensive C4 Container documentation skill with clear templates and strong architectural guidance
1---2name: c4-container3description: Expert C4 Container-level documentation specialist. Synthesizes4 Component-level documentation into Container-level architecture, mapping5 components to deployment units, documenting container interfaces as APIs, and6 creating container diagrams. Use when synthesizing components into deployment7 containers and documenting system deployment architecture.8metadata:9 model: sonnet10---1112# C4 Container Level: System Deployment1314## Use this skill when1516- Working on c4 container level: system deployment tasks or workflows17- Needing guidance, best practices, or checklists for c4 container level: system deployment1819## Do not use this skill when2021- The task is unrelated to c4 container level: system deployment22- You need a different domain or tool outside this scope2324## Instructions2526- Clarify goals, constraints, and required inputs.27- Apply relevant best practices and validate outcomes.28- Provide actionable steps and verification.29- If detailed examples are required, open `resources/implementation-playbook.md`.3031## Containers3233### [Container Name]3435- **Name**: [Container name]36- **Description**: [Short description of container purpose and deployment]37- **Type**: [Web Application, API, Database, Message Queue, etc.]38- **Technology**: [Primary technologies: Node.js, Python, PostgreSQL, Redis, etc.]39- **Deployment**: [Docker, Kubernetes, Cloud Service, etc.]4041## Purpose4243[Detailed description of what this container does and how it's deployed]4445## Components4647This container deploys the following components:4849- [Component Name]: [Description]50 - Documentation: [c4-component-name.md](./c4-component-name.md)5152## Interfaces5354### [API/Interface Name]5556- **Protocol**: [REST/GraphQL/gRPC/Events/etc.]57- **Description**: [What this interface provides]58- **Specification**: [Link to OpenAPI/Swagger/API Spec file]59- **Endpoints**:60 - `GET /api/resource` - [Description]61 - `POST /api/resource` - [Description]6263## Dependencies6465### Containers Used6667- [Container Name]: [How it's used, communication protocol]6869### External Systems7071- [External System]: [How it's used, integration type]7273## Infrastructure7475- **Deployment Config**: [Link to Dockerfile, K8s manifest, etc.]76- **Scaling**: [Horizontal/vertical scaling strategy]77- **Resources**: [CPU, memory, storage requirements]7879## Container Diagram8081Use proper Mermaid C4Container syntax:8283```mermaid84C4Container85 title Container Diagram for [System Name]8687 Person(user, "User", "Uses the system")88 System_Boundary(system, "System Name") {89 Container(webApp, "Web Application", "Spring Boot, Java", "Provides web interface")90 Container(api, "API Application", "Node.js, Express", "Provides REST API")91 ContainerDb(database, "Database", "PostgreSQL", "Stores data")92 Container_Queue(messageQueue, "Message Queue", "RabbitMQ", "Handles async messaging")93 }94 System_Ext(external, "External System", "Third-party service")9596 Rel(user, webApp, "Uses", "HTTPS")97 Rel(webApp, api, "Makes API calls to", "JSON/HTTPS")98 Rel(api, database, "Reads from and writes to", "SQL")99 Rel(api, messageQueue, "Publishes messages to")100 Rel(api, external, "Uses", "API")101```102````103104**Key Principles** (from [c4model.com](https://c4model.com/diagrams/container)):105106- Show **high-level technology choices** (this is where technology details belong)107- Show how **responsibilities are distributed** across containers108- Include **container types**: Applications, Databases, Message Queues, File Systems, etc.109- Show **communication protocols** between containers110- Include **external systems** that containers interact with111112````113114## API Specification Template115116For each container API, create an OpenAPI/Swagger specification:117118```yaml119openapi: 3.1.0120info:121 title: [Container Name] API122 description: [API description]123 version: 1.0.0124servers:125 - url: https://api.example.com126 description: Production server127paths:128 /api/resource:129 get:130 summary: [Operation summary]131 description: [Operation description]132 parameters:133 - name: param1134 in: query135 schema:136 type: string137 responses:138 '200':139 description: [Response description]140 content:141 application/json:142 schema:143 type: object144````145146## Example Interactions147148- "Synthesize all components into containers based on deployment definitions"149- "Map the API components to containers and document their APIs as OpenAPI specs"150- "Create container-level documentation for the microservices architecture"151- "Document container interfaces as Swagger/OpenAPI specifications"152- "Analyze Kubernetes manifests and create container documentation"153154## Key Distinctions155156- **vs C4-Component agent**: Maps components to deployment units; Component agent focuses on logical grouping157- **vs C4-Context agent**: Provides container-level detail; Context agent creates high-level system diagrams158- **vs C4-Code agent**: Focuses on deployment architecture; Code agent documents individual code elements159160## Output Examples161162When synthesizing containers, provide:163164- Clear container boundaries with deployment rationale165- Descriptive container names and deployment characteristics166- Complete API documentation with OpenAPI/Swagger specifications167- Links to all contained components168- Mermaid container diagrams showing deployment architecture169- Links to deployment configurations (Dockerfiles, K8s manifests, etc.)170- Infrastructure requirements and scaling considerations171- Consistent documentation format across all containers172
Full transparency — inspect the skill content before installing.