# c4-architecture

Creates software architecture documentation and C4 model diagrams using Mermaid syntax from your codebase.

- skill · `type=skill` · Claude Code · 269 installs
- Author: davila7
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/skills/creative-design/c4-architecture
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/c4-architecture

## What it does

This skill inspects your project to generate structured C4 architecture documentation. It produces Mermaid diagrams embedded in markdown files alongside explanatory text.

The workflow supports multiple abstraction tiers. It covers system context (`C4Context`), runtime containers (`C4Container`), internal components (`C4Component`), and deployment infrastructure (`C4Deployment`). Numbered message flows can also be mapped with `C4Dynamic`. Context and container views are treated as essential, while component breakdowns remain optional.

Diagrams follow strict formatting conventions. Every relation demands a concrete technology tag, and bidirectional links are rejected to prevent ambiguity.

## Install

### Claude Code (native platform)

1. **claude-code-templates**
```bash
npx claude-code-templates@latest --skill creative-design/c4-architecture
```

2. **Skills CLI (Vercel)**
```bash
npx skills add davila7/claude-code-templates --skill c4-architecture -a claude-code
```

3. **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

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

### Cursor

**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 davila7/claude-code-templates c4-architecture
```

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

### Gemini CLI

**Platform CLI**
```bash
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/creative-design/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/davila7/claude-code-templates/tree/HEAD/cli-tool/components/skills/creative-design/c4-architecture

## When to use it
- map system boundaries and external actors
- document container architecture across databases and services
- visualize sequential API request flows using dynamic diagrams
- outline production infrastructure and deployment nodes

## Example prompts
- Generate a system context C4 diagram for this project in Mermaid format
- Document our backend containers and local storage setup
- Draw a C4Dynamic sequence for the authentication workflow

## Similar
- [grill-with-docs](https://affpapa.org/en/nevibecode/skills/grill-with-docs.md) — skill · 1219756 installs
- [skill-creator](https://affpapa.org/en/nevibecode/skills/skill-creator.md) — skill · 414180 installs
- [setup-matt-pocock-skills](https://affpapa.org/en/nevibecode/skills/setup-matt-pocock-skills.md) — skill · 1052851 installs
- [handoff](https://affpapa.org/en/nevibecode/skills/handoff.md) — skill · 1038491 installs
- [triage](https://affpapa.org/en/nevibecode/skills/triage.md) — skill · 990453 installs
- [domain-modeling](https://affpapa.org/en/nevibecode/skills/domain-modeling.md) — skill · 876391 installs

From the same set: [davila7/claude-code-templates](https://affpapa.org/en/nevibecode/by/davila7/claude-code-templates.md) — 804 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
