C4 Container Documentation

VerifiedSafe

Expert guide for creating C4 container-level documentation, including system deployment diagrams and component descriptions.

Sby Skills Guide Bot
DocumentationIntermediate
7/23/2026
Claude CodeCursorCodex
#c4-model#architecture-diagrams#mermaid#container-documentation#system-deployment

Recommended for

Automated summary

This skill supplies templates and best practices for writing C4 container-level documentation of a system, including Mermaid C4Container diagrams and OpenAPI specifications for container APIs.

Strengths

  • Ready-made per-container structure covering name, type, technology, deployment, components, interfaces, dependencies and infrastructure
  • Directly reusable Mermaid C4Container diagram template with people, containers and external systems
  • Reinforces the official C4 principles: technology choices, distribution of responsibilities and communication protocols
  • Ships an OpenAPI 3.1 skeleton for documenting each container's API

Limitations

  • The content is fill-in-the-blank scaffolding; it does not discover or analyze the actual system architecture
  • Example stacks (Spring Boot, Node.js, PostgreSQL) are generic and must be adapted
  • No validation of Mermaid rendering or OpenAPI file consistency is included
When to use it

Use it when you need to document a system's architecture at the container level, with a C4 diagram plus each container's interfaces and dependencies.

When not to use it

Avoid it for work outside C4 architecture documentation, such as application coding, performance troubleshooting, or context- and component-level diagrams.

Security analysis

Safe
Quality score80/100

The skill is a documentation template for C4 container diagrams and OpenAPI specs. It declares no tools and contains no destructive, exfiltration, network, or obfuscated instructions.

No concerns found

How this analysis is made

Examples

Document a microservices architecture
Write the C4 container-level documentation for our e-commerce platform: a React web app, three Node.js services, PostgreSQL and RabbitMQ, all deployed on Kubernetes. Include a Mermaid C4Container diagram.
Add a container to existing docs
Add a new container section for our Redis cache to the existing C4 container documentation, following the standard template with interfaces, dependencies and infrastructure.
Draft the API spec for a container
Create an OpenAPI 3.1 specification for the Orders API container's REST endpoints and link it from the container's Interfaces section.

name: c4-container description: Expert C4 Container-level documentation specialist. risk: unknown source: community date_added: '2026-02-27'

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:

    • 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

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/c4-container-documentation-mrx3xyiu/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/c4-container-documentation-mrx3xyiu' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/c4-container-documentation-mrx3xyiu/download' --output '.skill-downloads/c4-container-documentation-mrx3xyiu/SKILL.md.part' && mv '.skill-downloads/c4-container-documentation-mrx3xyiu/SKILL.md.part' '.skill-downloads/c4-container-documentation-mrx3xyiu/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Original excerpt: Dependencies

Containers Used

  • [Container Name]: [How it's used, communication protocol]

External Systems

  • [External System]: [How it's used, integration type]

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/c4-container-documentation-mrx3xyiu/SKILL.md' && test -s '.skill-downloads/c4-container-documentation-mrx3xyiu/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/c4-container' && cp -R '.skill-downloads/c4-container-documentation-mrx3xyiu' '.claude/skills/c4-container'

Cursor
test -f '.skill-downloads/c4-container-documentation-mrx3xyiu/SKILL.md' && test -s '.skill-downloads/c4-container-documentation-mrx3xyiu/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/c4-container' && cp -R '.skill-downloads/c4-container-documentation-mrx3xyiu' '.cursor/skills/c4-container'

Codex
test -f '.skill-downloads/c4-container-documentation-mrx3xyiu/SKILL.md' && test -s '.skill-downloads/c4-container-documentation-mrx3xyiu/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/c4-container' && cp -R '.skill-downloads/c4-container-documentation-mrx3xyiu' '.agents/skills/c4-container'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/c4-container-documentation-mrx3xyiu'

openskills read 'c4-container-documentation-mrx3xyiu'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/c4-container-documentation-mrx3xyiu/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills