# c4-architecture

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.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 1627 repo stars
- Author: microsoft
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/microsoft/hve-core/tree/HEAD/.github/skills/hve-core/c4-architecture/SKILL.md
- Updated: 2026-10-25
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/microsoft-c4-architecture

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add microsoft/hve-core --skill c4-architecture -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/c4-architecture/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/c4-architecture/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add microsoft/hve-core --skill c4-architecture -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/c4-architecture/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add microsoft/hve-core --skill c4-architecture -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/c4-architecture/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install microsoft/hve-core .github/skills/hve-core/c4-architecture
```

2. **Manually: put the files in place**
- File: `.github/skills/c4-architecture/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add microsoft/hve-core --skill c4-architecture -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/microsoft/hve-core --path .github/skills/hve-core/c4-architecture
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/c4-architecture/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/microsoft/hve-core/tree/HEAD/.github/skills/hve-core/c4-architecture/SKILL.md

## When to use it
- 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
- 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.

## Similar
- [multi-cloud-architecture](https://affpapa.org/en/nevibecode/skills/multi-cloud-architecture.md) — skill · 10700 installs
- [architecture-designer](https://affpapa.org/en/nevibecode/skills/architecture-designer.md) — skill · 8500 installs
- [architecture](https://affpapa.org/en/nevibecode/skills/anthropics-architecture.md) — skill · 7200 installs
- [google-cloud-solution-architecture](https://affpapa.org/en/nevibecode/skills/google-cloud-solution-architecture.md) — skill · 5980 installs
- [agentforce-architecture-analyze](https://affpapa.org/en/nevibecode/skills/agentforce-architecture-analyze.md) — skill · 5900 installs
- [platform-architecture-analyze](https://affpapa.org/en/nevibecode/skills/platform-architecture-analyze.md) — skill · 3100 installs

## Other versions with the same name
- [c4-architecture · coco-research](https://affpapa.org/en/nevibecode/skills/coco-research-c4-architecture.md) — ★ 328 repo stars

From the same set: [microsoft/hve-core](https://affpapa.org/en/nevibecode/by/microsoft/hve-core.md) — 148 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
