C4 Container Level: Applications and Data Stores
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.
C4 containers are applications or data stores, not necessarily Docker containers or runtime nodes. Model physical instances/regions separately in a deployment diagram. Base each boundary/relationship on observed code/configuration and mark unknowns; templates below are placeholders, not discovered architecture.
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
#C4 containers are applications or data stores, not necessarily Docker containers or runtime nodes. Model physical instances/regions separately in a deployment diagram. Base each boundary/relationship on observed code/configuration and mark unknowns; templates below are placeholders, not discovered architecture.
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")
ContainerQueue(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):
- 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: Prov
1---2name: c4-container3description: Expert C4 Container-level documentation specialist. 4category: Document Processing5source: antigravity6tags: [python, node, api, ai, agent, workflow, template, document, docker, kubernetes]7url: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/c4-container8metadata:9 source: https://skillmd.com/skills/ranbot-ai/c4-container10---111213# C4 Container Level: Applications and Data Stores1415## Use this skill when1617- Working on c4 container level: system deployment tasks or workflows18- Needing guidance, best practices, or checklists for c4 container level: system deployment1920## Do not use this skill when2122- The task is unrelated to c4 container level: system deployment23- You need a different domain or tool outside this scope2425## Instructions2627- Clarify goals, constraints, and required inputs.28- Apply relevant best practices and validate outcomes.29- Provide actionable steps and verification.3031C4 containers are applications or data stores, not necessarily Docker containers or runtime nodes. Model physical instances/regions separately in a deployment diagram. Base each boundary/relationship on observed code/configuration and mark unknowns; templates below are placeholders, not discovered architecture.3233## Containers3435### [Container Name]3637- **Name**: [Container name]38- **Description**: [Short description of container purpose and deployment]39- **Type**: [Web Application, API, Database, Message Queue, etc.]40- **Technology**: [Primary technologies: Node.js, Python, PostgreSQL, Redis, etc.]41- **Deployment**: [Docker, Kubernetes, Cloud Service, etc.]4243## Purpose4445[Detailed description of what this container does and how it's deployed]4647## Components4849This container deploys the following components:5051- [Component Name]: [Description]52 - Documentation: c4-component-name.md5354## Interfaces5556### [API/Interface Name]5758- **Protocol**: [REST/GraphQL/gRPC/Events/etc.]59- **Description**: [What this interface provides]60- **Specification**: [Link to OpenAPI/Swagger/API Spec file]61- **Endpoints**:62 - `GET /api/resource` - [Description]63 - `POST /api/resource` - [Description]6465## Dependencies6667#C4 containers are applications or data stores, not necessarily Docker containers or runtime nodes. Model physical instances/regions separately in a deployment diagram. Base each boundary/relationship on observed code/configuration and mark unknowns; templates below are placeholders, not discovered architecture.6869## 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 ContainerQueue(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```106107**Key Principles** (from [c4model.com](https://c4model.com/diagrams/container)):108109- Show **high-level technology choices** (this is where technology details belong)110- Show how **responsibilities are distributed** across containers111- Include **container types**: Applications, Databases, Message Queues, File Systems, etc.112- Show **communication protocols** between containers113- Include **external systems** that containers interact with114115116## API Specification Template117118For each container API, create an OpenAPI/Swagger specification:119120```yaml121openapi: 3.1.0122info:123 title: [Container Name] API124 description: [API description]125 version: 1.0.0126servers:127 - url: https://api.example.com128 description: Production server129paths:130 /api/resource:131 get:132 summary: [Operation summary]133 description: [Operation description]134 parameters:135 - name: param1136 in: query137 schema:138 type: string139 responses:140 '200':141 description: [Response description]142 content:143 application/json:144 schema:145 type: object146```147148## Example Interactions149150- "Synthesize all components into containers based on deployment definitions"151- "Map the API components to containers and document their APIs as OpenAPI specs"152- "Create container-level documentation for the microservices architecture"153- "Document container interfaces as Swagger/OpenAPI specifications"154- "Analyze Kubernetes manifests and create container documentation"155156## Key Distinctions157158- **vs C4-Component agent**: Maps components to deployment units; Component agent focuses on logical grouping159- **vs C4-Context agent**: Prov