Skip to content
Skills Library
Programming · Writing

c4-model

/c4-model

Generate C4 architecture documentation at any level using specialized agents (Code, Component, Container, Context). Use this skill whenever the user wants to document system architecture with the C4 model, create architecture diagrams, document code structure, define component boundaries, map deployment containers, or create system context diagrams. Trigger for prompts like "document architecture", "create C4 diagram", "generate architecture docs", "map system components", "create context diagram", "document this codebase architecture", or "analyze code structure with C4". Always use this skil

Licence
MIT
Last repository change
31.08.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
5
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 31.08.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Generate C4 architecture documentation at any level using specialized agents (Code, Component, Container, Context). Use this skill whenever the user wants to document system architecture with the C4 model, create architecture diagrams, document code structure, define component boundaries, map deployment containers, or create system context diagrams. Trigger for prompts like "document architecture", "create C4 diagram", "generate architecture docs", "map system components", "create context diagram", "document this codebase architecture", or "analyze code structure with C4". Always use this skil

Triggers from the description

document architecturecreate C4 diagramgenerate architecture docsmap system componentscreate context diagramdocument this codebase architectureanalyze code structure with C4
Original author description

Generate C4 architecture documentation at any level using specialized agents (Code, Component, Container, Context). Use this skill whenever the user wants to document system architecture with the C4 model, create architecture diagrams, document code structure, define component boundaries, map deployment containers, or create system context diagrams. Trigger for prompts like "document architecture", "create C4 diagram", "generate architecture docs", "map system components", "create context diagram", "document this codebase architecture", or "analyze code structure with C4". Always use this skil

How it works

  1. C4 Levels Overview
  2. Workflow: Bottom-Up (Standard)
  3. Selective Documentation
  4. Agent Reference Files
  5. Output Organization
  6. Invoking the Agents
  7. Key Principles
Original SKILL.md headings · 80 lines, 413 words
SKILL.md preview
---
name: c4-model
description: Generate C4 architecture documentation at any level using specialized agents (Code, Component, Container, Context). Use this skill whenever the user wants to document system architecture with the C4 model, create architecture diagrams, document code structure, define component boundaries, map deployment containers, or create system context diagrams. Trigger for prompts like "document architecture", "create C4 diagram", "generate architecture docs", "map system components", "create context diagram", "document this codebase architecture", or "analyze code structure with C4". Always use this skill for C4 documentation requests, even partial ones like a single level.
---

# C4 Model Documentation Orchestrator

Orchestrates four specialized agents to generate C4 model architecture documentation. Each agent targets one hierarchical level, producing documentation files that feed into the next level.

## C4 Levels Overview

| Level | Agent subagent_type | Input | Output files |
|-------|---------------------|-------|--------------|
| **Code** | `c4-code` | Source directories | `c4-code-<name>.md` per directory |
| **Component** | `c4-component` | `c4-code-*.md` files | `c4-component-<name>.md` + index |
| **Container** | `c4-container` | Component docs + deployment configs | `c4-container.md` + OpenAPI specs |
| **Context** | `c4-context` | Container/component docs + README/tests | `c4-context.md` |

## Workflow: Bottom-Up (Standard)

When the user requests full C4 documentation:

```
1. Code level    → Analyze all source directories (run in parallel per directory)
2. Component     → Synthesize code docs into logical components
3. Container     → Map components to deployment units + document APIs
4. Context       → Create high-level stakeholder view
```

Run agents in sequence (each level depends on the previous). Within the Code level, multiple directories can be processed in parallel.

## Selective Documentation

Ask the user which level(s) they need if not clear from context:
- Single level: invoke just that agent
- Partial chain: e.g., only Code + Component
- Full chain: all four in order

## Agent Reference Files

When working on a specific level, read the corresponding reference file for full agent instructions, templates, and diagram syntax:

- **Code level** → `references/c4-code.md`
- **Component level** → `references/c4-component.md`
- **Container level** → `references/c4-container.md`
- **Context level** → `references/c4-context.md`

## Output Organization

Suggest placing all documentation in a consistent location:

```
docs/architecture/
├── c4-code-handlers.md       # Code level (one per directory)
├── c4-code-services.md
├── c4-component-api.md       # Component level
├── c4-component-domain.md
├── c4-component.md           # Component index
├── c4-container.md           # Container level
├── api-spec.yaml             # OpenAPI specs (if generated)
└── c4-context.md             # Context level
```

## Invoking the Agents

Use the `Agent` tool with the appropriate `subagent_type`. Example for Code level:

```
Agent(
  subagent_type="c4-code",
  prompt="Analyze the directory src/handlers and create C4 Code-level documentation. Save to docs/architecture/c4-code-handlers.md"
)
```

For the Context level agent, note it lives at `./references/c4-context.md` — use `subagent_type="c4-context"`.

## Key Principles

- **Bottom-up**: Code → Component → Container → Context (each level builds on the previous)
- **Parallel Code runs**: Multiple directories can be documented simultaneously
- **Sequential synthesis**: Component, Container, and Context must run after their inputs exist
- **Self-contained**: Each output file should be understandable independently
- **Mermaid diagrams**: Each level has specific diagram types (see reference files)
Files in this package (5)
  • SKILL.md 4 KB
  • references/c4-code.md 4 KB
  • references/c4-component.md 4 KB
  • references/c4-container.md 4 KB
  • references/c4-context.md 4 KB

Versions

RepositoryScoreLicence
This page · wesleyegberto/software-engineering-skills100MIT
ymurat/academic-agent-skills100MIT

Database snapshot: 13.11.2026 · package version 0c3bdaf361d8 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100c4-architecture
    Generate architecture documentation using C4 model Mermaid diagrams. Use when asked to create architecture diagrams, document system architecture, visualize software structure, create C4 diagrams, or generate context/container/component/deployment diagrams. Triggers include…
  • 100c4-architecture
    Generate architecture documentation using C4 model Mermaid diagrams. Use when asked to create architecture diagrams, document system architecture, visualize software structure, create C4 diagrams, or generate context/container/component/deployment diagrams. Triggers include…
  • 100c4-architecture
    Generate architecture documentation using C4 model Mermaid diagrams. Use when asked to create architecture diagrams, document system architecture, visualize software structure, or generate context/container/component/deployment diagrams.
  • 84diagram-excalidraw
    Generate Excalidraw architecture diagrams from codebase analysis. Use when user says "create an architecture diagram", "visualize the system design", "generate an excalidraw diagram", "draw the component structure", "create a visual representation of the codebase", or "diagram the data flow".
  • 90c4-architecture
    Model and document existing or planned software architectures with the C4 model across System Context, Container, and Component levels plus deployment diagrams, then emit diagrams through a selected renderer. Use when an architect needs audience-appropriate software architecture…
  • 100ddd-architecture-doc
    DDD architecture documentation generation — C4 model diagrams (Context/Container/Component/Code), ADR (Architecture Decision Records), domain model documentation, API documentation, architecture decision log, and team communication templates. Use when user asks about…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.