Architecture Explainer
Skill9 starsChanged 8 months agoMITView on GitHub
Reads a codebase or system description and produces a clear, structured architecture overview with diagrams.
In this repository61 other files it gives its agents.
- Accessibility Audit HelperSkill
- Agent Context File WriterSkill
- Agent Evaluation Framework BuilderSkill
- AI Feature Spec WriterSkill
- API Documentation GeneratorSkill
- REST API Endpoint DesignerSkill
- Article RepurposerSkill
- Auth Flow PlannerSkill
- Blog Outline GeneratorSkill
- Breaking Change DetectorSkill
- Bug Root Cause AnalyzerSkill
- Caching Strategy AdvisorSkill
- Changelog CuratorSkill
- Code Review ChecklistSkill
- Database Schema ReviewerSkill
- Docker Compose GeneratorSkill
- Documentation Gap FinderSkill
- Edge Case DiscoverySkill
- Error Log SummarizerSkill
- FAQ GeneratorSkill
- Flaky Test AnalyzerSkill
- Form UX OptimizerSkill
- Git Commit WriterSkill
- Hallucination Risk ReviewerSkill
- Hybrid Search ArchitectSkill
- Incident Postmortem WriterSkill
- Issue to PR PlannerSkill
- Landing Page Copy ImproverSkill
- LangGraph State Machine DesignerSkill
- LLM Cost OptimizerSkill
- LLM Tracing and Observability SetupSkill
- MCP Integration AssistantSkill
- MCP Server BuilderSkill
- Migration Guide WriterSkill
- Newsletter Summary WriterSkill
- Observability ChecklistSkill
- Playwright Test BuilderSkill
- PR Description WriterSkill
- Prompt Injection Defense AuditorSkill
- Prompt RefinerSkill
- Prompt Version Control WorkflowSkill
- RAG Chunking Strategy AdvisorSkill
- RAG Workflow PlannerSkill
- React Component ReviewerSkill
- README WriterSkill
- Refactor PlannerSkill
- Release Notes GeneratorSkill
- Responsive Layout ReviewerSkill
- SDK Quickstart WriterSkill
- SEO Content OptimizerSkill
- SEO Metadata GeneratorSkill
- Social Post Thread WriterSkill
- Sprint Summary GeneratorSkill
- SQL Query OptimizerSkill
- Stack Trace AnalyzerSkill
- Technical Blog Post WriterSkill
- Tech Debt AuditorSkill
- Troubleshooting Guide BuilderSkill
- Unit Test ImproverSkill
- Unit Test WriterSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
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 18
Use this when onboarding new team members, preparing for an architecture review, creating documentation for a system you inherited, or …
- Very specific: line 33
Add the instructions below to your .cursorrules or paste them into the Cursor AI pane before asking for the architecture overview.
- Distinctive: line 41
When asked to explain or document an architecture, follow these steps:
- Distinctive: line 52
Do not read every file. Use the directory structure and entry points to infer the layering.
- Distinctive: line 134
After writing the document, re-read the entry point files and check that every major path through the system is accounted for.
- Distinctive: line 200
If you have an existing architecture doc, paste it in and ask the agent to update it rather than writing from scratch.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Architecture Explainer
What this skill does
This skill directs the agent to explore a codebase or system description and produce a clear, structured architecture overview. It maps out layers, major components, data flows, and external dependencies, then renders ASCII diagrams showing how the pieces connect. The result is a document a new engineer could read in 10 minutes and understand how the system works.
Use this when onboarding new team members, preparing for an architecture review, creating documentation for a system you inherited, or clarifying your own mental model before a large refactor.
How to use
Claude Code / Cline
Copy this file to .agents/skills/architecture-explainer/SKILL.md in your project root.
Then ask:
- "Use the Architecture Explainer skill to document this entire repo."
- "Explain the architecture of the
server/directory using the Architecture Explainer skill." - "I'll describe our system. Use the Architecture Explainer skill to turn it into a structured overview."
Cursor
Add the instructions below to your .cursorrules or paste them into the Cursor AI pane before asking for the architecture overview.
Codex
Provide a directory listing or paste key files and ask Codex to follow the instructions below to produce the architecture document.
The Prompt / Instructions for the Agent
When asked to explain or document an architecture, follow these steps:
Step 1 — Explore the codebase
Start by reading:
- The root directory listing
package.json,pyproject.toml,go.mod, or the equivalent dependency manifest- Entry point files (e.g.,
main.ts,index.ts,app.py,cmd/main.go) - Top-level directory names and their
indexorREADMEfiles if present - Any existing architecture or design docs
Do not read every file. Use the directory structure and entry points to infer the layering.
Step 2 — Identify the major components
Extract:
- Layers: presentation, business logic, data access, infrastructure
- Services or modules: each significant unit of functionality
- External dependencies: databases, caches, third-party APIs, message queues
- Entry points: HTTP routes, CLI commands, event listeners, cron jobs
- Shared utilities: auth, logging, config, error handling
Step 3 — Map the data flow
For the most important 2–3 user-facing operations, trace:
- Where the request enters the system
- Which layers or modules it passes through
- What data is read or written and where
- Where the response is assembled and returned
Step 4 — Produce the architecture document
Format the output as follows:
# Architecture Overview — [Project Name]
## System Summary
[2–3 sentences. What does this system do? What are the key technical choices (language, framework, DB)?]
## Layer Diagram
[ASCII diagram showing the main layers top-to-bottom, e.g.:]
┌─────────────────────────────────┐
│ Client / Browser │
└────────────────┬────────────────┘
│ HTTP / REST
┌────────────────▼────────────────┐
│ Express API Server │
│ routes/ → controllers/ → ... │
└──────┬─────────────┬────────────┘
│ │
┌──────▼──────┐ ┌────▼────────────┐
│ PostgreSQL │ │ Redis Cache │
└─────────────┘ └─────────────────┘
## Component Breakdown
### [Component Name]
- **Location**: `src/payments/`
- **Responsibility**: [1–2 sentences]
- **Depends on**: [List of other components or external services]
- **Depended on by**: [Who calls this]
[Repeat for each major component]
## Key Data Flows
### [Flow name, e.g., "User places an order"]
1. Request arrives at `POST /api/orders`
2. `OrderController` validates the request body
3. `OrderService` runs business logic and calls `PaymentService`
4. `PaymentService` calls Stripe API
5. On success, `OrderRepository` writes to `orders` table
6. Response returned to client
[Repeat for 2–3 key flows]
## External Dependencies
| Dependency | Purpose | Where integrated |
|------------|---------|-----------------|
| PostgreSQL | Primary data store | `server/db/` |
| Redis | Session cache | `server/cache/` |
| Stripe | Payment processing | `server/services/payment.ts` |
## What is NOT covered here
[Note any parts of the system this document doesn't address, e.g., "Worker queue jobs not documented"]Step 5 — Validate your understanding
After writing the document, re-read the entry point files and check that every major path through the system is accounted for. If something doesn't fit your model, revise the model — don't ignore the discrepancy.
Example
Input to Agent:
"Use the Architecture Explainer skill on this repo. Here's the directory tree:
src/ api/routes/ api/controllers/ services/ db/repositories/ workers/ client/ pages/ components/ ```"
Output from Agent:
Architecture Overview — MyApp
System Summary
MyApp is a full-stack web application built with Node.js/Express on the backend and React on the frontend. It uses PostgreSQL for persistence and background workers for async processing.
Layer Diagram
┌──────────────────────────┐ │ React Client (client/) │ └────────────┬─────────────┘ │ HTTP/JSON ┌────────────▼─────────────┐ │ Express API (src/api/) │ │ routes/ → controllers/ │ └──────┬───────────────────┘ │ ┌──────▼───────────────────┐ │ Services (src/services/) │ └──────┬───────────────────┘ │ ┌──────▼───────────────────┐ ┌──────────────────┐ │ Repositories (src/db/) │ │ Workers │ └──────┬───────────────────┘ │ (src/workers/) │ │ └──────────────────┘ ┌──────▼───────────────────┐ │ PostgreSQL │ └──────────────────────────┘Component Breakdown
API Routes
- Location:
src/api/routes/- Responsibility: Maps HTTP methods and paths to controller functions
- Depends on: Controllers
Services
- Location:
src/services/- Responsibility: Contains all business logic; orchestrates calls between repositories and external APIs
- Depends on: Repositories, external APIs
- Depended on by: Controllers, Workers
Notes
- For very large repos, ask the agent to focus on one service or one top-level directory at a time.
- If you have an existing architecture doc, paste it in and ask the agent to update it rather than writing from scratch.
- ASCII diagrams can be copied into tools like Mermaid or draw.io for polish.
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.

