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
npx skills add microsoft/hve-core --skill c4-architecture -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/c4-architecture/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/c4-architecture/
1Skills CLI (Vercel)
npx skills add microsoft/hve-core --skill c4-architecture -a codex2Manually: put the files in place
.agents/skills/c4-architecture/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add microsoft/hve-core --skill c4-architecture -a cursor2Manually: put the files in place
.cursor/skills/c4-architecture/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install microsoft/hve-core .github/skills/hve-core/c4-architecture2Manually: put the files in place
.github/skills/c4-architecture/SKILL.md1Skills CLI (Vercel)
npx skills add microsoft/hve-core --skill c4-architecture -a gemini-cli2Platform CLI
gemini skills install https://github.com/microsoft/hve-core --path .github/skills/hve-core/c4-architectureManually: put the files in place
.devin/skills/c4-architecture/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.