Tooluck logoTooluck
SKILL.md

c4-architecture

Agent skill fromsoftaworks/agent-toolkit

Generate architecture documentation using C4 model Mermaid diagrams. Use when asked to create architecture diagrams, document system architecture, visualize software structure, create C4 diagrams, or generate context/container/component/deployment diagrams. Triggers include "architecture diagram", "C4 diagram", "system context", "container diagram", "component diagram", "deployment diagram", "document architecture", "visualize architecture".

How to install c4-architecture

install c4-architecture
# install the agent-toolkit pack with the skills CLI
npx skills add softaworks/agent-toolkit

# or add only this skill to Claude Code: copy the folder

skills/c4-architecture/

# into

~/.claude/skills/c4-architecture/ (all projects)

.claude/skills/c4-architecture/ (one project)

skills/c4-architecture/SKILL.md

MITFull file
1# C4 Architecture Documentation
2
3Generate software architecture documentation using C4 model diagrams in Mermaid syntax.
4
5## Workflow
6
71. **Understand scope** - Determine which C4 level(s) are needed based on audience
82. **Analyze codebase** - Explore the system to identify components, containers, and relationships
93. **Generate diagrams** - Create Mermaid C4 diagrams at appropriate abstraction levels
104. **Document** - Write diagrams to markdown files with explanatory context
11
12## C4 Diagram Levels
13
14Select the appropriate level based on the documentation need:
15
16| Level | Diagram Type | Audience | Shows | When to Create |
17|-------|-------------|----------|-------|----------------|
18| 1 | **C4Context** | Everyone | System + external actors | Always (required) |
19| 2 | **C4Container** | Technical | Apps, databases, services | Always (required) |
20| 3 | **C4Component** | Developers | Internal components | Only if adds value |
21| 4 | **C4Deployment** | DevOps | Infrastructure nodes | For production systems |
22| - | **C4Dynamic** | Technical | Request flows (numbered) | For complex workflows |
23
24**Key Insight:** "Context + Container diagrams are sufficient for most software development teams." Only create Component/Code diagrams when they genuinely add value.
25
26## Quick Start Examples
27
28### System Context (Level 1)
29```mermaid
30C4Context
31 title System Context - Workout Tracker
32
33 Person(user, "User", "Tracks workouts and exercises")
34…

Excerpt shown under the repository's MIT license.

More skills in agent-toolkit

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates