c4-architecture
Skill2 starsChanged 7 months agoMITView on GitHub
Designs, updates, and reviews software architecture with C4 views expressed in D2. Use for system context, container and component diagrams, architecture changes, runtime/deployment views, design reviews, or Git-maintained architecture documentation.
We split this skill into the rules it gives an agent
9 rules. 0 are common, 8 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
8
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
- Distinctive: line 20
Read relevant requirements, source code, existing D2 sources, specifications, and decisions.
- Distinctive: line 22
If essential facts are missing, label assumptions and questions.
- Distinctive: line 26
Use the project's established structure.
- Very specific: line 38
Update model.d2 first for structural changes.
- Distinctive: line 40
Before running a generator, verify its target.
- Distinctive: line 48
When D2 is available, format, check, and render the selected package:
- Distinctive: line 62
Prefer incremental edits with a comprehensible Git diff.
- Distinctive: line 63
Never expose secrets, personal data, private tokens, or detailed production endpoints without authorization.
- Distinctive: line 64
Do not claim architecture approval, a successful CLI run, or inspected visuals unless those events occurred.
“Common” is measured: kept by at least 6 in 10 of the 11 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 with D2
Produce reviewable software architecture, not merely attractive diagrams. C4 describes levels of abstraction; D2 is the source format. A human must approve consequential decisions.
Before editing
- Identify the correct repository and read its contribution/architecture conventions. Existing project paths take precedence; in Skillsmith, architecture subjects live under
design/architecture/<subject>/. In other repositories,architecture/may be appropriate. Never create a parallel design tree. - Read relevant requirements, source code, existing D2 sources, specifications, and decisions. Separate implemented, proposed, and unknown behavior; a diagram is not proof of implementation or approval.
- For a new or changed C1/C2/C3 view, read C4 conventions. Identify the smallest set of views needed to answer the actual review or implementation questions.
- If essential facts are missing, label assumptions and questions. Do not invent services, protocols, technologies, deployment details, quality targets, or approved decisions.
Files and ownership
Use the project's established structure. Where a new package is needed, the bundled starter template illustrates a D2 model, two structural views, a dynamic example, and a concise specification.
model.d2owns stable element identifiers and shared structural relationships.views/context.d2shows C1 people, software systems, boundaries, and system-level relationships.views/container.d2shows C2 independently deployable/runnable applications, services, and data stores, plus their relationships.- Optional component, dynamic/sequence, and deployment views address specific risks or scenarios. Dynamic views must agree semantically with the shared model even where D2 sequence syntax needs local participant aliases.
architecture-spec.mdowns scope, requirements, constraints, rationale, evidence, NFRs, and unresolved risks. Existing ADRs remain authoritative for accepted decisions.diagrams/*.svgare generated review artifacts, never manually edited source.
Workflow
- Identify the requested change, evidence, affected diagram levels, and decision points. Preserve unrelated files and existing stable IDs.
- Update
model.d2first for structural changes; update only affected views, specifications, and ADRs. Do not replace existing design intent with code-derived guesses. - Label directed relationships by purpose and known protocol. Avoid mixing internal components into a context view.
Before running a generator, verify its target. To create a new package without overwriting files:
python3 <skill-root>/scripts/init_project.py --repo . --target architecture --dry-run python3 <skill-root>/scripts/init_project.py --repo . --target architectureSubstitute
design/architecture/<subject>for an existing project convention. The initializer only copies missing files; starter content is fictional and must be replaced before approval.When D2 is available, format, check, and render the selected package:
python3 <skill-root>/scripts/architecture.py format --root <architecture-dir> python3 <skill-root>/scripts/architecture.py check --root <architecture-dir> python3 <skill-root>/scripts/architecture.py render --root <architecture-dir>checkruns D2 validation, formatting checks, and test renders; it does not establish architectural correctness. If D2 is missing, report that validation/rendering was not run.- Inspect rendered SVGs for legibility, boundaries, edge direction, labels, and missing/duplicated elements. Consult review checklist before review handoff.
- Summarize changed sources and views, requirement traceability, assumptions, ADR impacts, risks, actual checks run, skipped checks, and decisions requiring human review.
Safety and boundaries
- Prefer incremental edits with a comprehensible Git diff; never overwrite user files silently.
- Never expose secrets, personal data, private tokens, or detailed production endpoints without authorization.
- Do not claim architecture approval, a successful CLI run, or inspected visuals unless those events occurred.
- On disagreement between code, requirements, and accepted architecture, surface the conflict; do not silently choose a new source of truth.
- For architecture explanation only, use the conceptual guidance without creating files or requiring Python/D2.
Output
Deliver the changed D2/specification files when file editing is requested, generated previews only when actually rendered, and a concise handoff showing what changed, why, validation evidence, risks, and review decisions outstanding.
Other versions13 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 13
- microsoft/hve-core★ 1.6ksame name
- coco-research/coco★ 797same name
- bitsmuggler/c4-skill★ 56same name
- delorenj/skills★ 18same name
- eugenepyvovarov/mcpbundler-agent-skills-marketplace★ 12same name
- sergeeey/Claude-cod-top-2026★ 9same name
- shalomb/agent-skills★ 3same name
- rohinipachanta/claude-code-quickstart★ 1same name
- fsmiamoto/skills★ 0same name
- imMamdouhaboammar/kaku-chatgpt-harness★ 0same name
3 more not listed
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 repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- city-attraction-researchSkill
- city-itinerary-builderSkill
- city-view-modelSkill
- communicatorSkill
- doctorSkill
- editorSkill
- email-drafterSkill
- eyeglasses-selectionSkill
- fitness-coachSkill
- flashcard-generatorSkill
- hairstyle-selectionSkill
- journalingSkill
- language-tutorSkill
- local-food-and-dining-researchSkill
- nvcSkill
- oscp-coachSkill
- quiz-generatorSkill
- restaurant-menu-advisorSkill
- study-plannerSkill
- travel-plannerSkill
- travel-storytelling-guideSkill
- trip-expense-trackerSkill
- vocabulary-masterySkill
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.

