c4-diagram

Generate C4 context and container diagrams in Mermaid, flowchart, or PlantUML from YAML frontmatter.

49|12|Updated Jan 8, 2026
One-click install
npx skills add https://github.com/DavidROliverBA/ArchitectKB --skill c4-diagram
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: c4-diagram
Source: https://github.com/DavidROliverBA/ArchitectKB/tree/main/.claude/skills/c4-diagram
Command: npx skills add https://github.com/DavidROliverBA/ArchitectKB --skill c4-diagram

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the creation of C4 architecture diagrams directly from your system notes, transforming structured data into visual representations of your architecture.

Core Features & Use Cases

  • Multiple Diagram Formats: Generates diagrams in Mermaid, flowchart, or PlantUML formats.
  • Context & Container Levels: Supports both Level 1 (Context) and Level 2 (Container) diagrams.
  • Use Case: You've just updated the c4: frontmatter for your 'User Authentication Service'. Run this skill to generate an up-to-date Mermaid diagram that you can embed directly into your system's documentation.

Quick Start

Generate a C4 context and container diagram for the 'Data Platform' system using the default mermaid format.

Frequently Asked Questions about c4-diagram

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

FAQPage Schema
How do I generate C4 architecture diagrams from my system notes?

You can generate C4 architecture diagrams by parsing YAML frontmatter data from your system notes. This Skill applies C4 modeling principles to transform structured metadata directly into visual architecture diagrams.

Can I create both context and container level diagrams using Mermaid and PlantUML?

Yes, you can create both Level 1 context and Level 2 container diagrams using Mermaid, PlantUML, or flowchart formats. Output formats are optimized for various rendering needs, including Obsidian rendering and formal documentation.

What is the best way to automate architecture documentation from YAML frontmatter?

The best way to automate architecture documentation from YAML frontmatter is using a Skill that maps structured data to C4 modeling principles. It automatically applies specific syntax rules to output up-to-date Mermaid or PlantUML diagrams for your systems.

Does this C4 diagram generator work with Obsidian for layout control?

Yes, this C4 diagram generator works with Obsidian by offering output formats specifically optimized for Obsidian rendering and layout control. It generates Mermaid and flowchart syntax that integrates directly into your system notes.

How do I parse YAML frontmatter to output PlantUML C4 diagrams?

Parsing YAML frontmatter to output PlantUML C4 diagrams requires extracting the structured system data and applying specific PlantUML syntax rules based on C4 modeling principles. This Skill automates that parsing and syntax generation process.

When should I use flowchart format over Mermaid for C4 modeling?

You should use flowchart format over Mermaid for C4 modeling when you need specific layout control optimized for your documentation environment. Both formats parse the same YAML frontmatter data but apply different syntax rules for distinct rendering outputs.