C4 Architecture Documentation Workflow
Generate comprehensive C4 architecture documentation for an existing repository/codebase using a bottom-up analysis approach.
[Extended thinking: This workflow implements a complete C4 architecture documentation process following the C4 model (Context, Container, Component, Code). It uses a bottom-up approach, starting from the deepest code directories and working upward, ensuring every code element is documented before synthesizing into higher-level abstractions. The workflow coordinates four specialized C4 agents (Code, Component, Container, Context) to create a complete architectural documentation set that serves both technical and non-technical stakeholders.]
Use this skill when
- Working on c4 architecture documentation workflow tasks or workflows
- Needing guidance, best practices, or checklists for c4 architecture documentation workflow
Do not use this skill when
- The task is unrelated to c4 architecture documentation workflow
- 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.
Overview
This workflow creates comprehensive C4 architecture documentation following the official C4 model by:
- Code Level: Analyzing every subdirectory bottom-up to create code-level documentation
- Component Level: Synthesizing code documentation into logical components within containers
- Container Level: Mapping components to deployment containers with API documentation (shows high-level technology choices)
- Context Level: Creating high-level system context with personas and user journeys (focuses on people and software systems, not technologies)
Note: According to the C4 model, you don't need to use all 4 levels of diagram - the system context and container diagrams are sufficient for most software development teams. This workflow generates all levels for completeness, but teams can choose which levels to use.
All documentation is written to a new C4-Documentation/ directory in the repository root.
Phase 1: Code-Level Documentation (Bottom-Up Analysis)
1.1 Discover All Subdirectories
- Use codebase search to identify all subdirectories in the repository
- Sort directories by depth (deepest first) for bottom-up processing
- Filter out common non-code directories (node_modules, .git, build, dist, etc.)
- Create list of directories to process
1.2 Process Each Directory (Bottom-Up)
For each directory, starting from the deepest:
Use Task tool with subagent_type="c4-architecture::c4-code"
Prompt: |
Analyze the code in directory: [directory_path]
Create comprehensive C4 Code-level documentation following this structure:
- Overview Section:
- Name: [Descriptive name for this code directory]
- Description: [Short description of what this code does]
- Location: [Link to actual directory path relative to repo root]
- Language: [Primary programming language(s) used]
- Purpose: [What this code accomplishes]
- Code Elements Section:
- Document all functions/methods with complete signatures:
- Function name, parameters (with types), return type
- Description of what each function does
- Location (file path and line numbers)
- Dependencies (what this function depends on)
- Document all classes/modules:
- Class name, description, location
- Methods and their signatures
- Dependencies
- Dependencies Section:
- Internal dependencies (other code in this repo)
- External dependencies (libraries, frameworks, services)
- Relationships Section:
- Optional Mermaid diagram if relationships are complex
Save the output as: C4-Documentation/c4-code-[directory-name].md
Use a sanitized directory name (replace / with -, remove special chars) for the filename.
Ensure the documentation includes:
- Complete function signatures with all parameters and types
- Links to actual source code locations
- All dependencies (internal and external)
- Clear, descriptive names and descriptions
Expected output: c4-code-.md file in C4-Documentation/
Context: All files in the directory and its subdirectories
Repeat for every subdirectory until all directories have corresponding c4-code-*.md files.
Phase 2: Component-Level Synthesis
2.1 Analyze All Code-Level Documentation
- Collect all c4-code-*.md files created in Phase 1
- Analyze code structure, dependencies, and relationships
- Identify logical component boundaries based on:
- Domain boundaries (related business functionality)
- Technical boundaries (shared frameworks, libraries)
- Organizational boundaries (team ownership, if evident)
2.2 Create Component Documentation
For each identified component:
Use Task tool with subagent_type="c4-architecture::c4-component"
Prompt: |
Synthesize the following C4 Code-level documentation files into a logical component:
Code files to analyze:
[List of c4-code-*.md file paths]
Create comprehensive C4 Component-level documentation following this structure:
- Overview Section:
- Name: [Component name - descriptive and meaningful]
- Description: [Short description of component purpose]
- Type: [Application, Service, Library, etc.]
- Technology: [Primary technologies used]
- Purpose Section:
- Detailed description of what this component does
- What problems it solves
- Its role in the system
- Software Features Section:
- List all software features provided by this component
- Each feature with a brief description
- Code Elements Section:
- List all c4-code-*.md files contained in this component
- Link to each file with a brief description
- Interfaces Section:
- Document all component interfaces:
- Interface name
- Protocol (REST, GraphQL, gRPC, Events, etc.)
- Description
- Operations (function signatures, endpoints, etc.)
- Dependencies Section:
- Components used (other components this depends on)
- External systems (databases, APIs, services)
- Component Diagram:
- Mermaid diagram showing this component and its relationships
Save the output as: C4-Documentation/c4-component-[component-name].md
Use a sanitized component name for the filename.
Expected output: c4-component-.md file for each component
Context: All relevant c4-code-*.md files for this component
2.3 Create Master Component Index
Use Task tool with subagent_type="c4-architecture::c4-component"
Prompt: |
Create a master component index that lists all components in the system.
Based on all c4-component-*.md files created, generate:
- System Components Section:
- List all components with:
- Component name
- Short description
- Link to component documentation
- Component Relationships Diagram:
- Mermaid diagram showing all components and their relationships
- Show dependencies between components
- Show external system dependencies
Save the output as: C4-Documentation/c4-component.md
Expected output: Master c4-component.md file
Context: All c4-component-*.md files
Phase 3: Container-Level Synthesis
3.1 Analyze Components and Deployment Definitions
- Review all c4-component-*.md files
- Search for deployment/infrastructure definitions:
- Dockerfiles
- Kubernetes manifests (deployments, services, etc.)
- Docker Compose files
- Terraform/CloudFormation configs
- Cloud service definitions (AWS Lambda, Azure Functions, etc.)
- CI/CD pipeline definitions
3.2 Map Components to Containers
Use Task tool with subagent_type="c4-architecture::c4-container"
Prompt: |
Synthesize components into containers based on deployment definitions.
Component documentation:
[List of all c4-component-*.md file paths]
Deployment definitions found:
[List of deployment config files: Dockerfiles, K8s manifests, etc.]
Create comprehensive C4 Container-level documentation following this structure:
- Containers Section (for each container):
- 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, etc.]
- Deployment: [Docker, Kubernetes, Cloud Service, etc.]
- Purpose Section (for each container):
- Detailed description of what this container does
- How it's deployed
- Its role in the system
- Components Section (for each container):
- List all components deployed in this container
- Link to component documentation
- Interfaces Section (for each container):
- Document all container APIs and interfaces:
- API/Interface name
- Protocol (REST, GraphQL, gRPC, Events, etc.)
- Description
- Link to OpenAPI/Swagger/API Spec file
- List of endpoints/operations
- API Specifications:
- For each container API, create an OpenAPI 3.1+ specification
- Save as: C4-Documentation/apis/[container-name]-api.yaml
- Include:
- All endpoints with methods (GET, POST, etc.)
- Request/response schemas
- Authentication requirements
- Error responses
- Dependencies Section (for each container):
- Containers used (other containers this depends on)
- External systems (databases, third-party APIs, etc.)
- Communication protocols
- Infrastructure Section (for each container):
- Link to deployment config (Dockerfile, K8s manifest, etc.)
- Scaling strategy
- Resource requirements (CPU, memory, storage)
- Container Diagram:
- Mermaid diagram showing all containers and their relationships
- Show communication protocols
- Show external system dependencies
Save the output as: C4-Documentation/c4-container.md
Expected output: c4-container.md with all containers and API specifications
Context: All component documentation and deployment definitions
Phase 4: Context-Level Documentation
4.1 Analyze System Documentation
- Review container and component documentation
- Search for system documentation:
- README files
- Architecture documentation
- Requirements documents
- Design documents
- Test files (to understand system behavior)
- API documentation
- User documentation
4.2 Create Context Documentation
Use Task tool with subagent_type="c4-architecture::c4-context"
Prompt: |
Create comprehensive C4 Context-level documentation for the system.
Container documentation: C4-Documentation/c4-container.md
Component documentation: C4-Documentation/c4-component.md
System documentation: [List of README, architecture docs, requirements, etc.]
Test files: [List of test files that show system behavior]
Create comprehensive C4 Context-level documentation following this structure:
- System Overview Section:
- Short Description: [One-sentence description of what the system does]
- Long Description: [Detailed description of system purpose, capabilities, problems solved]
- Personas Section:
- For each persona (human users and programmatic "users"):
- Persona name
- Type (Human User / Programmatic User / External System)
- Description (who they are, what they need)
- Goals (what they want to achieve)
- Key features used
- System Features Section:
- For each high-level feature:
- Feature name
- Description (what this feature does)
- Users (which personas use this feature)
- Link to user journey map
- User Journeys Section:
- For each key feature and persona:
- Journey name: [Feature Name] - [Persona Name] Journey
- Step-by-step journey:
- ...
- Include all system touchpoints
- For programmatic users (external systems, APIs):
- Integration journey with step-by-step process
- External Systems and Dependencies Section:
- For each external system:
- System name
- Type (Database, API, Service, Message Queue, etc.)
- Description (what it provides)
- Integration type (API, Events, File Transfer, etc.)
- Purpose (why the system depends on this)
- System Context Diagram:
- Mermaid C4Context diagram showing:
- The system (as a box in the center)
- All personas (users) around it
- All external systems around it
- Relationships and data flows
- Use C4Context notation for proper C4 diagram
- Related Documentation Section:
- Links to container documentation
- Links to component documentation
Save the output as: C4-Documentation/c4-context.md
Ensure the documentation is:
- Understandable by non-technical stakeholders
- Focuses on system purpose, users, and external relationships
- Includes comprehensive user journey maps
- Identifies all external systems and dependencies
Expected output: c4-context.md with complete system context
Context: All container, component, and system documentation
Configuration Options
target_directory: Root directory to analyze (default: current repository root)
exclude_patterns: Patterns to exclude (default: node_modules, .git, build, dist, etc.)
output_directory: Where to write C4 documentation (default: C4-Documentation/)
include_tests: Whether to analyze test files for context (default: true)
api_format: Format for API specs (default: openapi)
Success Criteria
- ✅ Every subdirectory has a corresponding c4-code-*.md file
- ✅ All code-level documentation includes complete function signatures
- ✅ Components are logically grouped with clear boundaries
- ✅ All components have interface documentation
- ✅ Master component index created with relationship diagram
- ✅ Containers map to actual deployment units
- ✅ All container APIs documented with OpenAPI/Swagger specs
- ✅ Container diagram shows deployment architecture
- ✅ System context includes all personas (human and programmatic)
- ✅ User journeys documented for all key features
- ✅ All external systems and dependencies identified
- ✅ Context diagram shows system, users, and external systems
- ✅ Documentation is organized in C4-Documentation/ directory
Output Structure
C4-Documentation/
├── c4-code-*.md # Code-level docs (one per directory)
├── c4-component-*.md # Component-level docs (one per component)
├── c4-component.md # Master component index
├── c4-container.md # Container-level docs
├── c4-context.md # Context-level docs
└── apis/ # API specifications
├── [container]-api.yaml # OpenAPI specs for each container
└── ...
Coordination Notes
- Bottom-up processing: Process directories from deepest to shallowest
- Incremental synthesis: Each level builds on the previous level's documentation
- Complete coverage: Every directory must have code-level documentation before synthesis
- Link consistency: All documentation files link to each other appropriately
- API documentation: Container APIs must have OpenAPI/Swagger specifications
- Stakeholder-friendly: Context documentation should be understandable by non-technical stakeholders
- Mermaid diagrams: Use proper C4 Mermaid notation for all diagrams
Example Usage
/c4-architecture:c4-architecture
This will:
- Walk through all subdirectories bottom-up
- Create c4-code-*.md for each directory
- Synthesize into components
- Map to containers with API docs
- Create system context with personas and journeys
All documentation written to: C4-Documentation/
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.
Source: sickn33/agentic-awesome-skills → skills/c4-architecture-c4-architecture/SKILL.md
Also appears in: sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills/skills/c4-architecture-c4-architecture/SKILL.md, sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills-claude/skills/c4-architecture-c4-architecture/SKILL.md
1---2name: c4-architecture-c4-architecture3description: Generate comprehensive C4 architecture documentation for an existing repository/codebase using a bottom-up analysis approach.4---567# C4 Architecture Documentation Workflow89Generate comprehensive C4 architecture documentation for an existing repository/codebase using a bottom-up analysis approach.1011[Extended thinking: This workflow implements a complete C4 architecture documentation process following the C4 model (Context, Container, Component, Code). It uses a bottom-up approach, starting from the deepest code directories and working upward, ensuring every code element is documented before synthesizing into higher-level abstractions. The workflow coordinates four specialized C4 agents (Code, Component, Container, Context) to create a complete architectural documentation set that serves both technical and non-technical stakeholders.]1213## Use this skill when1415- Working on c4 architecture documentation workflow tasks or workflows16- Needing guidance, best practices, or checklists for c4 architecture documentation workflow1718## Do not use this skill when1920- The task is unrelated to c4 architecture documentation workflow21- You need a different domain or tool outside this scope2223## Instructions2425- Clarify goals, constraints, and required inputs.26- Apply relevant best practices and validate outcomes.27- Provide actionable steps and verification.28- If detailed examples are required, open `resources/implementation-playbook.md`.2930## Overview3132This workflow creates comprehensive C4 architecture documentation following the [official C4 model](https://c4model.com/diagrams) by:33341. **Code Level**: Analyzing every subdirectory bottom-up to create code-level documentation352. **Component Level**: Synthesizing code documentation into logical components within containers363. **Container Level**: Mapping components to deployment containers with API documentation (shows high-level technology choices)374. **Context Level**: Creating high-level system context with personas and user journeys (focuses on people and software systems, not technologies)3839**Note**: According to the [C4 model](https://c4model.com/diagrams), you don't need to use all 4 levels of diagram - the system context and container diagrams are sufficient for most software development teams. This workflow generates all levels for completeness, but teams can choose which levels to use.4041All documentation is written to a new `C4-Documentation/` directory in the repository root.4243## Phase 1: Code-Level Documentation (Bottom-Up Analysis)4445### 1.1 Discover All Subdirectories4647- Use codebase search to identify all subdirectories in the repository48- Sort directories by depth (deepest first) for bottom-up processing49- Filter out common non-code directories (node_modules, .git, build, dist, etc.)50- Create list of directories to process5152### 1.2 Process Each Directory (Bottom-Up)5354For each directory, starting from the deepest:5556- Use Task tool with subagent_type="c4-architecture::c4-code"57- Prompt: |58 Analyze the code in directory: [directory_path]5960 Create comprehensive C4 Code-level documentation following this structure:61 1. **Overview Section**:62 - Name: [Descriptive name for this code directory]63 - Description: [Short description of what this code does]64 - Location: [Link to actual directory path relative to repo root]65 - Language: [Primary programming language(s) used]66 - Purpose: [What this code accomplishes]67 2. **Code Elements Section**:68 - Document all functions/methods with complete signatures:69 - Function name, parameters (with types), return type70 - Description of what each function does71 - Location (file path and line numbers)72 - Dependencies (what this function depends on)73 - Document all classes/modules:74 - Class name, description, location75 - Methods and their signatures76 - Dependencies77 3. **Dependencies Section**:78 - Internal dependencies (other code in this repo)79 - External dependencies (libraries, frameworks, services)80 4. **Relationships Section**:81 - Optional Mermaid diagram if relationships are complex8283 Save the output as: C4-Documentation/c4-code-[directory-name].md84 Use a sanitized directory name (replace / with -, remove special chars) for the filename.8586 Ensure the documentation includes:87 - Complete function signatures with all parameters and types88 - Links to actual source code locations89 - All dependencies (internal and external)90 - Clear, descriptive names and descriptions9192- Expected output: c4-code-<directory-name>.md file in C4-Documentation/93- Context: All files in the directory and its subdirectories9495**Repeat for every subdirectory** until all directories have corresponding c4-code-\*.md files.9697## Phase 2: Component-Level Synthesis9899### 2.1 Analyze All Code-Level Documentation100101- Collect all c4-code-\*.md files created in Phase 1102- Analyze code structure, dependencies, and relationships103- Identify logical component boundaries based on:104 - Domain boundaries (related business functionality)105 - Technical boundaries (shared frameworks, libraries)106 - Organizational boundaries (team ownership, if evident)107108### 2.2 Create Component Documentation109110For each identified component:111112- Use Task tool with subagent_type="c4-architecture::c4-component"113- Prompt: |114 Synthesize the following C4 Code-level documentation files into a logical component:115116 Code files to analyze:117 [List of c4-code-*.md file paths]118119 Create comprehensive C4 Component-level documentation following this structure:120 1. **Overview Section**:121 - Name: [Component name - descriptive and meaningful]122 - Description: [Short description of component purpose]123 - Type: [Application, Service, Library, etc.]124 - Technology: [Primary technologies used]125 2. **Purpose Section**:126 - Detailed description of what this component does127 - What problems it solves128 - Its role in the system129 3. **Software Features Section**:130 - List all software features provided by this component131 - Each feature with a brief description132 4. **Code Elements Section**:133 - List all c4-code-\*.md files contained in this component134 - Link to each file with a brief description135 5. **Interfaces Section**:136 - Document all component interfaces:137 - Interface name138 - Protocol (REST, GraphQL, gRPC, Events, etc.)139 - Description140 - Operations (function signatures, endpoints, etc.)141 6. **Dependencies Section**:142 - Components used (other components this depends on)143 - External systems (databases, APIs, services)144 7. **Component Diagram**:145 - Mermaid diagram showing this component and its relationships146147 Save the output as: C4-Documentation/c4-component-[component-name].md148 Use a sanitized component name for the filename.149150- Expected output: c4-component-<name>.md file for each component151- Context: All relevant c4-code-\*.md files for this component152153### 2.3 Create Master Component Index154155- Use Task tool with subagent_type="c4-architecture::c4-component"156- Prompt: |157 Create a master component index that lists all components in the system.158159 Based on all c4-component-\*.md files created, generate:160 1. **System Components Section**:161 - List all components with:162 - Component name163 - Short description164 - Link to component documentation165 2. **Component Relationships Diagram**:166 - Mermaid diagram showing all components and their relationships167 - Show dependencies between components168 - Show external system dependencies169170 Save the output as: C4-Documentation/c4-component.md171172- Expected output: Master c4-component.md file173- Context: All c4-component-\*.md files174175## Phase 3: Container-Level Synthesis176177### 3.1 Analyze Components and Deployment Definitions178179- Review all c4-component-\*.md files180- Search for deployment/infrastructure definitions:181 - Dockerfiles182 - Kubernetes manifests (deployments, services, etc.)183 - Docker Compose files184 - Terraform/CloudFormation configs185 - Cloud service definitions (AWS Lambda, Azure Functions, etc.)186 - CI/CD pipeline definitions187188### 3.2 Map Components to Containers189190- Use Task tool with subagent_type="c4-architecture::c4-container"191- Prompt: |192 Synthesize components into containers based on deployment definitions.193194 Component documentation:195 [List of all c4-component-*.md file paths]196197 Deployment definitions found:198 [List of deployment config files: Dockerfiles, K8s manifests, etc.]199200 Create comprehensive C4 Container-level documentation following this structure:201 1. **Containers Section** (for each container):202 - Name: [Container name]203 - Description: [Short description of container purpose and deployment]204 - Type: [Web Application, API, Database, Message Queue, etc.]205 - Technology: [Primary technologies: Node.js, Python, PostgreSQL, etc.]206 - Deployment: [Docker, Kubernetes, Cloud Service, etc.]207 2. **Purpose Section** (for each container):208 - Detailed description of what this container does209 - How it's deployed210 - Its role in the system211 3. **Components Section** (for each container):212 - List all components deployed in this container213 - Link to component documentation214 4. **Interfaces Section** (for each container):215 - Document all container APIs and interfaces:216 - API/Interface name217 - Protocol (REST, GraphQL, gRPC, Events, etc.)218 - Description219 - Link to OpenAPI/Swagger/API Spec file220 - List of endpoints/operations221 5. **API Specifications**:222 - For each container API, create an OpenAPI 3.1+ specification223 - Save as: C4-Documentation/apis/[container-name]-api.yaml224 - Include:225 - All endpoints with methods (GET, POST, etc.)226 - Request/response schemas227 - Authentication requirements228 - Error responses229 6. **Dependencies Section** (for each container):230 - Containers used (other containers this depends on)231 - External systems (databases, third-party APIs, etc.)232 - Communication protocols233 7. **Infrastructure Section** (for each container):234 - Link to deployment config (Dockerfile, K8s manifest, etc.)235 - Scaling strategy236 - Resource requirements (CPU, memory, storage)237 8. **Container Diagram**:238 - Mermaid diagram showing all containers and their relationships239 - Show communication protocols240 - Show external system dependencies241242 Save the output as: C4-Documentation/c4-container.md243244- Expected output: c4-container.md with all containers and API specifications245- Context: All component documentation and deployment definitions246247## Phase 4: Context-Level Documentation248249### 4.1 Analyze System Documentation250251- Review container and component documentation252- Search for system documentation:253 - README files254 - Architecture documentation255 - Requirements documents256 - Design documents257 - Test files (to understand system behavior)258 - API documentation259 - User documentation260261### 4.2 Create Context Documentation262263- Use Task tool with subagent_type="c4-architecture::c4-context"264- Prompt: |265 Create comprehensive C4 Context-level documentation for the system.266267 Container documentation: C4-Documentation/c4-container.md268 Component documentation: C4-Documentation/c4-component.md269 System documentation: [List of README, architecture docs, requirements, etc.]270 Test files: [List of test files that show system behavior]271272 Create comprehensive C4 Context-level documentation following this structure:273 1. **System Overview Section**:274 - Short Description: [One-sentence description of what the system does]275 - Long Description: [Detailed description of system purpose, capabilities, problems solved]276 2. **Personas Section**:277 - For each persona (human users and programmatic "users"):278 - Persona name279 - Type (Human User / Programmatic User / External System)280 - Description (who they are, what they need)281 - Goals (what they want to achieve)282 - Key features used283 3. **System Features Section**:284 - For each high-level feature:285 - Feature name286 - Description (what this feature does)287 - Users (which personas use this feature)288 - Link to user journey map289 4. **User Journeys Section**:290 - For each key feature and persona:291 - Journey name: [Feature Name] - [Persona Name] Journey292 - Step-by-step journey:293 1. [Step 1]: [Description]294 2. [Step 2]: [Description]295 ...296 - Include all system touchpoints297 - For programmatic users (external systems, APIs):298 - Integration journey with step-by-step process299 5. **External Systems and Dependencies Section**:300 - For each external system:301 - System name302 - Type (Database, API, Service, Message Queue, etc.)303 - Description (what it provides)304 - Integration type (API, Events, File Transfer, etc.)305 - Purpose (why the system depends on this)306 6. **System Context Diagram**:307 - Mermaid C4Context diagram showing:308 - The system (as a box in the center)309 - All personas (users) around it310 - All external systems around it311 - Relationships and data flows312 - Use C4Context notation for proper C4 diagram313 7. **Related Documentation Section**:314 - Links to container documentation315 - Links to component documentation316317 Save the output as: C4-Documentation/c4-context.md318319 Ensure the documentation is:320 - Understandable by non-technical stakeholders321 - Focuses on system purpose, users, and external relationships322 - Includes comprehensive user journey maps323 - Identifies all external systems and dependencies324325- Expected output: c4-context.md with complete system context326- Context: All container, component, and system documentation327328## Configuration Options329330- `target_directory`: Root directory to analyze (default: current repository root)331- `exclude_patterns`: Patterns to exclude (default: node_modules, .git, build, dist, etc.)332- `output_directory`: Where to write C4 documentation (default: C4-Documentation/)333- `include_tests`: Whether to analyze test files for context (default: true)334- `api_format`: Format for API specs (default: openapi)335336## Success Criteria337338- ✅ Every subdirectory has a corresponding c4-code-\*.md file339- ✅ All code-level documentation includes complete function signatures340- ✅ Components are logically grouped with clear boundaries341- ✅ All components have interface documentation342- ✅ Master component index created with relationship diagram343- ✅ Containers map to actual deployment units344- ✅ All container APIs documented with OpenAPI/Swagger specs345- ✅ Container diagram shows deployment architecture346- ✅ System context includes all personas (human and programmatic)347- ✅ User journeys documented for all key features348- ✅ All external systems and dependencies identified349- ✅ Context diagram shows system, users, and external systems350- ✅ Documentation is organized in C4-Documentation/ directory351352## Output Structure353354```355C4-Documentation/356├── c4-code-*.md # Code-level docs (one per directory)357├── c4-component-*.md # Component-level docs (one per component)358├── c4-component.md # Master component index359├── c4-container.md # Container-level docs360├── c4-context.md # Context-level docs361└── apis/ # API specifications362 ├── [container]-api.yaml # OpenAPI specs for each container363 └── ...364```365366## Coordination Notes367368- **Bottom-up processing**: Process directories from deepest to shallowest369- **Incremental synthesis**: Each level builds on the previous level's documentation370- **Complete coverage**: Every directory must have code-level documentation before synthesis371- **Link consistency**: All documentation files link to each other appropriately372- **API documentation**: Container APIs must have OpenAPI/Swagger specifications373- **Stakeholder-friendly**: Context documentation should be understandable by non-technical stakeholders374- **Mermaid diagrams**: Use proper C4 Mermaid notation for all diagrams375376## Example Usage377378```bash379/c4-architecture:c4-architecture380```381382This will:3833841. Walk through all subdirectories bottom-up3852. Create c4-code-\*.md for each directory3863. Synthesize into components3874. Map to containers with API docs3885. Create system context with personas and journeys389390All documentation written to: C4-Documentation/391392## Limitations393- Use this skill only when the task clearly matches the scope described above.394- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.395- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.396397---398399**Source:** [`sickn33/agentic-awesome-skills`](https://github.com/sickn33/agentic-awesome-skills) → `skills/c4-architecture-c4-architecture/SKILL.md`400401**Also appears in:** `sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills/skills/c4-architecture-c4-architecture/SKILL.md`, `sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills-claude/skills/c4-architecture-c4-architecture/SKILL.md`