From ask
Perform a systematic architecture review of a repository or codebase. Analyzes project structure, core components, data/control flows, key abstractions, and design decisions — focused on the critical path, not line-by-line code explanation. Use when the user asks to "analyze this repo", "review this codebase", "walk me through this project's architecture", "what does this repo do", "break down this project", "explain the structure of this code", or points you at a repository and wants to understand how it's designed. Also trigger when the user shares a repo URL or path and asks broad questions like "how does this work" or "what's going on here". Do NOT use for debugging (use ask:debug), general tech concepts (use ask:tech), or non-technical topics (use ask:thing).
How this skill is triggered — by the user, by Claude, or both
Slash command
/ask:analyze-repoThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
When asked to analyze a repository, conduct an architecture review — not a code walkthrough. Think like a senior engineer reviewing a system for the first time: find the critical path, understand the design intent, and surface what matters.
When asked to analyze a repository, conduct an architecture review — not a code walkthrough. Think like a senior engineer reviewing a system for the first time: find the critical path, understand the design intent, and surface what matters.
Don't read every file. Be strategic — focus on entry points, core packages, and key abstractions.
Work through these 6 layers. Focus on the happy path — ignore edge cases, error handling, and peripheral logic unless they reveal important design decisions.
Answer in 2-3 sentences: what does this project do, and where does it sit in the larger system? Is it a controller, a library, a CLI tool, a service, a plugin?
If it's part of a larger ecosystem, name its upstream dependencies and downstream consumers.
Map the top-level packages/modules and their responsibilities:
repo/
├── cmd/ — entry points, CLI setup
├── pkg/api/ — public API types and interfaces
├── pkg/controller/ — reconciliation logic
│ ├── foo/ — handles Foo resources
│ └── bar/ — handles Bar resources
├── pkg/store/ — persistence layer
└── internal/ — private utilities
For each major module, one line on what it owns. Skip vendored/generated code.
Trace the most important operation end-to-end. Pick the one path that best represents what this project does — the thing that if it stopped working, the project would be useless.
Walk through it step by step with an ASCII diagram:
User creates CR → API Server stores it → Controller watches → Reconcile()
→ Read current state → Diff desired vs actual → Apply changes → Update status
Name the actual functions/methods involved at each step — but explain what they do, not how they do it line by line.
Identify the 3-5 most important types, interfaces, or CRDs that define the system's vocabulary:
FooSpec — defines the desired state of a Foo; key fields: replicas, image, configReconciler interface — Reconcile(ctx, req) (Result, error) — the core loop entry pointStore interface — abstracts persistence; implementations for etcd and in-memoryFor each one: what it represents, its key fields/methods, and why it exists as an abstraction (not just what it contains).
Surface 2-4 deliberate architectural choices and explain the why:
Look for clues in: architecture docs, PR descriptions referenced in comments, the shape of interfaces (what they abstract over reveals what's expected to change), and anything that seems like it could have been done differently.
Identify 2-4 areas that are fragile, overly complex, or could be improved:
utils/ package is a grab bag with no clear ownership — several functions belong in their respective domain packages"Be specific and actionable. "The code could be cleaner" is useless. "The sync() function in pkg/controller/foo.go mixes API calls with business logic — extracting the API calls into the store layer would make it testable" is useful.
Provides 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 wangke19/my-claude-skills --plugin ask