c4-container

Expert C4 Container-level documentation specialist.

31,392 stars
Complexity: easy

About this skill

This skill transforms an AI agent into an expert C4 Container-level documentation specialist, focusing on system deployment tasks and workflows. It equips the agent with best practices, guidelines, and checklists to produce accurate, consistent, and actionable documentation following the C4 model's Container level. The skill enables the AI to clarify project goals, apply relevant architectural best practices, validate outcomes, and provide step-by-step guidance for deploying software containers. It's particularly useful for structuring complex system overviews and ensuring robust architectural understanding within the scope of containerized components.

Best use case

Generate detailed C4 Container-level documentation for new or existing software systems. Receive guidance, best practices, or checklists specific to C4 Container-level system deployment. Structure and describe the containers within a software system and their interactions.

Expert C4 Container-level documentation specialist.

Clear, well-structured C4 Container-level documentation. Actionable guidance and best practices for system deployment. Validation of architectural decisions against established patterns. A comprehensive understanding of the system's containerized components and their interactions.

Practical example

Example input

I need help documenting the container level for a new microservices application. The application consists of a web API, a user authentication service, a product catalog service, and a database. How should I structure the C4 Container diagram and description for deployment?

Example output

```
Okay, let's break down the C4 Container-level documentation for your microservices application.

**1. Clarify Goals & Constraints:**
   - **Goal:** Provide a clear overview of the deployable containers, their technologies, responsibilities, and key interactions.
   - **Constraints:** Microservices architecture, deployed to a cloud environment (e.g., Kubernetes), SQL database.

**2. Identify Containers:**
   - **Web API:** Exposes RESTful endpoints for client interaction. (e.g., .NET Core / Node.js, running in Docker container).
   - **User Authentication Service:** Handles user registration, login, and token validation. (e.g., Java Spring Boot, running in Docker container).
   - **Product Catalog Service:** Manages product data and inventory. (e.g., Python Flask, running in Docker container).
   - **Database:** Stores user and product data. (e.g., PostgreSQL, deployed as a managed service or container).

**3. Define Responsibilities & Technologies:**
   - **Web API:** Frontend for clients, orchestrates calls to other services.
   - **User Auth Service:** Secure authentication and authorization.
   - **Product Catalog Service:** CRUD operations for products.
   - **Database:** Persistent data storage.

**4. Describe Key Interactions:**
   - Client applications interact with the Web API.
   - Web API communicates with User Auth Service (for authentication) and Product Catalog Service (for data).
   - User Auth Service and Product Catalog Service both interact with the Database.

**5. Draft C4 Container Diagram Elements (Conceptual):**
   - **Person:** User (Interacts with Web API)
   - **System Boundary:** Microservices Application
   - **Container:** Web API (Technology: Node.js/Docker)
   - **Container:** User Auth Service (Technology: Spring Boot/Docker)
   - **Container:** Product Catalog Service (Technology: Python Flask/Docker)
   - **Container:** Database (Technology: PostgreSQL)

   **Relationships:**
   - User -> Web API (Uses)
   - Web API -> User Auth Service (Authenticates)
   - Web API -> Product Catalog Service (Retrieves/Manages Products)
   - User Auth Service -> Database (Reads/Writes User Data)
   - Product Catalog Service -> Database (Reads/Writes Product Data)

**6. Actionable Steps & Verification:**
   - Create a dedicated `ARCHITECTURE.md` file in your repository.
   - Use a C4 diagramming tool (e.g., PlantUML, Structurizr) to render the diagram.
   - For each container, include: Name, Description, Technology, Responsibilities, and major dependencies.
   - Validate with your team: Does this accurately represent the deployable units? Is it clear for new developers?

**Further details:** If you need an implementation playbook with specific examples for diagramming tools or detailed architectural patterns, I can access `resources/implementation-playbook.md`.
```

When to use this skill

  • When an AI agent needs to assist in documenting the Container level of a software system using the C4 model.
  • When seeking best practices and guidelines for system deployment at the architectural Container level.
  • When structuring the overview of a system's deployable components and their relationships.
  • When the task involves understanding or explaining the runtime execution environment of software components.

When not to use this skill

  • When the task is unrelated to C4 Container-level system deployment or software architecture documentation.
  • When needing expertise for a different level of the C4 model (e.g., Context, Component, Code) beyond the Container scope.
  • When the required domain or tool extends outside the scope of C4 model documentation and system deployment guidance.
  • When the focus is on low-level code details or specific implementation rather than architectural overview.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/c4-container/SKILL.md --create-dirs "https://raw.githubusercontent.com/sickn33/antigravity-awesome-skills/main/plugins/antigravity-awesome-skills-claude/skills/c4-container/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/c4-container/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How c4-container Compares

Feature / Agentc4-containerStandard Approach
Platform SupportClaudeLimited / Varies
Context Awareness High Baseline
Installation ComplexityeasyN/A

Frequently Asked Questions

What does this skill do?

Expert C4 Container-level documentation specialist.

Which AI agents support this skill?

This skill is designed for Claude.

How difficult is it to install?

The installation complexity is rated as easy. You can find the installation instructions above.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# C4 Container Level: System Deployment

## 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:

- [Component Name]: [Description]
  - 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:

```mermaid
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:

```yaml
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

Related Skills

event-store-design

31392
from sickn33/antigravity-awesome-skills

Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.

Software ArchitectureClaude

ddd-strategic-design

31392
from sickn33/antigravity-awesome-skills

Design DDD strategic artifacts including subdomains, bounded contexts, and ubiquitous language for complex business domains.

Software ArchitectureClaude

cqrs-implementation

31392
from sickn33/antigravity-awesome-skills

Implement Command Query Responsibility Segregation for scalable architectures. Use when separating read and write models, optimizing query performance, or building event-sourced systems.

Software ArchitectureClaude

c4-component

31392
from sickn33/antigravity-awesome-skills

Expert C4 Component-level documentation specialist. Synthesizes C4 Code-level documentation into Component-level architecture, defining component boundaries, interfaces, and relationships.

Software ArchitectureClaude

backend-architect

31392
from sickn33/antigravity-awesome-skills

Expert backend architect specializing in scalable API design, microservices architecture, and distributed systems.

Software ArchitectureClaude

devcontainer-setup

31392
from sickn33/antigravity-awesome-skills

Creates devcontainers with Claude Code, language-specific tooling (Python/Node/Rust/Go), and persistent volumes. Use when adding devcontainer support to a project, setting up isolated development environments, or configuring sandboxed Claude Code workspaces.

Developer ToolsClaude

azure-containerregistry-py

31392
from sickn33/antigravity-awesome-skills

Azure Container Registry SDK for Python. Use for managing container images, artifacts, and repositories.

Cloud ManagementClaude

nft-standards

31392
from sickn33/antigravity-awesome-skills

Master ERC-721 and ERC-1155 NFT standards, metadata best practices, and advanced NFT features.

Web3 & BlockchainClaude

nextjs-app-router-patterns

31392
from sickn33/antigravity-awesome-skills

Comprehensive patterns for Next.js 14+ App Router architecture, Server Components, and modern full-stack React development.

Web FrameworksClaude

new-rails-project

31392
from sickn33/antigravity-awesome-skills

Create a new Rails project

Code GenerationClaude

networkx

31392
from sickn33/antigravity-awesome-skills

NetworkX is a Python package for creating, manipulating, and analyzing complex networks and graphs.

Network AnalysisClaude

network-engineer

31392
from sickn33/antigravity-awesome-skills

Expert network engineer specializing in modern cloud networking, security architectures, and performance optimization.

Network EngineeringClaude