Loading...
Loading...
Build comprehensive ARCHITECTURE.md files for any repository following matklad's canonical guidelines. This skill should be used when creating codebase documentation that serves as a map for developers and AI agents, auditing existing repos for architectural understanding, or when users ask to 'document the architecture', 'create an architecture.md', or 'map this codebase'. Produces bird's eye views, ASCII/Mermaid diagrams, codemaps, invariants, and layer boundaries.
npx skill4agent add tdimino/claude-code-minoan architecture-md-builderreferences/matklad-guidelines.md# Search for exceptional architecture.md examples
python3 ~/.claude/skills/exa-search/scripts/exa_search.py \
"architecture.md documentation best practices" \
--category github -n 10
# Find matklad's original guidelines
python3 ~/.claude/skills/exa-search/scripts/exa_research.py \
"matklad ARCHITECTURE.md guidelines rust-analyzer"Use the Task tool with subagent_type=Explore for each major system area:
1. Core/Engine - Entry points, main abstractions, data structures
2. Transport/API - HTTP, WebSocket, message handling
3. Database/Persistence - Schema, migrations, queries
4. Frontend/UI - Components, state management, routing# Architecture
Brief intro: what this document is for, who it's for.
## Bird's Eye View
- What problem does this solve?
- What is the core paradigm/approach?
- Key design principles (3-5 bullets)
[ASCII diagram showing major components]
## High-Level Data Flow
[Mermaid flowchart showing data flow]
## Codemap
### System 1 (`path/`)
Description, key files with line counts, key abstractions table.
### System 2 (`path/`)
...
## Architectural Invariants
Rules that are ALWAYS true. Code patterns that are NEVER violated.
## Cross-Cutting Concerns
Issues that span multiple modules (auth, logging, error handling).
## Layer Boundaries
Diagram showing layers and their interfaces.
## Key Files Reference
| File | Lines | Purpose |
|------|-------|---------|
| ... | ... | ... |
## Common Questions
FAQ format: "Where do I find X?" → Answerreferences/document-structure.mdassets/architecture-template.mdUse the Task tool with subagent_type=Explore to verify:
1. General accuracy - Do descriptions match actual code?
2. Line counts - Are they roughly accurate?
3. File references - Do all referenced files exist?┌─────────────┐ ┌─────────────┐
│ Frontend │────▶│ Backend │
└─────────────┘ └─────────────┘flowchart TB
A[Input] --> B[Process]
B --> C[Output]wc -lWorkingMemory.tsARCHITECTURE.mdCLAUDE.mdREADME.mdUser: "Create an architecture.md for this repo"
1. Launch 3 exploration agents targeting core, transport, and frontend
2. Synthesize findings into ARCHITECTURE.md following the template
3. Launch 2 review agents to verify accuracy
4. Apply corrections
5. Commit and optionally update CLAUDE.mdreferences/matklad-guidelines.mdreferences/document-structure.mdassets/architecture-template.md