Skill

Document C4 Container Deployments and APIs

Skill for documenting C4 container-level architecture: container templates, Mermaid diagrams, and OpenAPI interface specs.


38
Spark score
out of 100
Updated 24 days ago
Version 14.5.0

Add to Favorites

Why it matters

Automate the documentation of C4 container level system deployments, including container details, interfaces, dependencies, and infrastructure. Generate comprehensive documentation and OpenAPI specifications for your architecture.

Outcomes

What it gets done

01

Generate container-level documentation based on deployment definitions.

02

Map API components to containers and document them as OpenAPI/Swagger specifications.

03

Create container diagrams using Mermaid syntax.

04

Document infrastructure, scaling strategies, and resource requirements.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/ag-c4-container | bash

Overview

C4 Container Level: System Deployment

A skill for documenting C4 container-level system architecture: container templates, Mermaid C4Container diagrams, and OpenAPI interface specifications. Use for container-level deployment documentation tasks; not for context-level, component-level, or code-level C4 documentation.

What it does

C4 Container Level: System Deployment is a skill for producing container-level architecture documentation following the C4 model. For each container it documents a standard set of fields - name, description, type (web application, API, database, message queue, etc.), primary technology, and deployment target (Docker, Kubernetes, cloud service) - plus the components it deploys, its interfaces (protocol, specification link, and endpoints such as GET /api/resource), its dependencies (other containers used and external systems integrated with), and its infrastructure (deployment config, scaling strategy, resource requirements).

When to use - and when NOT to

Use it for container-level system-deployment documentation tasks - synthesizing components into deployment containers, mapping APIs to containers as OpenAPI specs, or documenting a microservices architecture's containers from Kubernetes manifests. It is explicitly distinguished from three sibling C4 agents: the Component agent focuses on logical grouping rather than deployment units, the Context agent produces high-level system diagrams rather than container detail, and the Code agent documents individual code elements rather than deployment architecture. It is not suited to tasks outside this container-level deployment scope.

Inputs and outputs

Container diagrams use Mermaid's 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")

Each container's API is additionally documented as an OpenAPI/Swagger 3.1.0 specification (title, description, version, servers, paths with parameters and responses). Output synthesis includes clear container boundaries with deployment rationale, complete OpenAPI documentation, links to contained components and deployment configs (Dockerfiles, K8s manifests), and infrastructure/scaling requirements, kept consistent across all documented containers.

Integrations

Follows c4model.com's stated container-diagram principles: show high-level technology choices (container level is where those details belong, not context level), show how responsibilities are distributed across containers, cover container types like applications/databases/message queues/file systems, show inter-container communication protocols, and include external systems containers interact with. Detailed worked examples live in a companion resources/implementation-playbook.md.

Who it's for

Architects and engineers documenting a system's deployment architecture at the container level - mapping components to deployable units, their APIs, and their infrastructure requirements - as part of a broader C4-model documentation set alongside context, component, and code-level views.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.