c4-model

Generate C4 architecture documentation with Markdown outputs and Mermaid diagrams.

3|2|Updated Mar 23, 2026
One-click install
npx skills add https://github.com/wesleyegberto/software-engineering-skills --skill c4-model
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: c4-model
Source: https://github.com/wesleyegberto/software-engineering-skills/tree/main/plugins/architecture/skills/c4-model
Command: npx skills add https://github.com/wesleyegberto/software-engineering-skills --skill c4-model

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Generates structured C4 architecture documentation across Code, Component, Container, and Context levels using specialized agents to standardize system architecture communication.

Core Features & Use Cases

  • Create end-to-end C4 documentation from Code to Context levels, including code structure, component interfaces, container mappings, and system-context diagrams.
  • Generate Mermaid diagrams and master indices to visualize architectures and dependencies for discussions with stakeholders.
  • Provide ready-to-use templates and prompts to analyze codebases and produce repeatable architecture documentation.

Quick Start

Run the C4-model workflow against your codebase to generate complete architecture documentation.

Frequently Asked Questions about c4-model

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate C4 architecture diagrams from an existing codebase?

C4 architecture documentation is generated by processing input codebases through specialized agents that analyze component boundaries and container mappings. The workflow produces level-specific Markdown outputs and Mermaid diagrams across Context, Container, Component, and Code levels.

What is the best way to automate C4 model documentation across all levels?

Automating C4 model documentation is best achieved by running a workflow that uses reference templates and specialized agents to analyze codebases. This generates repeatable, structured Markdown documentation and Mermaid diagrams across all four C4 levels.

Can I generate only the Container level diagram without documenting the entire system?

Yes, you can generate only the Container level diagram without documenting the entire system because the workflow supports optional level selection. This allows you to target specific C4 levels individually rather than producing end-to-end documentation.

Do I need to manually define component boundaries before generating C4 documentation?

Yes, you need to define component boundaries before generating C4 documentation because the workflow requires these mappings as input. Providing component boundaries and reference templates ensures the generated architecture diagrams are consistent and actionable.

What format are the C4 architecture diagrams output in for stakeholder discussions?

C4 architecture diagrams are output in Mermaid diagram format embedded within Markdown files for stakeholder discussions. This format allows architecture dependencies and system structures to be visualized directly in version-controlled documentation.

When should I not use automated C4 model generation for architecture documentation?

You should not use automated C4 model generation when your codebase lacks clear component boundaries or container mappings, as the workflow requires these inputs to produce consistent documentation. Without defined reference templates, the generated diagrams may lack actionable architectural context.