architecture-review

Codebase architecture review using module depth analysis. Surfaces shallow modules, tight coupling, and locality violations. Proposes deepening opportunities. Use when: pre-refactor audit, tech debt assessment, onboarding architecture review, post-feature architectural cleanup.

33 stars

Best use case

architecture-review is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Codebase architecture review using module depth analysis. Surfaces shallow modules, tight coupling, and locality violations. Proposes deepening opportunities. Use when: pre-refactor audit, tech debt assessment, onboarding architecture review, post-feature architectural cleanup.

Teams using architecture-review should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/architecture-review/SKILL.md --create-dirs "https://raw.githubusercontent.com/theneoai/awesome-skills/main/skills/workflow/engineering/architecture-review/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/architecture-review/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How architecture-review Compares

Feature / Agentarchitecture-reviewStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Codebase architecture review using module depth analysis. Surfaces shallow modules, tight coupling, and locality violations. Proposes deepening opportunities. Use when: pre-refactor audit, tech debt assessment, onboarding architecture review, post-feature architectural cleanup.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Architecture Review

## One-Liner

Surface architectural friction by finding shallow modules, poor locality, and tight coupling — then propose targeted deepening opportunities.

---

## § 1 · Vocabulary

| Term | Definition |
|------|-----------|
| **Module** | Any unit with an interface and an implementation (function, class, service, file) |
| **Depth** | How much behavior a module provides per unit of interface complexity. Deep = lots of behavior, simple interface. Shallow = little behavior, complex or leaky interface |
| **Seam** | The boundary where an interface lives; a place where behavior can shift without editing callers |
| **Locality** | The degree to which a change, bug, or piece of knowledge is concentrated in one place. High locality = one place to change. Low locality = scattered across files |
| **Deepening opportunity** | A refactor that increases module depth or locality without changing externally observable behavior |

---

## § 2 · Workflow

### Phase 1 — Establish Context

Before reviewing code, read:
1. `CONTEXT.md` (domain glossary) — understand canonical terms
2. ADRs in `docs/adr/` or `decisions/` — understand past trade-offs
3. `README.md` — understand stated architectural intent

You are looking for the gap between **stated** architecture and **actual** architecture.

### Phase 2 — Explore for Friction

Walk the codebase noting friction points. For each area, ask:

**Shallow module signals:**
- Does this function/class have a large, complex interface relative to the behavior it encapsulates?
- Would a caller need to know implementation details to use this correctly?
- The "deletion test": if you deleted this module and pushed its logic into callers, would callers become more complex? If yes, the module earns its keep. If no, it is shallow.

**Locality violations:**
- When one concept changes, how many files must change?
- Is business logic scattered across multiple layers (controller + service + model all contain business rules)?
- Are there parallel hierarchies that must be kept in sync?

**Coupling signals:**
- Can you test this module without standing up a large portion of the system?
- Does changing an internal data structure require changing callers?
- Are there untested paths because the module cannot be isolated?

### Phase 3 — Present Candidates

For each friction point found, produce a candidate entry:

```
### Candidate: <short name>

Files involved: <list>
Friction: <what makes this painful today>
Solution: <plain English — what changes>
Benefit: <how locality or depth improves>
Risk: <what could go wrong>
Effort: <S / M / L>
```

Present all candidates to the user before doing any work. Let the user prioritize.

### Phase 4 — Grill Loop

For the selected candidate(s), walk the design collaboratively:

1. Ask one question at a time about the proposed change
2. If a term is ambiguous, resolve it and update `CONTEXT.md`
3. Offer to create an ADR if and only if all three conditions hold:
   - **Hard to reverse**: meaningful cost to change later
   - **Surprising without context**: future reader will wonder "why?"
   - **Genuine trade-off**: real alternatives existed
4. Once design is agreed, implement the deepening

---

## § 3 · Module Depth Scoring (Quick Heuristic)

Rate each candidate module on a 1–5 scale for:

| Dimension | 1 (shallow) | 5 (deep) |
|-----------|------------|---------|
| Interface complexity | Many params, leaky internals | Single call, self-contained |
| Behavior per call | Does little | Does a lot |
| Testability | Requires entire system | Tested in isolation |
| Locality | Scattered knowledge | All knowledge in one place |
| Stability | Interface changes often | Interface rarely changes |

Modules scoring ≤ 2 on average are strong deepening candidates.

---

## § 4 · Common Deepening Patterns

| Pattern | When to apply |
|---------|--------------|
| **Extract value object** | Primitive obsession — raw strings/numbers carry domain meaning |
| **Introduce domain event** | Multiple callers react to state changes via polling or callbacks |
| **Consolidate business rule** | Same validation or decision logic exists in N places |
| **Invert dependency** | Module A knows too much about Module B's internals; introduce an interface |
| **Introduce façade** | Callers orchestrate complex subsystem sequences they shouldn't care about |

---

## § 5 · When to Use This Skill

**Use when:**
- Preparing for a significant refactor
- Onboarding to a new codebase to assess its health
- After shipping a feature — check if the code introduced new architectural debt
- Tech debt sprint planning

**Do NOT use when:**
- The codebase is being actively rewritten (wait for a stable snapshot)
- The task is a single-file change (overkill)

---

## § 6 · Relationship to Other Skills

| Skill | When to reach for it |
|-------|---------------------|
| `zoom-out` | Run first — map the terrain before reviewing it |
| `tdd-workflow` | After identifying a deepening candidate — write tests before refactoring |
| `debug-diagnose` | If a shallow module is masking bugs, diagnose first |
| `to-prd` | Convert the candidate list into tracked issues |

Related Skills

peer-reviewer

33
from theneoai/awesome-skills

Expert peer reviewer with deep knowledge of scientific manuscript evaluation, academic standards, research methodology assessment, and constructive feedback. Specializes in major/minor revision criteria, statistical rigor, and journal matching. Use when: peer-review, manuscript-evaluation, research-methodology, scientific-writing.

grant-reviewer

33
from theneoai/awesome-skills

Senior Grant Reviewer with 20+ years evaluating research proposals for major funding agencies (NIH, NSF, DOE, DOD). Use when reviewing grant applications, scoring proposals, or developing funding strategies

wechat-article-reviewer

33
from theneoai/awesome-skills

微信公众号文章审核助手。当 theneoai 写完文章后 @铁蛋队长 发送文章内容时触发审核。 检查文章是否符合微信公众号发布标准:字数、内容深度、事实性、标题质量、原创度、敏感词、风格一致性、排版规范。 发现问题时提供具体整改意见,退回 theneoai 重写(最多3次),3次不通过则通知 lucas 人工介入。

write-skill

33
from theneoai/awesome-skills

Meta-skill for creating high-quality SKILL.md files. Guides requirement gathering, content structure, description authoring (the agent's routing decision), and reference file organization. Use when: authoring a new skill, improving an existing skill's description or structure, reviewing a skill for quality.

caveman

33
from theneoai/awesome-skills

Ultra-compressed communication mode that cuts ~75% of token use by dropping articles, filler words, and pleasantries while preserving technical accuracy. Use when: long sessions approaching context limits, cost-sensitive API usage, user requests brevity, caveman mode, less tokens, talk like caveman.

zoom-out

33
from theneoai/awesome-skills

Codebase orientation skill: navigate unfamiliar code by ascending abstraction layers to map modules, callers, and domain vocabulary. Use when: first encounter with unknown code, tracing a data flow, understanding module ownership before editing, orienting before a refactor.

to-prd

33
from theneoai/awesome-skills

Converts conversation context into a structured Product Requirements Document (PRD) and publishes it to the project issue tracker. Do NOT interview the user — synthesize what is already known. Use when: a feature has been discussed enough to capture, converting a design conversation into tracked work, pre-sprint planning.

tdd-workflow

33
from theneoai/awesome-skills

Test-driven development workflow using vertical slices (tracer bullets). Enforces behavior-first testing through public interfaces. Use when: writing new features with TDD, red-green-refactor loop, avoiding implementation-coupled tests, incremental feature delivery.

issue-triage

33
from theneoai/awesome-skills

State-machine issue triage workflow for GitHub, Linear, or local issue trackers. Manages category labels (bug, enhancement) and state labels (needs-triage, needs-info, ready-for-agent, ready-for-human, wontfix). Use when: triaging new issues, clearing needs-triage backlog, routing issues to agents vs humans.

debug-diagnose

33
from theneoai/awesome-skills

Structured six-phase debugging workflow centered on building a reliable feedback loop before theorizing. Use when: debugging hard-to-reproduce issues, performance regression, mysterious failures, agent-assisted root cause analysis, systematic bug fixing.

vault-secrets-expert

33
from theneoai/awesome-skills

HashiCorp Vault expert: KV secrets, dynamic credentials, PKI, auth methods. Use when managing secrets, setting up PKI, or implementing secrets management. Triggers: 'Vault', 'secrets management', 'HashiCorp Vault', 'dynamic credentials', 'PKI'.

nmap-expert

33
from theneoai/awesome-skills

Expert-level Nmap skill for network reconnaissance, port scanning, service detection, and security assessment. Triggers: 'Nmap', '网络扫描', '端口扫描', 'NSE脚本'. Works with: Claude Code, Codex, OpenCode, Cursor, Cline, OpenClaw, Kimi.