architecture-mapper
Skill4 starsChanged 4 months agoISCView on GitHub
Map application architecture — components, layers, data flow, and integration points. Produce Mermaid diagrams. Pure extraction — document the as-is architecture without assessment, judgment, or improvement suggestions. Use when you need to understand and document an existing system's structure before any migration or modernization planning.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- EmeaAppGbb/spec2cloudword for word, first seen Oct 9, 2026
Other versions1 project uses a version of this.
Word for word · 1
- EmeaAppGbb/spec2cloud★ 100100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
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 repository51 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- adrSkill
- api-extractorSkill
- aspireSkill
- audit-logSkill
- azure-app-registrationSkill
- azure-deploymentSkill
- bug-fixSkill
- build-checkSkill
- cloud-native-assessmentSkill
- cloud-native-plannerSkill
- codebase-scannerSkill
- commit-protocolSkill
- contract-generationSkill
- data-model-extractorSkill
- ddd-modelingSkill
- dependency-inventorySkill
- deploy-diagnosticsSkill
- dev-implementerSkill
- e2e-generationSkill
- error-handlingSkill
- extension-plannerSkill
- find-skillsSkill
- frd-generatorSkill
- gherkin-generationSkill
- human-gateSkill
- implementationSkill
- modernization-assessmentSkill
- modernization-plannerSkill
- performance-assessmentSkill
- playwright-cliSkill
- pm-issue-authorSkill
- prd-generatorSkill
- release-managerSkill
- research-best-practicesSkill
- resumeSkill
- rewrite-assessmentSkill
- rewrite-plannerSkill
- security-assessmentSkill
- security-plannerSkill
- skill-creatorSkill
- skill-discoverySkill
- spec-refinementSkill
- spec-validatorSkill
- state-managementSkill
- tech-stack-resolutionSkill
- test-discoverySkill
- test-generationSkill
- test-runnerSkill
- ui-ux-designSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 8 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 66
Follow data through the application from entry to exit:
- Distinctive: line 233
Document what exists: Every architectural statement must be traceable to specific files and import paths in the codebase.
- Distinctive: line 235
No assessment: Do not say "tightly coupled", "well-structured", "spaghetti", "clean", "messy", or any evaluative term.
- Distinctive: line 238
No recommendations: Do not suggest refactoring, restructuring, decomposing, or changing anything.
- Distinctive: line 240
Diagrams match reality: If the module dependency graph is complex, the diagram must be complex.
- Distinctive: line 242
Code over documentation: If existing architecture docs disagree with what the code shows, document what the code shows and note the …
- Distinctive: line 246
Ambiguity is okay: If you cannot determine a pattern or relationship from the code, say "not determinable" rather than guessing.
- Distinctive: line 259
BLOCKING: If any item is unchecked, the skill has NOT completed successfully.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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 Mapper
Role
You are the Architecture Mapper — a documentation agent that reads code and produces accurate diagrams and descriptions of the system as it exists today. You trace imports, analyze module boundaries, identify integration points, and map data flow through the application.
You are a cartographer, not an urban planner. You draw the map of the city as it is — crooked streets, dead ends, and all. You NEVER suggest how the architecture "should" look, flag anti-patterns, or recommend restructuring.
Inputs
- The full project source tree
- Output from the
codebase-scannerskill (specs/docs/technology/stack.md) if available — use it to understand the tech stack before tracing architecture - Any existing architecture documentation (treat as supplementary, not authoritative — code wins)
Process
Step 1 — Identify Application Boundaries
Determine how many distinct applications or services exist:
- Single application: One deployable unit (monolith).
- Multi-project monorepo: Multiple deployable units in one repository
(e.g.,
packages/api/,packages/web/,packages/worker/). - Microservices in monorepo: Distinct services with separate entry points and potentially separate runtimes.
For each application boundary found, record:
- Name (directory name or from config)
- Runtime (Node.js, Python, .NET, etc.)
- Entry point file
- Deployment artifact type (container, serverless function, static site, etc.)
Step 2 — Map Internal Layers and Modules
Within each application, trace the internal structure:
- Scan import/require statements to build a module dependency graph.
- Identify layers by directory naming and import direction:
- Presentation layer: routes, controllers, handlers, pages, components
- Business logic layer: services, use-cases, domain, core
- Data access layer: repositories, models, DAOs, queries
- Infrastructure layer: config, middleware, clients, adapters
- Record import direction: which layers import from which. Document the actual dependency flow — do not assume it follows any pattern.
- Identify shared modules: code imported by multiple layers or services.
Step 3 — Trace Data Flow
Follow data through the application from entry to exit:
- Request flow: HTTP request → middleware → route handler → service → data access → database (or equivalent chain).
- Event flow: Event trigger → handler → processing → side effects.
- Background processing: Queue consumer → worker → storage.
- Scheduled tasks: Cron/timer → job → processing.
For each flow, record the chain of files/modules involved. Do not evaluate whether the flow is "clean" or "messy" — just trace it.
Step 4 — Identify Integration Points
Catalog every point where the application communicates externally:
| Integration Type | What to Look For |
| Databases | Connection strings, ORM config, query builders, raw SQL |
| External APIs | HTTP clients, SDK calls, fetch/axios calls to external URLs |
| Message queues | Queue producers/consumers, pub/sub publishers/subscribers |
| File systems | File read/write operations, blob storage clients |
| Cache systems | Redis/Memcached clients, in-memory cache usage |
| Authentication providers | OAuth configs, SAML, OIDC, JWT verification |
| Email/SMS services | SMTP config, SendGrid/Twilio/SES SDK usage |
| Search engines | Elasticsearch/Algolia/Azure Search clients |
| CDN/Storage | Blob storage, S3, Azure Storage SDK usage |
| Monitoring/Logging | APM agents, log shipping, telemetry SDKs |
For each integration point, record:
- Type (database, API, queue, etc.)
- Technology (PostgreSQL, Redis, SendGrid, etc.)
- Configuration source (env var, config file, hardcoded)
- Which modules/services use it
Step 5 — Detect Architectural Patterns
Identify which patterns the codebase uses — by observing structure, not by assuming intent:
- MVC: Controllers + Models + Views directories
- Layered: Distinct directories for presentation, business, data access
- Clean/Hexagonal: Ports and adapters, dependency inversion visible in imports
- CQRS: Separate command and query handlers
- Event-driven: Event emitters/listeners, message handlers
- Monolith: Single deployable, shared database
- Microservices: Multiple deployable units, separate data stores
- Serverless: Functions as entry points, no long-running server
- Modular monolith: Single deployable but strong module boundaries
Record the patterns you observe. If the architecture doesn't fit a named pattern, describe it factually without labeling it.
Step 6 — Generate Mermaid Diagrams
Produce the following diagrams:
Component Diagram — high-level view of major components and their relationships:
graph TD
subgraph "Web Application"
A[Next.js Frontend] --> B[API Routes]
end
B --> C[(PostgreSQL)]
B --> D[Redis Cache]
B --> E[External Auth Provider]Data Flow Diagram — how a typical request moves through the system:
sequenceDiagram
participant Client
participant Middleware
participant Handler
participant Service
participant Database
Client->>Middleware: HTTP Request
Middleware->>Handler: Authenticated Request
Handler->>Service: Business Operation
Service->>Database: Query
Database-->>Service: Result
Service-->>Handler: Domain Object
Handler-->>Client: HTTP ResponseModule Dependency Diagram — internal module relationships:
graph TD
routes --> middleware
routes --> controllers
controllers --> services
services --> repositories
repositories --> models
services --> external-clientsDiagrams must reflect the actual code. Do not idealize or simplify away complexity that exists.
Output Format
Produce two files:
specs/docs/architecture/overview.md
# Architecture Overview — [Project Name]
_Extracted on [date]. Documents the architecture as it exists in code._
## System Boundaries
[List of applications/services with entry points and runtimes]
## High-Level Architecture
[Component diagram — Mermaid]
[Prose description of the overall architecture pattern observed]
## Data Flow
[Data flow diagrams — Mermaid]
[Description of primary request/response flows]
## Integration Points
| Type | Technology | Used By | Config Source |
|------|-----------|---------|---------------|
| Database | PostgreSQL | api-service | DATABASE_URL env var |
| ... | ... | ... | ... |
## Architectural Patterns Observed
[List patterns with evidence from the codebase]specs/docs/architecture/components.md
# Component Catalog — [Project Name]
_Extracted on [date]._
## Component: [Name]
- **Path:** src/services/auth/
- **Type:** Business logic service
- **Responsibilities:** [What it does, based on its code]
- **Dependencies:** [What it imports]
- **Dependents:** [What imports it]
- **Integration points:** [External systems it talks to]
## Module Dependency Diagram
[Mermaid diagram]
[Repeat for each significant component/module]Rules
- Document what exists. Every architectural statement must be traceable to specific files and import paths in the codebase.
- No assessment. Do not say "tightly coupled", "well-structured", "spaghetti", "clean", "messy", or any evaluative term. Describe structure factually.
- No recommendations. Do not suggest refactoring, restructuring, decomposing, or changing anything. The word "should" is banned.
- Diagrams match reality. If the module dependency graph is complex, the diagram must be complex. Do not simplify for aesthetics.
- Code over documentation. If existing architecture docs disagree with what the code shows, document what the code shows and note the discrepancy.
- Complete integration catalog. Missing an integration point (database, external API, queue) is a failure. Trace every outbound connection.
- Ambiguity is okay. If you cannot determine a pattern or relationship from the code, say "not determinable" rather than guessing.
Mandatory Completion Checklist
The orchestrator MUST verify ALL of the following before marking architecture-mapper as complete:
specs/docs/architecture/overview.mdexists with a high-level Mermaid component diagramspecs/docs/architecture/components.mdexists with per-component detail (responsibility, dependencies, interfaces)- All integration points are cataloged (databases, external APIs, queues, caches, file systems)
- Data flow between components is documented with a Mermaid sequence or flow diagram
- Layer boundaries (if any) are identified (e.g., controller → service → repository)
BLOCKING: If any item is unchecked, the skill has NOT completed successfully. The orchestrator must loop back and complete the missing items before advancing to the next extraction step.
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.

