From aigent-skills
This skill should be used when the user asks to "review this codebase", "analyze the architecture", "what patterns does this project use", "help me understand this system", "give me an architectural overview", "how is this project structured", or wants to learn how an unfamiliar codebase is designed at a high level. Produces a two-phase architectural analysis: autonomous survey followed by interactive deep dives.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aigent-skills:codebase-overviewThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Produce a high-level architectural analysis of a codebase. Designed for experienced
Produce a high-level architectural analysis of a codebase. Designed for experienced developers (Java/C#/Python/TypeScript/Go background) who want to learn how unfamiliar systems are designed — not how they are implemented line-by-line.
The goal: extract enough architectural understanding to inform the user's own system design work in that domain.
Run a breadth-first exploration without user interaction. Follow these steps in order:
Project Identity — Read README, docs, ADRs, package manifests. Identify language(s),
framework(s), build system, repo structure. If local docs are insufficient (README < ~20
lines or missing, no docs/ADR directories), trigger a web search fallback for external
documentation. See references/phase1-analysis.md for detailed procedures.
Structural Map — Analyze top-level directory layout and one level deeper. Identify architectural layers and module boundaries. Produce a mermaid component diagram.
Dependency Analysis — Categorize external dependencies by purpose. Map internal module relationships. Produce a mermaid dependency graph.
Key Flow Tracing — Identify 2-3 primary entry points. Trace each flow at the component level (not line-by-line). Produce mermaid sequence diagrams. For monorepos, trace flows in the primary service; flag others for Phase 2.
Pattern Recognition — Identify design patterns (repository, factory, strategy, observer, middleware, CQRS, etc.) and architectural patterns (hexagonal, clean architecture, MVC, microservices, etc.). Note unusual or noteworthy choices.
Initial Report — Assemble findings using the template in
references/document-template.md. Present conversationally in the terminal AND
simultaneously write to docs/architecture-overview.md as a working draft (create
the docs/ directory if it does not exist).
File reading strategy: Read for structure (imports, exports, signatures, interfaces), not implementation bodies. Priority: README/docs -> package manifests -> directory structure -> entry points -> one representative file per major module.
After presenting the Phase 1 report, transition to interactive mode.
See references/phase2-deep-dives.md for detailed procedures.
Suggest areas — Generate 3-5 specific suggestions for deeper exploration based on what Phase 1 actually found. These must be specific to this codebase, not generic.
Execute deep dives — For each user request, dispatch a focused subagent to explore
the area. Present findings conversationally AND append to the working draft under
## Deep Dive: {topic}. Generate new mermaid diagrams when structure is worth visualizing.
Finalize — When the user signals completion ("finalize", "wrap it up"), synthesize the Transferable Principles section, ask if the user wants to reorganize/trim the document, and save the final version.
All analysis must clearly distinguish between:
When the codebase uses a language outside the user's primary languages (Java/C#/Python/TypeScript/Go), map language-specific idioms to equivalents in familiar languages. Example: "This Elixir GenServer is analogous to a long-running service with an internal message queue in Java."
Describe architectural trade-offs factually (e.g. "event sourcing adds complexity but provides a full audit trail") without judging whether a choice is good or bad.
Always include mermaid diagrams for: component relationships, internal dependency graphs,
and key flow sequence diagrams. See references/document-template.md for diagram format
examples.
docs/architecture-overview.md exists, ask whether to start
fresh or continue from the existing document.For detailed procedures and templates, consult:
references/phase1-analysis.md — Detailed Phase 1 analysis steps, file reading
strategy, web search fallback logic, pattern recognition guidereferences/phase2-deep-dives.md — Deep dive types and execution, subagent dispatch,
transition prompts, finalization and transferable principles synthesisreferences/document-template.md — Complete output document template with mermaid
diagram examples and fact/inference formattingProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub roaanv/aigent-skills --plugin aigent-skills