architecture
Skill9 starsChanged 2 months agoMITView on GitHub
Single owner of everything under docs/architecture/ — ADRs, architecture and design documents, and architecture diagrams. Routes each deliverable to the right engine: /mermaid-architecture for Markdown-native diagrams, /drawio-architecture for editable .drawio diagrams, and the optional archify skill for interactive standalone HTML diagrams (used only when already installed in the environment; never installed at runtime). Use whenever architecture documentation, ADRs, or architecture diagrams must be created or updated.
82 other projects use a version of this.
Adopted by
Most recently taken up by
- MagicJosh/rastheir own version, first seen Oct 6, 2026
- wellwelwel/lagunetheir own version, first seen Oct 4, 2026
- patrickjaja/claude-desktop-extratheir own version, first seen Oct 4, 2026
- fabiandistler/agentstheir own version, first seen Sep 30, 2026
- rafaelh/skillstheir own version, first seen Sep 30, 2026
- swombat/souls-housetheir own version, first seen Sep 30, 2026
Used with
Projects with it also use deployment-procedures, behavioral-modes and 10 more.
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.
xfstudioSkilldeployment-procedures
Production deployment principles and decision-making. Safe deployment workflows, rollback strategies, and verification. Teaches thinking, not scripts.
Also in 5 projects that use this
xfstudioSkillbehavioral-modes
AI operational modes (brainstorm, implement, debug, review, teach, ship, orchestrate). Use to adapt behavior based on task type.
Also in 4 projects that use this
tiendatworkSkill2d-games
2D game development principles. Sprites, tilemaps, physics, camera.
Also in 3 projects that use this
tiendatworkSkill3d-games
3D game development principles. Rendering, shaders, physics, cameras.
Also in 3 projects that use this
CES-LtdSkilloss-pr
Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.
Also in 3 projects that use this
CES-LtdSkillpr-automation
PR Automation Orchestrator: poll open PRs, check CI, run review, fix, and merge eligible PRs. Use when: (1) Invoked by daemon via scripts/pr-automation.sh, (2) User says "/pr-automation".
Also in 3 projects that use this
- +1 more from xfstudio
- +5 more from tiendatwork
Other versions82 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 82
- iOfficeAI/AionUi★ 33ksame name
- anthropics/knowledge-work-plugins★ 26ksame name
- ktnyt/cclsp★ 675same name
- patrickjaja/claude-desktop-extra★ 657same name
- FerroxLabs/wayland★ 608same name
- owainlewis/blueprint★ 410same name
- microsoft/powerplatform-build-tools★ 308same name
- techygarg/lattice★ 197same name
- sd0xdev/sd0x-harness★ 191same name
- wellwelwel/lagune★ 172same name
72 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 repository25 other files it gives its agents.
- building-mcp-serversSkill
- code-review-and-qualitySkill
- composio-mcpSkill
- create-agent-harnessSkill
- create-issuesSkill
- create-readmeSkill
- designSkill
- diagnoseSkill
- drawio-architectureSkill
- execute-specsSkill
- gap-analysisSkill
- improve-codebase-architectureSkill
- mermaid-architectureSkill
- migration-plannerSkill
- notebooklm-mcpSkill
- observability-and-instrumentationSkill
- obsidianSkill
- orchestratorSkill
- qa-analystSkill
- quality-test-implementationSkill
- scaffold-mvpSkill
- sonarqube-autofixSkill
- web-design-guidelinesSkill
- wordpress-mcpSkill
- write-specsSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 3 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 74 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
All questions and confirmations directed at the user must be in Portuguese (pt-BR).
- Very specific: line 38
Ensure the directory exists before writing: mkdir -p docs/architecture.
- Very specific: line 60
Graceful degradation: If archify is absent, deliver the same content through /mermaid-architecture (and /drawio-architecture when editable …
- Very specific: line 68
ADRs: check the highest existing AD-NNNN number, then write the next one with the template below.
- Distinctive: line 71
Verify: run each engine's validation step.
- Very specific: line 96
Keep an index of ADRs at the top of docs/architecture/README.md when that file exists.
- Very specific: line 104
Check whether the archify skill is already installed in any known skills root:
- Very specific: line 119
If not found, do not offer, suggest, or run any installation.
- Distinctive: line 150
When invoked mid-implementation (not only at Phase 5), apply the same routing: new architectural decision → ADR.
“Common” is measured: kept by at least 6 in 10 of the 74 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
Architecture
The single entry point for all repository architecture deliverables. Instead of calling diagram skills directly, agents invoke /architecture and this skill routes each deliverable to the right engine. It owns the docs/architecture/ folder end to end: ADRs, design documents, and every diagram format.
All questions and confirmations directed at the user must be in Portuguese (pt-BR). Internal reasoning and documentation are in English.
Ownership — docs/architecture/
Everything that describes or decides the system's architecture lives here:
docs/architecture/
├── AD-NNNN-<slug>.md # Architecture Decision Records
├── architecture-design.md # Architecture design doc
├── system-design.md # System design doc
├── api-design.md # API design doc
├── database-design.md # Database design doc
├── feature-<name>-design.md # Feature-scoped design doc
├── system-architecture.md # Markdown doc with embedded Mermaid
├── <name>_<type>_<title>.mmd # Mermaid sources
├── <name>_<type>_<title>.drawio # Editable draw.io sources
├── <name>_<type>_<title>.png|.svg|.pdf # Exported images
├── <name>.json # Archify candidate specs
└── <name>.html # Archify interactive HTML artifactsEnsure the directory exists before writing: mkdir -p docs/architecture.
Projects scaffolded by
/scaffold-mvpmay also keep ADRs underdocs/adr/. Treatdocs/architecture/as canonical; whendocs/adr/exists, keep it consistent with the AD index below.
Engine Routing
Pick the engine by deliverable, never by habit:
| Deliverable | Engine | Why |
ADR (AD-NNNN) | this skill (template below) | Structured Markdown decision record |
| Design doc (system / API / DB / feature) | /mermaid-architecture assets | Templates live in mermaid-architecture/assets/ |
| Markdown-native diagram (C4, sequence, flow, ER, state) | /mermaid-architecture | Renders in GitHub/Obsidian/wikis, works headless |
Editable .drawio diagram or PNG/SVG export | /drawio-architecture | draw.io MCP or desktop CLI; fall back to /mermaid-architecture if graphical rendering fails in headless environments |
| Interactive standalone HTML diagram (presentations, explorability, trace motion) | archify (optional, only if already installed) | Self-contained HTML + inline SVG with themes and export — see below |
| Evidence-backed audit (delivered state vs code/specs/docs) | /gap-analysis | Owned by this skill at the end of the pipeline — see references/gap-audit-handoff.md |
Default order in the Orchestrator pipeline (Phase 5): /drawio-architecture for the editable system diagram → /mermaid-architecture for native Markdown diagrams → archify for the interactive runtime diagram when installed → /gap-analysis for the final evidence-backed audit.
Guardrails
- Never install external skills. Archify is used only when already installed in the environment. If absent, skip it — do not prompt for, suggest, or run any install command — consistent with the orchestrator's "no silent execution" and "trusted delegation only" rules.
- Graceful degradation. If archify is absent, deliver the same content through
/mermaid-architecture(and/drawio-architecturewhen editable output is needed). A missing optional engine never blocks the pipeline. - Never bypass the gap-analysis gate.
gap-analysisis read-only until the user answers its own pt-BR approval gate. This skill invokes it and reports the outcome; it never pre-approves, answers for the user, or skips the audit silently. - Verify before claiming. Validate Mermaid syntax,
.drawioXML, and archify receipts with each engine's own validator before reporting success.
Workflow
- Preflight (optional but recommended): run
scripts/architecture-doctor.shfor a read-only inventory ofdocs/architecture/, the next free ADR number, engine availability (mmdc,drawioCLI), and delegated-skill detection (mermaid-architecture,drawio-architecture,gap-analysis,archify). - Classify the request: ADR, design doc, Markdown diagram, editable diagram, or interactive HTML. Multiple deliverables may apply.
- ADRs: check the highest existing
AD-NNNNnumber, then write the next one with the template below. - Design docs: populate the matching template from
mermaid-architecture/assets/intodocs/architecture/. - Diagrams: route per the table. For code-grounded diagrams, extract evidence first (entry points, DI graph,
docker-compose.yml, Helm/Terraform, CI files). - Verify: run each engine's validation step; fix and re-run until green.
- Gap audit: invoke
/gap-analysisper its own contract — pass the delivery context (SPEC paths, commits, files written underdocs/architecture/) so its AS-IS × TO-BE matrix starts warm. Its approval gate decides whether confirmed gaps become Issues; seereferences/gap-audit-handoff.md. - Report the files written under
docs/architecture/and the audit outcome.
ADR Convention
File name: docs/architecture/AD-NNNN-<kebab-slug>.md (sequential, zero-padded — e.g. AD-0002-postgres-persistence.md).
# AD-NNNN — <Decision Title>
## Context
[Forces at play: constraints, requirements, prior decisions.]
## Decision
[What was decided and the key alternatives rejected.]
## Consequences
- Positive: [...]
- Trade-off: [...]
## Related SPEC
- [.specs/SPEC-{YYYYMMDD}-{slug}.md](../../.specs/SPEC-{YYYYMMDD}-{slug}.md)Keep an index of ADRs at the top of docs/architecture/README.md when that file exists; never renumber existing records — supersede them with a new AD.
Archify (optional, interactive HTML diagrams)
archify (github.com/tt-a1i/archify) produces explorable standalone HTML diagrams (inline SVG, dark/light themes, trace motion, PNG/JPEG/WebP/SVG export) from a small typed JSON spec — the right tool when stakeholders need a polished, interactive runtime view rather than a static diagram.
Step 1 — Detect
Check whether the archify skill is already installed in any known skills root:
for d in ./.agents/skills ~/.agents/skills ~/.claude/skills ~/.devin/skills \
~/.config/devin/skills ~/.opencode/skills ~/.config/opencode/skills \
~/.cursor/skills ~/.copilot/skills ~/.gemini/skills ~/.codex/skills \
~/.codeium/windsurf/skills; do
[ -f "$d/archify/SKILL.md" ] && echo "FOUND: $d/archify"
doneThe installed skill is also visible when the agent runtime lists archify among available skills.
Step 2 — Absent means skip (never install)
If not found, do not offer, suggest, or run any installation. Fall back to /mermaid-architecture and continue — a missing optional engine never blocks the pipeline. If the user wants interactive HTML later, they install archify themselves outside this skill's scope.
Step 3 — Generate (only when already installed)
Invoke the installed archify skill with the repository-grounded prompt:
Analyze this repository, then use archify to create a high-level runtime architecture diagram.
Show 8–12 core components, one primary path, external dependencies, and trust boundaries.
Put supporting detail in cards instead of adding more edges.Then follow the archify authoring flow (type architecture, meta.quality_profile: "showcase") and validate/deliver:
node <archify-skill-path>/bin/archify.mjs validate architecture docs/architecture/runtime-architecture.json --quality showcase --json
node <archify-skill-path>/bin/archify.mjs deliver architecture docs/architecture/runtime-architecture.json docs/architecture/runtime-architecture.html --quality showcase --jsonA non-zero exit is never success: fix the diagnosed field and re-run. Store both the candidate spec (.json) and the artifact (.html) under docs/architecture/.
Orchestrator Integration
In the Orchestrator lifecycle (Phase 5 — Verification & QA), /architecture replaces the previous direct calls to /drawio-architecture, /mermaid-architecture, and /gap-analysis — the orchestrator makes a single call and this skill runs the full chain:
/drawio-architectureupdates the editable.drawiosystem diagram (falling back to/mermaid-architecturewhen headless rendering fails)./mermaid-architecturegenerates/updates native Mermaid diagrams and design docs indocs/architecture/.archify(when installed) produces the interactiveruntime-architecture.html./gap-analysisruns the final evidence-backed audit — invoked by this skill, never directly by the orchestrator. Its own pt-BR gate decides: approved confirmed gaps flow throughcreate-issuesback into the orchestrator's Phase 4 queue (Phase 5 repeats when they finish); declined gaps stayDraftand resurface in Phase 6./create-readmethen references the generated diagrams inREADME.md.
When invoked mid-implementation (not only at Phase 5), apply the same routing: new architectural decision → ADR; doc drift → update design docs; structure change → regenerate affected diagrams.
When to Use
- Any creation or update of files under
docs/architecture/— ADRs, design docs, diagrams. - The orchestrator reaches the architecture step of Phase 5.
- The user asks for an architecture diagram without specifying a format — route by deliverable.
- Documenting a significant architectural decision (ADR) mid-implementation.
- User asks or mentions this skill in English (e.g., "use /architecture", "update the architecture docs").
- O usuário pede ou menciona esta skill em português (ex.: "use /architecture", "atualize a documentação de arquitetura").
When NOT to Use
- Architecture code improvements, coupling, or module seams →
/improve-codebase-architecture(this skill documents architecture; that one refactors it). - A single, already-specified diagram format → the specialized skill may be invoked directly (
/mermaid-architecture,/drawio-architecture), though routing through/architectureis always correct. - A standalone gap audit unrelated to architecture deliverables →
/gap-analysismay be invoked directly; inside the pipeline it is always reached through this skill.
Helpers
scripts/architecture-doctor.sh— read-only preflight:docs/architecture/inventory, next ADR number, engine binaries, and delegated-skill detection.references/architecture-inventory.md— canonical layout, naming rules, and ADR lifecycle fordocs/architecture/.references/gap-audit-handoff.md— contract for invokinggap-analysis: evidence context, approval gate, outcome mapping, degradation.
References
/mermaid-architecture— Markdown-native diagrams + design doc templates (assets/)/drawio-architecture— editable.drawiodiagrams via MCP or local CLI export/gap-analysis— final evidence-backed audit, invoked by this skill (seereferences/gap-audit-handoff.md)archify— optional third-party interactive HTML diagrams, used only when already installed (https://github.com/tt-a1i/archify)/scaffold-mvp— createsdocs/architecture/andAD-0001in new projects/improve-codebase-architecture— code-level architecture deepening (upstream consumer of these docs)/create-readme— surfaces the diagrams inREADME.md
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.

