c4-architecture
Skill2.5k starsChanged 10 months agoMITView on GitHub
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".
12 other projects use a version of this, 2 of them edited.
Trending
More talk lately.about the whole repository
Most recently taken up by
- delorenj/skillsword for word, first seen Oct 2, 2026
- microsoft/hve-coretheir own version, first seen Sep 29, 2026
- shalomb/agent-skillsword for word, first seen Aug 23, 2026
- coco-research/cocoedited, first seen Jul 18, 2026
- selamy-labs/agent-skillstheir own version, first seen Jul 12, 2026
- alexanderop/skillsword for word, first seen Jun 6, 2026
Who's talking about softaworks/agent-toolkit
- sudosubin/agents.nix“codex-plugins.github.softaworks.agent-toolkit: init at 0-unstable-2026-03-05”GitHub · Oct 4, 2026
- sudosubin/agents.nix“claude-code-plugins.github.softaworks.agent-toolkit: init at 0-unstable-2026-03-05”GitHub · Oct 4, 2026
- sudosubin/agents.nix“claude-code-marketplaces.github.softaworks.agent-toolkit: init at 0-unstable-2026-03-05”GitHub · Oct 4, 2026
- sudosubin/agents.nix“agent-skills.github.softaworks.agent-toolkit: init at 0-unstable-2026-02-08”GitHub · Oct 2, 2026
- eranroseman/agent-plugins“Curate skills from https://github.com/softaworks/agent-toolkit”GitHub · Sep 12, 2026
The biggest 5 of 40 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 40
Talked about on GitHub (40 times).
On GitHub · 40
- Oct 4, 2026codex-plugins.github.softaworks.agent-toolkit: init at 0-unstable-2026-03-05 — sudosubin/agents.nix0 reactions
- Oct 4, 2026claude-code-plugins.github.softaworks.agent-toolkit: init at 0-unstable-2026-03-05 — sudosubin/agents.nix0 reactions
- Oct 4, 2026claude-code-marketplaces.github.softaworks.agent-toolkit: init at 0-unstable-2026-03-05 — sudosubin/agents.nix0 reactions
- Oct 2, 2026agent-skills.github.softaworks.agent-toolkit: init at 0-unstable-2026-02-08 — sudosubin/agents.nix0 reactions
- Sep 12, 2026Curate skills from https://github.com/softaworks/agent-toolkit — eranroseman/agent-plugins0 reactions · 2 comments
35 more on GitHub
- Apr 25, 2026Audit candidate: softaworks/agent-toolkit — xiaolai/nlpm0 reactions · 3 comments
- Mar 31, 2026Remove unecessary useEffects from frontend — superplanehq/superplane0 reactions · 2 comments
- Mar 9, 2026[SUBMISSION] softaworks/agent-toolkit — ProSkillsMD/proskills0 reactions · 1 comment
- Feb 2, 2026New skill: /softaworks-react-dev (medium risk) — aiskillstore/marketplace0 reactions
- Feb 2, 2026New skill: /softaworks-react-useeffect (medium risk) — aiskillstore/marketplace0 reactions
- Feb 2, 2026New skill: /softaworks-game-changing-features (medium risk) — aiskillstore/marketplace0 reactions
- Feb 2, 2026New skill: /softaworks-naming-analyzer (medium risk) — aiskillstore/marketplace0 reactions
- Feb 2, 2026New skill: /softaworks-openapi-to-typescript (medium risk) — aiskillstore/marketplace0 reactions
- Feb 2, 2026New skill: /softaworks-database-schema-designer (medium risk) — aiskillstore/marketplace0 reactions
- Jan 28, 2026New skill: /softaworks-c4-architecture (safe risk) — aiskillstore/marketplace0 reactions
- Jan 28, 2026New skill: /softaworks-professional-communication (safe risk) — aiskillstore/marketplace0 reactions
- Jan 28, 2026New skill: /softaworks-plugin-forge (safe risk) — aiskillstore/marketplace0 reactions
- Jan 28, 2026New skill: /softaworks-feedback-mastery (safe risk) — aiskillstore/marketplace0 reactions
- Jan 28, 2026New skill: /softaworks-difficult-workplace-conversations (safe risk) — aiskillstore/marketplace0 reactions
- Jan 28, 2026New skill: /softaworks-humanizer (safe risk) — aiskillstore/marketplace0 reactions
- Jan 27, 2026Integrate humanizer guidelines for documentation quality — shelbeely/ADHD-Closet0 reactions
- Jan 26, 2026New skill: /softaworks-command-creator (safe risk) — aiskillstore/marketplace0 reactions
- Jan 26, 2026New skill: /softaworks-marp-slide (low risk) — aiskillstore/marketplace0 reactions
- Jan 26, 2026New skill: /softaworks-skill-judge (safe risk) — aiskillstore/marketplace0 reactions
- Jan 26, 2026New skill: /softaworks-writing-clearly-and-concisely (safe risk) — aiskillstore/marketplace0 reactions
- Jan 26, 2026New skill: /softaworks-crafting-effective-readmes (safe risk) — aiskillstore/marketplace0 reactions
- Jan 26, 2026New skill: /softaworks-gepetto (safe risk) — aiskillstore/marketplace0 reactions
- Jan 26, 2026New skill: /softaworks-mermaid-diagrams (safe risk) — aiskillstore/marketplace0 reactions
- Jan 26, 2026New skill: /softaworks-reducing-entropy (safe risk) — aiskillstore/marketplace0 reactions
- Jan 26, 2026New skill: /softaworks-ship-learn-next (safe risk) — aiskillstore/marketplace0 reactions
- Jan 24, 2026New skill: /softaworks-codex (safe risk) — aiskillstore/marketplace0 reactions
- Jan 24, 2026New skill: /softaworks-daily-meeting-update (safe risk) — aiskillstore/marketplace0 reactions
- Jan 24, 2026New skill: /softaworks-domain-name-brainstormer (safe risk) — aiskillstore/marketplace0 reactions
- Jan 24, 2026New skill: /softaworks-commit-work (safe risk) — aiskillstore/marketplace0 reactions
- Jan 24, 2026New skill: /softaworks-agent-md-refactor (safe risk) — aiskillstore/marketplace0 reactions
- Jan 24, 2026New skill: /softaworks-session-handoff (low risk) — aiskillstore/marketplace0 reactions
- Jan 24, 2026New skill: /softaworks-dependency-updater (low risk) — aiskillstore/marketplace0 reactions
- Jan 24, 2026New skill: /softaworks-qa-test-planner (low risk) — aiskillstore/marketplace0 reactions
- Jan 24, 2026New skill: /softaworks-meme-factory (low risk) — aiskillstore/marketplace0 reactions
- Jan 24, 2026New skill: /softaworks-gemini (low risk) — aiskillstore/marketplace0 reactions
Used with
Projects with it also use test-driven-development.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
OpenAISkilltest-driven-development
Use when implementing any feature or bugfix, before writing implementation code
Also in 3 projects that use this
Other versions12 projects use a version of this.
Word for word · 7
- delorenj/skills★ 15100% same
- eugenepyvovarov/mcpbundler-agent-skills-marketplace★ 11100% same
- alexanderop/skills★ 4100% same
- shalomb/agent-skills★ 3100% same
- fefogarcia/approved-skills★ 2100% same
- vjrivmon/Setup-Software-IA★ 1100% same
- nbirkner/digital-brain★ 0100% same
Edited · 2
- coco-research/coco★ 43798% same
- c-b-g-m/claude-code-quickstart★ 195% same
Wrote their own version · 3
- microsoft/hve-core★ 1.5ksame name
- sergeeey/Claude-cod-top-2026★ 9same name
- selamy-labs/agent-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository44 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-md-refactorSkill
- backend-to-frontend-handoff-docsSkill
- codexSkill
- command-creatorSkill
- commit-workSkill
- crafting-effective-readmesSkill
- daily-meeting-updateSkill
- database-schema-designerSkill
- datadog-cliSkill
- dependency-updaterSkill
- design-system-starterSkill
- difficult-workplace-conversationsSkill
- domain-name-brainstormerSkill
- draw-ioSkill
- excalidrawSkill
- feedback-masterySkill
- frontend-to-backend-requirementsSkill
- game-changing-featuresSkill
- geminiSkill
- gepettoSkill
- humanizerSkill
- jiraSkill
- lesson-learnedSkill
- marp-slideSkill
- meme-factorySkill
- mermaid-diagramsSkill
- muiSkill
- naming-analyzerSkill
- openapi-to-typescriptSkill
- perplexitySkill
- plugin-forgeSkill
- professional-communicationSkill
- qa-test-plannerSkill
- react-devSkill
- react-useeffectSkill
- reducing-entropySkill
- requirements-claritySkill
- session-handoffSkill
- ship-learn-nextSkill
- skill-judgeSkill
- web-to-markdownSkill
- writing-clearly-and-conciselySkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 4 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Generate diagrams: - Create Mermaid C4 diagrams at appropriate abstraction levels
- Distinctive: line 15
Document: - Write diagrams to markdown files with explanatory context
- Very specific: line 194
Use $offsetX and $offsetY to fix overlapping relationship labels.
- Distinctive: line 209
One diagram per file: - Keep diagrams focused on a single abstraction level
- Very specific: line 210
Meaningful aliases: - Use descriptive aliases (e.g., orderService not s1)
- Distinctive: line 211
Concise descriptions: - Keep descriptions under 50 characters when possible
- Very specific: line 274
Write architecture documentation to docs/architecture/ with naming convention:
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
C4 Architecture Documentation
Generate software architecture documentation using C4 model diagrams in Mermaid syntax.
Workflow
- Understand scope - Determine which C4 level(s) are needed based on audience
- Analyze codebase - Explore the system to identify components, containers, and relationships
- Generate diagrams - Create Mermaid C4 diagrams at appropriate abstraction levels
- Document - Write diagrams to markdown files with explanatory context
C4 Diagram Levels
Select the appropriate level based on the documentation need:
| Level | Diagram Type | Audience | Shows | When to Create |
| 1 | C4Context | Everyone | System + external actors | Always (required) |
| 2 | C4Container | Technical | Apps, databases, services | Always (required) |
| 3 | C4Component | Developers | Internal components | Only if adds value |
| 4 | C4Deployment | DevOps | Infrastructure nodes | For production systems |
| - | C4Dynamic | Technical | Request flows (numbered) | For complex workflows |
Key Insight: "Context + Container diagrams are sufficient for most software development teams." Only create Component/Code diagrams when they genuinely add value.
Quick Start Examples
System Context (Level 1)
C4Context
title System Context - Workout Tracker
Person(user, "User", "Tracks workouts and exercises")
System(app, "Workout Tracker", "Vue PWA for tracking strength and CrossFit workouts")
System_Ext(browser, "Web Browser", "Stores data in IndexedDB")
Rel(user, app, "Uses")
Rel(app, browser, "Persists data to", "IndexedDB")Container Diagram (Level 2)
C4Container
title Container Diagram - Workout Tracker
Person(user, "User", "Tracks workouts")
Container_Boundary(app, "Workout Tracker PWA") {
Container(spa, "SPA", "Vue 3, TypeScript", "Single-page application")
Container(pinia, "State Management", "Pinia", "Manages application state")
ContainerDb(indexeddb, "IndexedDB", "Dexie", "Local workout storage")
}
Rel(user, spa, "Uses")
Rel(spa, pinia, "Reads/writes state")
Rel(pinia, indexeddb, "Persists", "Dexie ORM")Component Diagram (Level 3)
C4Component
title Component Diagram - Workout Feature
Container(views, "Views", "Vue Router pages")
Container_Boundary(workout, "Workout Feature") {
Component(useWorkout, "useWorkout", "Composable", "Workout execution state")
Component(useTimer, "useTimer", "Composable", "Timer state machine")
Component(workoutRepo, "WorkoutRepository", "Dexie", "Workout persistence")
}
Rel(views, useWorkout, "Uses")
Rel(useWorkout, useTimer, "Controls")
Rel(useWorkout, workoutRepo, "Saves to")Dynamic Diagram (Request Flow)
C4Dynamic
title Dynamic Diagram - User Sign In Flow
ContainerDb(db, "Database", "PostgreSQL", "User credentials")
Container(spa, "Single-Page App", "React", "Banking UI")
Container_Boundary(api, "API Application") {
Component(signIn, "Sign In Controller", "Express", "Auth endpoint")
Component(security, "Security Service", "JWT", "Validates credentials")
}
Rel(spa, signIn, "1. Submit credentials", "JSON/HTTPS")
Rel(signIn, security, "2. Validate")
Rel(security, db, "3. Query user", "SQL")
UpdateRelStyle(spa, signIn, $textColor="blue", $offsetY="-30")Deployment Diagram
C4Deployment
title Deployment Diagram - Production
Deployment_Node(browser, "Customer Browser", "Chrome/Firefox") {
Container(spa, "SPA", "React", "Web application")
}
Deployment_Node(aws, "AWS Cloud", "us-east-1") {
Deployment_Node(ecs, "ECS Cluster", "Fargate") {
Container(api, "API Service", "Node.js", "REST API")
}
Deployment_Node(rds, "RDS", "db.r5.large") {
ContainerDb(db, "Database", "PostgreSQL", "Application data")
}
}
Rel(spa, api, "API calls", "HTTPS")
Rel(api, db, "Reads/writes", "JDBC")Element Syntax
People and Systems
Person(alias, "Label", "Description")
Person_Ext(alias, "Label", "Description") # External person
System(alias, "Label", "Description")
System_Ext(alias, "Label", "Description") # External system
SystemDb(alias, "Label", "Description") # Database system
SystemQueue(alias, "Label", "Description") # Queue systemContainers
Container(alias, "Label", "Technology", "Description")
Container_Ext(alias, "Label", "Technology", "Description")
ContainerDb(alias, "Label", "Technology", "Description")
ContainerQueue(alias, "Label", "Technology", "Description")Components
Component(alias, "Label", "Technology", "Description")
Component_Ext(alias, "Label", "Technology", "Description")
ComponentDb(alias, "Label", "Technology", "Description")Boundaries
Enterprise_Boundary(alias, "Label") { ... }
System_Boundary(alias, "Label") { ... }
Container_Boundary(alias, "Label") { ... }
Boundary(alias, "Label", "type") { ... }Relationships
Rel(from, to, "Label")
Rel(from, to, "Label", "Technology")
BiRel(from, to, "Label") # Bidirectional
Rel_U(from, to, "Label") # Upward
Rel_D(from, to, "Label") # Downward
Rel_L(from, to, "Label") # Leftward
Rel_R(from, to, "Label") # RightwardDeployment Nodes
Deployment_Node(alias, "Label", "Type", "Description") { ... }
Node(alias, "Label", "Type", "Description") { ... } # ShorthandStyling and Layout
Layout Configuration
UpdateLayoutConfig($c4ShapeInRow="3", $c4BoundaryInRow="1")$c4ShapeInRow- Number of shapes per row (default: 4)$c4BoundaryInRow- Number of boundaries per row (default: 2)
Element Styling
UpdateElementStyle(alias, $fontColor="red", $bgColor="grey", $borderColor="red")Relationship Styling
UpdateRelStyle(from, to, $textColor="blue", $lineColor="blue", $offsetX="5", $offsetY="-10")Use $offsetX and $offsetY to fix overlapping relationship labels.
Best Practices
Essential Rules
- Every element must have: Name, Type, Technology (where applicable), and Description
- Use unidirectional arrows only - Bidirectional arrows create ambiguity
- Label arrows with action verbs - "Sends email using", "Reads from", not just "uses"
- Include technology labels - "JSON/HTTPS", "JDBC", "gRPC"
- Stay under 20 elements per diagram - Split complex systems into multiple diagrams
Clarity Guidelines
- Start at Level 1 - Context diagrams help frame the system scope
- One diagram per file - Keep diagrams focused on a single abstraction level
- Meaningful aliases - Use descriptive aliases (e.g.,
orderServicenots1) - Concise descriptions - Keep descriptions under 50 characters when possible
- Always include a title - "System Context diagram for [System Name]"
What to Avoid
See references/common-mistakes.md for detailed anti-patterns:
- Confusing containers (deployable) vs components (non-deployable)
- Modeling shared libraries as containers
- Showing message brokers as single containers instead of individual topics
- Adding undefined abstraction levels like "subcomponents"
- Removing type labels to "simplify" diagrams
Microservices Guidelines
Single Team Ownership
Model each microservice as a container (or container group):
C4Container
title Microservices - Single Team
System_Boundary(platform, "E-commerce Platform") {
Container(orderApi, "Order Service", "Spring Boot", "Order processing")
ContainerDb(orderDb, "Order DB", "PostgreSQL", "Order data")
Container(inventoryApi, "Inventory Service", "Node.js", "Stock management")
ContainerDb(inventoryDb, "Inventory DB", "MongoDB", "Stock data")
}Multi-Team Ownership
Promote microservices to software systems when owned by separate teams:
C4Context
title Microservices - Multi-Team
Person(customer, "Customer", "Places orders")
System(orderSystem, "Order System", "Team Alpha")
System(inventorySystem, "Inventory System", "Team Beta")
System(paymentSystem, "Payment System", "Team Gamma")
Rel(customer, orderSystem, "Places orders")
Rel(orderSystem, inventorySystem, "Checks stock")
Rel(orderSystem, paymentSystem, "Processes payment")Event-Driven Architecture
Show individual topics/queues as containers, NOT a single "Kafka" box:
C4Container
title Event-Driven Architecture
Container(orderService, "Order Service", "Java", "Creates orders")
Container(stockService, "Stock Service", "Java", "Manages inventory")
ContainerQueue(orderTopic, "order.created", "Kafka", "Order events")
ContainerQueue(stockTopic, "stock.reserved", "Kafka", "Stock events")
Rel(orderService, orderTopic, "Publishes to")
Rel(stockService, orderTopic, "Subscribes to")
Rel(stockService, stockTopic, "Publishes to")
Rel(orderService, stockTopic, "Subscribes to")Output Location
Write architecture documentation to docs/architecture/ with naming convention:
c4-context.md- System context diagramc4-containers.md- Container diagramc4-components-{feature}.md- Component diagrams per featurec4-deployment.md- Deployment diagramc4-dynamic-{flow}.md- Dynamic diagrams for specific flows
Audience-Appropriate Detail
| Audience | Recommended Diagrams |
| Executives | System Context only |
| Product Managers | Context + Container |
| Architects | Context + Container + key Components |
| Developers | All levels as needed |
| DevOps | Container + Deployment |
References
- references/c4-syntax.md - Complete Mermaid C4 syntax
- references/common-mistakes.md - Anti-patterns to avoid
- references/advanced-patterns.md - Microservices, event-driven, deployment
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

