Skip to main content
skill CX Codex

c4-architecture · microsoft — Claude Code skill for C4 diagrams

This skill turns code or system requirements into C4 architecture diagrams. Use it to document an existing project or map out a planned one with Mermaid.

no license ★ 1,627 updated 2026-10-25

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add microsoft/hve-core --skill c4-architecture -a claude-code
Open on GitHub

What c4-architecture does

The skill examines relevant code and documentation to identify system boundaries, parts, and relationships. New diagrams usually cover system context, containers, and components; code-level detail is added on request. It offers a deployment view when the available evidence supports one, and asks which environment to show.

Mermaid is the default renderer. Previewing requires a Markdown host that can display Mermaid. CLI render checks need Node.js, mmdc, and a Chrome or Chromium runtime, so that check cannot run without them. When key modelling choices remain unresolved or the evidence does not support a diagram, the skill pauses for clarification instead of filling gaps with guesses.

What it helps with

  • show system users and external interactions
  • break a system into runnable or deployable units
  • map the main parts inside a container
  • relate a component to code structures
  • show where instances run in a chosen environment

Example prompts for the agent

  • Create C4 diagrams for this project from its code and docs.
  • Map the system context and containers from the project requirements.
  • Update the existing C4 diagrams while keeping unrelated content intact.

How to install c4-architecture

1Skills CLI (Vercel)

npx skills add microsoft/hve-core --skill c4-architecture -a claude-code

2Manually: put the files in place

~/.claude/skills/c4-architecture/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/c4-architecture/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about c4-architecture

How do I install c4-architecture in Claude Code?

Run npx skills add microsoft/hve-core --skill c4-architecture -a claude-code. The skill file is at ~/.claude/skills/c4-architecture/SKILL.md.

What does c4-architecture do?

It creates or revises C4 architecture diagrams from code, documentation, or requirements. Mermaid is its default renderer.

What is needed to preview or validate Mermaid diagrams?

Preview requires a Markdown host that supports Mermaid. CLI render validation needs Node.js, @mermaid-js/mermaid-cli (mmdc) on PATH, and Chrome or Chromium.

Similar skills

All skills for DevOps and infrastructure →

c4-architecture by other authors comes first.

c4-architecture coco-research c4-architecture generates architecture documentation using C4 model: system context, containers, components and deployment as Mermaid diagrams. CX Codex +1 ★ 328repo stars multi-cloud-architecture Seth Hobson The multi-cloud-architecture skill helps design systems across AWS, Azure, GCP, and OCI, compare services, and choose a migration or disaster recovery pattern. CX Codex +1 10,700installs architecture-designer https://github.com/Jeffallan architecture-designer designs distributed system architectures, creates Mermaid diagrams, and writes Architecture Decision Records. It helps balance trade-offs before writing service code. CX Codex +1 8,500installs architecture official anthropics Writes an Architecture Decision Record or reviews a system design: options, trade-offs, consequences. Useful when you have to pick between technologies. CX Codex +1 7,200installs google-cloud-solution-architecture official google google-cloud-solution-architecture is a Claude Code skill for designing multi-service Google Cloud systems. It gathers workload or migration requirements before shaping a solution. CX Codex +1 5,980installs agentforce-architecture-analyze forcedotcom agentforce-architecture-analyze builds a metadata tree for one Agentforce agent: planner, topics, actions, flows, Apex, prompts and NGA plugins. Renders a document and a Mermaid invocation graph. CX Codex +1 5,900installs platform-architecture-analyze forcedotcom platform-architecture-analyze audits Salesforce DX projects against the Salesforce Well-Architected framework. Generates an evidence-backed health report without editing code. CX Codex +1 3,100installs

From the same set148

The whole set →
dt-methods dt-methods is a Claude Code skill that gives the dt-coach agent a knowledge base of nine Design Thinking methods and nine industry contexts. CX Codex +1 ★ 1,627repo stars rpi-challenger The rpi-challenger skill questions a confirmed task, decision, plan, or artifact to bring assumptions to the surface. It asks you to confirm the scope before the questioning starts. CX Codex +1 ★ 1,627repo stars python-foundational python-foundational — a checklist skill covering Python style, idioms, typing and error handling that Claude Code applies automatically to diffs touching .py files. CX Codex +1 ★ 1,627repo stars ml-experimentation ml-experimentation is a Claude Code skill that applies Microsoft CSE practices to ML experiment tracking, reproducibility, and production readiness checks. CX Codex +1 ★ 1,627repo stars Code Review Readiness Code Review Readiness is a Claude Code subagent that checks pull requests as deliverables. The Code Review orchestrator runs it as one perspective. CX Codex +1 ★ 1,627repo stars standards-mapping standards-mapping maps architecture components to OWASP, NIST, CIS, and cloud security frameworks during security planning workflows in Claude Code. CX Codex +1 ★ 1,627repo stars Accessibility Surface Inventory Accessibility Surface Inventory maps a project's routes, UI surfaces, and interaction states, then writes a config for accessibility runtime probes. Useful when a workflow needs a reviewable inventory before testing. CX Codex +1 ★ 1,627repo stars pr-reference pr-reference collects commits and diffs between branches into structured XML. Useful for writing PR descriptions, preparing code reviews, and analyzing what changed in a branch. CX Codex +1 ★ 1,627repo stars

Project sponsors

Companies that keep this analytics open