c4-architecture
Skill1 starsChanged 10 months agoMITView on GitHub
Generate software architecture documentation using C4 model diagrams in Mermaid syntax.
12 other projects use a version of this, 9 of them edited.
Adopted by
Most recently taken up by
- delorenj/skillsedited, first seen Oct 2, 2026
- microsoft/hve-coretheir own version, first seen Sep 29, 2026
- shalomb/agent-skillsedited, 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/skillsedited, first seen Jun 6, 2026
Used with
Projects with it also use agent-md-refactor.
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.
softaworksSkillagent-md-refactor
Refactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles. Splits monolithic files into organized, linked documentation.
Also in 3 projects that use this
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 9
- softaworks/agent-toolkit★ 2.5k30% same
- coco-research/coco★ 43728% same
- delorenj/skills★ 1530% same
- eugenepyvovarov/mcpbundler-agent-skills-marketplace★ 1130% same
- alexanderop/skills★ 430% same
- shalomb/agent-skills★ 330% same
- fefogarcia/approved-skills★ 230% same
- vjrivmon/Setup-Software-IA★ 130% same
- nbirkner/digital-brain★ 030% 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 repository14 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- debuggingSkill
- dispatching-parallel-agentsSkill
- git-opsSkill
- kaizenSkill
- observabilitySkill
- gepettoSkill
- integrationsSkill
- frontend-slidesSkill
- image-generatorSkill
- specialized-skillsSkill
- test-driven-developmentSkill
- ui-developmentSkill
- writing-skillsSkill
The file
We split this skill into the rules it gives an agent
3 rules. 2 are common, 0 are distinctive, and 1 is very specific to this project.
2
Common
Most of the 10 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 13
Generate diagrams: - Create Mermaid C4 diagrams at appropriate abstraction levels
- Common: line 14
Document: - Write diagrams to markdown files with explanatory context
- Very specific: line 70
Write architecture documentation to docs/architecture/ with naming convention:
“Common” is measured: kept by at least 6 in 10 of the 10 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")Best Practices
- 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
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
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.

