c4-analyze

Generate C4 architecture diagrams from codebases as draw.io files.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/cjennings/rulesets --skill c4-analyze
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: c4-analyze
Source: https://github.com/cjennings/rulesets/tree/main/c4-analyze
Command: npx skills add https://github.com/cjennings/rulesets --skill c4-analyze

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Analyze codebases to automatically generate C4 architecture diagrams (System Context, Container, Component), enabling quick architecture visualization and documentation.

Core Features & Use Cases

  • C4 Model Generation: Produce System Context, Container, and Component diagrams from codebases.
  • Repository Scanning: Detect project boundaries, containers, and dependencies in monorepos or multi-module repositories.
  • Export-Ready Diagrams: Output draw.io compatible diagrams for documentation and arch reviews.

Quick Start

Analyze the current repository to generate C4 diagrams for the entire project or a specified subpath.

Frequently Asked Questions about c4-analyze

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 diagrams visualize system structure by detecting containers, components, and external actors from your codebase. This Skill generates Level 1 System Context and Level 2 Container diagrams, with Level 3 Component diagrams on drilldown, to map relationships.

How do I visualize system structure in a monorepo or multi-module repository?

Yes, you can export C4 diagrams to draw.io. This Skill outputs draw.io compatible diagrams that map detected containers, components, and external actors, making them ready for documentation and architecture reviews.

What is the best way to automate system design documentation for a software project?

C4 model generation scans the codebase to detect external actors, containers, and components, mapping their relationships across System Context, Container, and Component diagrams. It outputs draw.io compatible files for architecture visualization and documentation.

Does this C4 diagram generator work with monorepos and multi-module repositories?

This Skill analyzes codebases to generate C4 architecture diagrams including System Context, Container, and Component diagrams. It detects project boundaries and dependencies in monorepos, outputting draw.io compatible diagrams for architecture visualization and documentation.

What limitations exist when generating C4 diagrams from code?

This Skill scans the codebase to detect project boundaries, containers, and dependencies in monorepos or multi-module repositories. It outputs draw.io compatible diagrams, providing Level 1 System Context and Level 2 Container diagrams with Level 3 Component diagrams on drilldown.