container-diagram-builder
Skill3 starsChanged 4 months agoMITView on GitHub
Produce a C4 Level 2 (Container) diagram decomposing the system into deployable/runnable units with technology choices and communication paths. Use when working on solution architecture, C4 diagrams, APIs, ADRs, or system design.
In this repository59 other files it gives its agents.
- agent-memory-designerSkill
- ai-cost-optimizerSkill
- ai-evaluation-builderSkill
- ai-latency-optimizerSkill
- ai-solution-architectSkill
- ai-workflow-builderSkill
- context-engineeringSkill
- human-in-the-loop-designerSkill
- multi-agent-plannerSkill
- prompt-engineerSkill
- prompt-optimizerSkill
- prompt-reviewerSkill
- adr-generatorSkill
- api-designerSkill
- architecture-reviewSkill
- component-diagram-builderSkill
- data-flow-analyzerSkill
- integration-plannerSkill
- observability-plannerSkill
- scalability-advisorSkill
- solution-architectureSkill
- system-context-builderSkill
- experiment-designerSkill
- go-to-market-plannerSkill
- pricing-strategy-advisorSkill
- mcp-best-practicesSkill
- mcp-client-generatorSkill
- mcp-security-reviewSkill
- mcp-server-generatorSkill
- mcp-tool-generatorSkill
- acceptance-criteria-generatorSkill
- analytics-instrumentation-plannerSkill
- competitive-analysisSkill
- epic-generatorSkill
- feature-prioritizationSkill
- idea-validatorSkill
- north-star-metric-advisorSkill
- okr-builderSkill
- persona-generatorSkill
- prd-generatorSkill
- problem-statement-builderSkill
- product-discovery-assistantSkill
- product-vision-builderSkill
- sprint-plannerSkill
- story-mappingSkill
- user-story-generatorSkill
- value-proposition-designerSkill
- chunking-strategy-advisorSkill
- embedding-strategy-advisorSkill
- hybrid-search-advisorSkill
- knowledge-ingestion-plannerSkill
- rag-architecture-designerSkill
- retriever-optimizerSkill
- ai-governance-advisorSkill
- ai-threat-modelingSkill
- guardrails-builderSkill
- owasp-llm-reviewerSkill
- prompt-injection-detectorSkill
- skill-nameSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 62
Place containers inside system boundary.
- Distinctive: line 114
Follow C4 Level 2 conventions strictly.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Container Diagram Builder
Purpose
Produce a C4 Level 2 (Container) diagram decomposing the system into deployable/runnable units with technology choices and communication paths.
Input: System context diagram, solution architecture
Output: Container diagram document with Mermaid diagram, container inventory, and communication matrix
Examples: See examples.md for worked input/output.
Workflow
Step 1: Map logical components to containers
From solution architecture, identify containers:
- Web application, mobile app, API service, worker, database, cache, message broker, file storage
Each container must:
- Be independently deployable or runnable
- Have one primary technology
- Have clear responsibility
Step 2: Define container inventory
| Container | Type | Technology | Responsibility | Owner |
Types: web app, mobile, API, worker, database, cache, queue, gateway.
Step 3: Document container communication
| Source | Target | Protocol | Purpose | Sync/Async | Auth |
Step 4: Draw container diagram
flowchart TB
subgraph system [System Name]
web[Web App]
api[API Service]
db[(Database)]
end
user[User] --> web
web --> api
api --> dbPlace containers inside system boundary. External actors and systems outside.
Step 5: Map to quality attributes
For each container, note NFR implications:
- Scaling approach
- Security boundary
- Data persistence
Step 6: Validate
Run Validation checklist.
Decision Rules
| Condition | Action |
| No system context available | Stop; run system-context-builder first |
| Component not deployable | Merge into parent container or split differently |
| Direct DB access from multiple containers | Document pattern; flag if violating bounded context |
| Technology unspecified | Recommend based on solution architecture; mark as proposal |
| More than 12 containers | Group into subsystems with nested diagrams |
Validation
- Every solution architecture component maps to a container
- Each container has type, technology, responsibility
- Communication matrix covers all container pairs that interact
- Mermaid diagram shows system boundary
- External actors/systems from context diagram present
- No component-level (C4 L3) detail inside diagram
- Auth method noted for external-facing protocols
Anti-patterns
- Container = class — fine-grained code modules shown as containers.
- Missing data stores — API without database when persistence required.
- Spaghetti diagram — unordered arrows without protocol labels.
- Technology leakage — framework names without container purpose.
- Skipping async paths — only showing sync HTTP, missing queues/workers.
Best Practices
- Follow C4 Level 2 conventions strictly.
- One technology per container (primary).
- Show both sync and async integration paths.
- Align container names with deployment units.
- Reference FR/NFR IDs in container responsibilities.
Output Structure
# Container Diagram: [System Name]
## Container Inventory
| Container | Type | Technology | Responsibility |
|-----------|------|------------|----------------|
## Communication Matrix
| Source | Target | Protocol | Purpose | Sync/Async |
|--------|--------|----------|---------|------------|
## Container Diagram
```mermaid
[diagram]NFR Mapping
| Container | Scaling | Security | Persistence |
Open Questions
- [Question]
---
# Next Skills
| Outcome | Recommended Skill |
|---------|-------------------|
| Document architecture decisions | `architecture/adr-generator` |
| Design container APIs | `architecture/api-designer` |
| Review full architecture | `architecture/architecture-review` |
| Missing context | `architecture/system-context-builder` |Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

