C4 Container Level: System Deployment
Selective Reading Rule
Start with:
references/senior-master-standard.md
references/usage-routing.md
references/quality-checklist.md
Then load only the inherited docs, scripts, assets, or examples that match the user's actual task.
Use this skill when
- Working on c4 container level: system deployment tasks or workflows
- Needing guidance, best practices, or checklists for c4 container level: system deployment
Do not use this skill when
- The task is unrelated to c4 container level: system deployment
- You need a different domain or tool outside this scope
Instructions
- Clarify goals, constraints, and required inputs.
- Apply relevant best practices and validate outcomes.
- Provide actionable steps and verification.
- If detailed examples are required, open
resources/implementation-playbook.md.
Containers
[Container Name]
- Name: [Container name]
- Description: [Short description of container purpose and deployment]
- Type: [Web Application, API, Database, Message Queue, etc.]
- Technology: [Primary technologies: Node.js, Python, PostgreSQL, Redis, etc.]
- Deployment: [Docker, Kubernetes, Cloud Service, etc.]
Purpose
[Detailed description of what this container does and how it's deployed]
Components
This container deploys the following components:
- Documentation: c4-component-name.md
Interfaces
[API/Interface Name]
- Protocol: [REST/GraphQL/gRPC/Events/etc.]
- Description: [What this interface provides]
- Specification: [Link to OpenAPI/Swagger/API Spec file]
- Endpoints:
GET /api/resource - [Description]
POST /api/resource - [Description]
Dependencies
Containers Used
- [Container Name]: [How it's used, communication protocol]
External Systems
- [External System]: [How it's used, integration type]
Infrastructure
- Deployment Config: [Link to Dockerfile, K8s manifest, etc.]
- Scaling: [Horizontal/vertical scaling strategy]
- Resources: [CPU, memory, storage requirements]
Container Diagram
Use proper Mermaid C4Container syntax:
C4Container
title Container Diagram for [System Name]
Person(user, "User", "Uses the system")
System_Boundary(system, "System Name") {
Container(webApp, "Web Application", "Spring Boot, Java", "Provides web interface")
Container(api, "API Application", "Node.js, Express", "Provides REST API")
ContainerDb(database, "Database", "PostgreSQL", "Stores data")
Container_Queue(messageQueue, "Message Queue", "RabbitMQ", "Handles async messaging")
}
System_Ext(external, "External System", "Third-party service")
Rel(user, webApp, "Uses", "HTTPS")
Rel(webApp, api, "Makes API calls to", "JSON/HTTPS")
Rel(api, database, "Reads from and writes to", "SQL")
Rel(api, messageQueue, "Publishes messages to")
Rel(api, external, "Uses", "API")
**Key Principles** (from [c4model.com](https://c4model.com/diagrams/container)):
- Show **high-level technology choices** (this is where technology details belong)
- Show how **responsibilities are distributed** across containers
- Include **container types**: Applications, Databases, Message Queues, File Systems, etc.
- Show **communication protocols** between containers
- Include **external systems** that containers interact with
API Specification Template
For each container API, create an OpenAPI/Swagger specification:
openapi: 3.1.0
info:
title: [Container Name] API
description: [API description]
version: 1.0.0
servers:
- url: https://api.example.com
description: Production server
paths:
/api/resource:
get:
summary: [Operation summary]
description: [Operation description]
parameters:
- name: param1
in: query
schema:
type: string
responses:
'200':
description: [Response description]
content:
application/json:
schema:
type: object
Example Interactions
- "Synthesize all components into containers based on deployment definitions"
- "Map the API components to containers and document their APIs as OpenAPI specs"
- "Create container-level documentation for the microservices architecture"
- "Document container interfaces as Swagger/OpenAPI specifications"
- "Analyze Kubernetes manifests and create container documentation"
Key Distinctions
- vs C4-Component agent: Maps components to deployment units; Component agent focuses on logical grouping
- vs C4-Context agent: Provides container-level detail; Context agent creates high-level system diagrams
- vs C4-Code agent: Focuses on deployment architecture; Code agent documents individual code elements
Output Examples
When synthesizing containers, provide:
- Clear container boundaries with deployment rationale
- Descriptive container names and deployment characteristics
- Complete API documentation with OpenAPI/Swagger specifications
- Links to all contained components
- Mermaid container diagrams showing deployment architecture
- Links to deployment configurations (Dockerfiles, K8s manifests, etc.)
- Infrastructure requirements and scaling considerations
- Consistent documentation format across all containers
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
1---2name: c4-container3description: ALWAYS use this when the request matches C4 Container: Expert C4 Container-level documentation specialist.4---56# C4 Container Level: System Deployment78## Selective Reading Rule910Start with:1112- `references/senior-master-standard.md`13- `references/usage-routing.md`14- `references/quality-checklist.md`1516Then load only the inherited docs, scripts, assets, or examples that match the user's actual task.1718## Use this skill when1920- Working on c4 container level: system deployment tasks or workflows21- Needing guidance, best practices, or checklists for c4 container level: system deployment2223## Do not use this skill when2425- The task is unrelated to c4 container level: system deployment26- You need a different domain or tool outside this scope2728## Instructions2930- Clarify goals, constraints, and required inputs.31- Apply relevant best practices and validate outcomes.32- Provide actionable steps and verification.33- If detailed examples are required, open `resources/implementation-playbook.md`.3435## Containers3637### [Container Name]3839- **Name**: [Container name]40- **Description**: [Short description of container purpose and deployment]41- **Type**: [Web Application, API, Database, Message Queue, etc.]42- **Technology**: [Primary technologies: Node.js, Python, PostgreSQL, Redis, etc.]43- **Deployment**: [Docker, Kubernetes, Cloud Service, etc.]4445## Purpose4647[Detailed description of what this container does and how it's deployed]4849## Components5051This container deploys the following components:5253- [Component Name]: [Description]54 - Documentation: c4-component-name.md5556## Interfaces5758### [API/Interface Name]5960- **Protocol**: [REST/GraphQL/gRPC/Events/etc.]61- **Description**: [What this interface provides]62- **Specification**: [Link to OpenAPI/Swagger/API Spec file]63- **Endpoints**:64 - `GET /api/resource` - [Description]65 - `POST /api/resource` - [Description]6667## Dependencies6869### Containers Used7071- [Container Name]: [How it's used, communication protocol]7273### External Systems7475- [External System]: [How it's used, integration type]7677## Infrastructure7879- **Deployment Config**: [Link to Dockerfile, K8s manifest, etc.]80- **Scaling**: [Horizontal/vertical scaling strategy]81- **Resources**: [CPU, memory, storage requirements]8283## Container Diagram8485Use proper Mermaid C4Container syntax:8687```mermaid88C4Container89 title Container Diagram for [System Name]9091 Person(user, "User", "Uses the system")92 System_Boundary(system, "System Name") {93 Container(webApp, "Web Application", "Spring Boot, Java", "Provides web interface")94 Container(api, "API Application", "Node.js, Express", "Provides REST API")95 ContainerDb(database, "Database", "PostgreSQL", "Stores data")96 Container_Queue(messageQueue, "Message Queue", "RabbitMQ", "Handles async messaging")97 }98 System_Ext(external, "External System", "Third-party service")99100 Rel(user, webApp, "Uses", "HTTPS")101 Rel(webApp, api, "Makes API calls to", "JSON/HTTPS")102 Rel(api, database, "Reads from and writes to", "SQL")103 Rel(api, messageQueue, "Publishes messages to")104 Rel(api, external, "Uses", "API")105```106````107108**Key Principles** (from [c4model.com](https://c4model.com/diagrams/container)):109110- Show **high-level technology choices** (this is where technology details belong)111- Show how **responsibilities are distributed** across containers112- Include **container types**: Applications, Databases, Message Queues, File Systems, etc.113- Show **communication protocols** between containers114- Include **external systems** that containers interact with115116````117118## API Specification Template119120For each container API, create an OpenAPI/Swagger specification:121122```yaml123openapi: 3.1.0124info:125 title: [Container Name] API126 description: [API description]127 version: 1.0.0128servers:129 - url: https://api.example.com130 description: Production server131paths:132 /api/resource:133 get:134 summary: [Operation summary]135 description: [Operation description]136 parameters:137 - name: param1138 in: query139 schema:140 type: string141 responses:142 '200':143 description: [Response description]144 content:145 application/json:146 schema:147 type: object148````149150## Example Interactions151152- "Synthesize all components into containers based on deployment definitions"153- "Map the API components to containers and document their APIs as OpenAPI specs"154- "Create container-level documentation for the microservices architecture"155- "Document container interfaces as Swagger/OpenAPI specifications"156- "Analyze Kubernetes manifests and create container documentation"157158## Key Distinctions159160- **vs C4-Component agent**: Maps components to deployment units; Component agent focuses on logical grouping161- **vs C4-Context agent**: Provides container-level detail; Context agent creates high-level system diagrams162- **vs C4-Code agent**: Focuses on deployment architecture; Code agent documents individual code elements163164## Output Examples165166When synthesizing containers, provide:167168- Clear container boundaries with deployment rationale169- Descriptive container names and deployment characteristics170- Complete API documentation with OpenAPI/Swagger specifications171- Links to all contained components172- Mermaid container diagrams showing deployment architecture173- Links to deployment configurations (Dockerfiles, K8s manifests, etc.)174- Infrastructure requirements and scaling considerations175- Consistent documentation format across all containers176177## Limitations178- Use this skill only when the task clearly matches the scope described above.179- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.180- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.