C4 container

From sickn33/agentic-awesome-skills · View interactive version

C4 container is an AI agent skill from the GitHub repository sickn33/agentic-awesome-skills. Expert C4 Container-level documentation specialist.

How to use this skill

Skill file

C4 Container Level: Applications and Data Stores

Use this skill when

Do not use this skill when

Instructions

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]

Purpose

[Detailed description of what this container does and how it's deployed]

Components

This container deploys the following components:

Interfaces

[API/Interface Name]

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

External Systems

Infrastructure

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

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

Key Distinctions

Output Examples

When synthesizing containers, provide:

Limitations

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.