跳到正文
Skillpedia
技术文档48k · #4100

c4-container

它能做什么

这个工具可以帮助你在“容器”这一层级上记录软件系统的架构。它会描述系统的不同部分(比如 Web 应用、数据库)如何部署,以及它们之间如何通信。

适用场景

  • ✓当你需要说明一个应用将如何安装和配置时。
  • ✓当你需要详细说明系统每个部分所用的技术时。
  • ✓当你需要解释系统各个部分之间如何连接时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/c4-container/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/c4-container/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“为主要的 Web 应用容器编写文档。它使用 Node.js,部署在 Kubernetes 上,文档中需包括它的 REST APIs 和依赖项。”

每周 5 个新技能,1 分钟读完。

工作原理

你需要提供系统中每个部分的信息,例如名称、描述、所用技术以及部署方式。工具会整理这些信息,还能生成图表和 API 规范。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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.

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

…

常见问题

这里的“容器”是什么意思?

容器是一个部署单元,比如 Web 应用、数据库或消息队列,它在特定的环境中运行。

“容器”和“组件”有什么区别?

容器关注的是某个东西如何部署,以及它在真实环境中如何运行;组件则是容器内部的一个逻辑部分。

图表有什么用?

图表能直观地展示容器如何组织、如何通信以及使用了哪些技术,让架构更容易理解。

详情

作者的原始描述

Expert C4 Container-level documentation specialist.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#4100
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能