c4-container – skill Khác cho agent AI
Chuyên gia tài liệu C4 cấp độ Container.
Cài skill c4-container bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/c4-container-c39b2.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /c4-container – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/c4-container-c39b2.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $c4-container – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/c4-container-c39b2.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /c4-container – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/c4-container-c39b2.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /c4-container – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
C4 Container Level: Applications and Data Stores
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.
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]
- 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
#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
- [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")
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](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: objectExample 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
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Skill liên quan
- c4-context – Chuyên gia tài liệu C4 cấp độ Context. Tạo sơ đồ ngữ cảnh hệ thống cấp cao, tài liệu hóa…
- candidate-talent-pool – Nhóm ứng viên và người tiềm năng: thông tin liên hệ, kinh nghiệm, kỹ năng, trạng thái và…
- canonical-tag-checker – Kiểm tra thẻ canonical. Dùng khi làm việc với HTML và URL trang, hoặc URL trang có thể…
- canonical-url-builder – Tạo URL canonical. Dùng khi làm việc với URL ưu tiên của trang và các biến thể URL trùng…
- capacity-workload-planner – Sổ theo dõi năng lực và khối lượng công việc hàng tuần: số giờ có sẵn và đã phân bổ, tỷ…
- hard-call – /em:hard-call — Khung quyết định khi không có lựa chọn nào tốt. Dùng khi mọi lựa chọn…
- carrier-relationship-management – Kinh nghiệm được hệ thống hóa để quản lý danh mục nhà vận chuyển, đàm phán giá cước…
- cc-skill-project-guidelines-example – Kỹ năng hướng dẫn dự án (Ví dụ)