Review code for architecture: module and layer boundaries, dependency direction, single responsibility, cyclic dependencies, interface stability, and coupling. Cognitive-only atomic skill; output is a findings list.
Review code for architecture concerns only. Do not define scope (diff vs codebase) or perform language/framework/security analysis; those are separate atomic skills. Emit a findings list in the standard format for aggregation. Focus on module and layer boundaries, dependency direction, single responsibility, cyclic dependencies, interface stability, and coupling and extension points.
Core Objective
Primary goal: Produce an architecture-focused findings list covering module/layer boundaries, dependency direction, single responsibility, cyclic dependencies, interface stability, and coupling for the given code scope.
Success Criteria (ALL must be met):
✅ Architecture-only scope: Only architecture dimensions are reviewed; no scope selection, language/framework conventions, security, or performance analysis performed
✅ All six architecture dimensions covered: Module/layer boundaries, dependency direction, single responsibility, cyclic dependencies, interface stability, and coupling are assessed where relevant
✅ Findings format compliant: Each finding includes Location, Category (cognitive-architecture), Severity, Title, Description, and optional Suggestion
✅ Location-precise references: All findings reference specific modules, packages, or files (not vague descriptions)
✅ Actionable output: Each finding provides a concrete refactoring suggestion or improvement direction
Acceptance Test: Does the output contain an architecture findings list covering all relevant structural dimensions with specific module/file references and actionable refactoring suggestions?
Scope Boundaries
This skill handles:
Module and layer boundary clarity (API, domain, data layer separation)
Dependency direction analysis (inward toward domain, stable abstractions)
Single responsibility assessment per module/class
Cyclic dependency detection and break points
Interface stability and leaking implementation details
Coupling analysis and extension point design
This skill does NOT handle:
Scope selection (deciding which files/paths to analyze) — scope is provided by the caller
Language/framework convention analysis — use review-dotnet, review-java, review-go, etc.
Security review — use review-security
Performance review — use review-performance
Current-state codebase review combining all dimensions — use review-codebase
Full orchestrated review — use orchestrate-code-review
Handoff point: When all architecture findings are emitted, hand off to orchestrate-code-review orchestrator for aggregation, or deliver directly to the user for architecture-focused sessions. For deep codebase audits, suggest also running review-codebase.
Use Cases
Orchestrated review: Used as a cognitive step when orchestrate-code-review runs scope → language → framework → library → cognitive.
Architecture-focused review: When the user wants only boundaries, dependencies, and structure checked.
Refactor or onboarding: Understand and critique current structure for planning or documentation.
When to use: When the task includes architecture or design review. Scope and code scope are determined by the caller or user.
Behavior
Scope of this skill
Analyze: Architecture dimensions in the given code scope (files or diff provided by the caller). Do not decide scope; accept the code range as input. For large scope, consider layers or modules and summarize.
Do not: Perform scope selection, language/framework conventions, or security review. Focus only on architecture and structure.
Review checklist (architecture dimension only)
Module and layer boundaries: Are module/service boundaries clear? Are layers (e.g. API, domain, data) respected? Do high-level modules avoid depending on low-level details?
Dependency direction: Do dependencies point in the intended direction (e.g. inward toward domain, or toward stable abstractions)? No reverse or circular dependency direction at module level.
Single responsibility: Does each module/class have one clear responsibility? Are boundaries cohesive?
Cyclic dependencies: Are there cycles between modules, packages, or components? Suggest break points (e.g. extract interface, move shared code).
Interface stability: Are public APIs and interfaces stable and minimal? Are implementation details leaking across boundaries?
Coupling and extension points: Is coupling to concrete types or frameworks minimized where extension is expected? Are extension points (e.g. plugins, strategies) clear?
Tone and references
Professional and technical: Reference specific locations (file, module, or package). Emit findings with Location, Category, Severity, Title, Description, Suggestion.
Input & Output
Input
Code scope: Files or directories (or diff) already selected by the user or scope skill. This skill does not decide scope; it reviews the provided code for architecture only.
Output
Emit zero or more findings in the format defined in specs/findings-list.md, with Categorycognitive-architecture.
Category for this skill is cognitive-architecture.
Restrictions
Hard Boundaries
Do not perform scope selection, language, framework, or security review. Stay within architecture dimensions.
Do not give conclusions without specific locations or actionable suggestions.
Do not assume a specific architecture style (e.g. clean/hexagonal) unless the project states it; evaluate against general boundaries and dependency principles.
Skill Boundaries
Do NOT do these (other skills handle them):
Do NOT select or define the code scope — scope is determined by the caller or orchestrate-code-review
Do NOT perform language/framework convention analysis — use review-dotnet, review-java, review-go, etc.
Do NOT perform security or performance review — use review-security or review-performance
Do NOT assume a specific architecture pattern (clean, hexagonal, etc.) unless explicitly stated
When to stop and hand off:
When all architecture findings are emitted, hand off to orchestrate-code-review for aggregation in an orchestrated review
When the user needs a full review (scope + language + cognitive), redirect to orchestrate-code-review
When comprehensive codebase state review is needed beyond architecture, redirect to review-codebase
Self-Check
Core Success Criteria
Architecture-only scope: Only architecture dimensions are reviewed; no scope selection, language/framework conventions, security, or performance analysis performed
All six architecture dimensions covered: Module/layer boundaries, dependency direction, single responsibility, cyclic dependencies, interface stability, and coupling are assessed where relevant
Findings format compliant: Each finding includes Location, Category (cognitive-architecture), Severity, Title, Description, and optional Suggestion
Location-precise references: All findings reference specific modules, packages, or files (not vague descriptions)
Actionable output: Each finding provides a concrete refactoring suggestion or improvement direction
Process Quality Checks
Was only the architecture dimension reviewed (no scope/language/security)?
Are boundaries, dependency direction, responsibility, cycles, interfaces, and coupling covered where relevant?
Is each finding emitted with Location, Category=cognitive-architecture, Severity, Title, Description, and optional Suggestion?
Are module/package/file references precise enough to act on?
Acceptance Test
Does the output contain an architecture findings list covering all relevant structural dimensions with specific module/file references and actionable refactoring suggestions?
Examples
Example 1: Reverse dependency
Input: Domain layer imports from infrastructure (e.g. DB driver) directly.
Expected: Emit a finding for dependency direction; suggest interface in domain and implementation in infrastructure. Category = cognitive-architecture.
Example 2: Cycle between packages
Input: Package A imports B, B imports C, C imports A.
Expected: Emit finding(s) identifying the cycle and suggest break point (e.g. extract shared interface or type to a neutral package). Category = cognitive-architecture.
Edge case: Small or single-file scope
Input: Single file or very small module.
Expected: Review internal structure (responsibility, coupling to external types); if scope is too small for module-level concerns, state that and emit only findings that apply (e.g. single responsibility, interface clarity).
1---2name: review-architecture3description: Review code for architecture: module and layer boundaries, dependency direction, single responsibility, cyclic dependencies, interface stability, and coupling. Cognitive-only atomic skill; output is a findings list.4license: MIT5---67# Skill: Review Architecture89## Purpose1011Review code for **architecture** concerns only. Do not define scope (diff vs codebase) or perform language/framework/security analysis; those are separate atomic skills. Emit a **findings list** in the standard format for aggregation. Focus on module and layer boundaries, dependency direction, single responsibility, cyclic dependencies, interface stability, and coupling and extension points.1213---1415## Core Objective1617**Primary goal**: Produce an architecture-focused findings list covering module/layer boundaries, dependency direction, single responsibility, cyclic dependencies, interface stability, and coupling for the given code scope.1819**Success Criteria** (ALL must be met):20211. ✅ **Architecture-only scope**: Only architecture dimensions are reviewed; no scope selection, language/framework conventions, security, or performance analysis performed222. ✅ **All six architecture dimensions covered**: Module/layer boundaries, dependency direction, single responsibility, cyclic dependencies, interface stability, and coupling are assessed where relevant233. ✅ **Findings format compliant**: Each finding includes Location, Category (`cognitive-architecture`), Severity, Title, Description, and optional Suggestion244. ✅ **Location-precise references**: All findings reference specific modules, packages, or files (not vague descriptions)255. ✅ **Actionable output**: Each finding provides a concrete refactoring suggestion or improvement direction2627**Acceptance Test**: Does the output contain an architecture findings list covering all relevant structural dimensions with specific module/file references and actionable refactoring suggestions?2829---3031## Scope Boundaries3233**This skill handles**:3435- Module and layer boundary clarity (API, domain, data layer separation)36- Dependency direction analysis (inward toward domain, stable abstractions)37- Single responsibility assessment per module/class38- Cyclic dependency detection and break points39- Interface stability and leaking implementation details40- Coupling analysis and extension point design4142**This skill does NOT handle**:4344- Scope selection (deciding which files/paths to analyze) — scope is provided by the caller45- Language/framework convention analysis — use `review-dotnet`, `review-java`, `review-go`, etc.46- Security review — use `review-security`47- Performance review — use `review-performance`48- Current-state codebase review combining all dimensions — use `review-codebase`49- Full orchestrated review — use `orchestrate-code-review`5051**Handoff point**: When all architecture findings are emitted, hand off to `orchestrate-code-review` orchestrator for aggregation, or deliver directly to the user for architecture-focused sessions. For deep codebase audits, suggest also running `review-codebase`.5253---5455## Use Cases5657- **Orchestrated review**: Used as a cognitive step when [orchestrate-code-review](../orchestrate-code-review/SKILL.md) runs scope → language → framework → library → cognitive.58- **Architecture-focused review**: When the user wants only boundaries, dependencies, and structure checked.59- **Refactor or onboarding**: Understand and critique current structure for planning or documentation.6061**When to use**: When the task includes architecture or design review. Scope and code scope are determined by the caller or user.6263---6465## Behavior6667### Scope of this skill6869- **Analyze**: Architecture dimensions in the **given code scope** (files or diff provided by the caller). Do not decide scope; accept the code range as input. For large scope, consider layers or modules and summarize.70- **Do not**: Perform scope selection, language/framework conventions, or security review. Focus only on architecture and structure.7172### Review checklist (architecture dimension only)73741. **Module and layer boundaries**: Are module/service boundaries clear? Are layers (e.g. API, domain, data) respected? Do high-level modules avoid depending on low-level details?752. **Dependency direction**: Do dependencies point in the intended direction (e.g. inward toward domain, or toward stable abstractions)? No reverse or circular dependency direction at module level.763. **Single responsibility**: Does each module/class have one clear responsibility? Are boundaries cohesive?774. **Cyclic dependencies**: Are there cycles between modules, packages, or components? Suggest break points (e.g. extract interface, move shared code).785. **Interface stability**: Are public APIs and interfaces stable and minimal? Are implementation details leaking across boundaries?796. **Coupling and extension points**: Is coupling to concrete types or frameworks minimized where extension is expected? Are extension points (e.g. plugins, strategies) clear?8081### Tone and references8283- **Professional and technical**: Reference specific locations (file, module, or package). Emit findings with Location, Category, Severity, Title, Description, Suggestion.8485---8687## Input & Output8889### Input9091- **Code scope**: Files or directories (or diff) already selected by the user or scope skill. This skill does not decide scope; it reviews the provided code for architecture only.9293### Output9495- Emit zero or more **findings** in the format defined in [specs/findings-list.md](../../specs/findings-list.md), with **Category** `cognitive-architecture`.96- Category for this skill is **cognitive-architecture**.9798---99100## Restrictions101102### Hard Boundaries103104- **Do not** perform scope selection, language, framework, or security review. Stay within architecture dimensions.105- **Do not** give conclusions without specific locations or actionable suggestions.106- **Do not** assume a specific architecture style (e.g. clean/hexagonal) unless the project states it; evaluate against general boundaries and dependency principles.107108### Skill Boundaries109110**Do NOT do these** (other skills handle them):111112- Do NOT select or define the code scope — scope is determined by the caller or `orchestrate-code-review`113- Do NOT perform language/framework convention analysis — use `review-dotnet`, `review-java`, `review-go`, etc.114- Do NOT perform security or performance review — use `review-security` or `review-performance`115- Do NOT assume a specific architecture pattern (clean, hexagonal, etc.) unless explicitly stated116117**When to stop and hand off**:118119- When all architecture findings are emitted, hand off to `orchestrate-code-review` for aggregation in an orchestrated review120- When the user needs a full review (scope + language + cognitive), redirect to `orchestrate-code-review`121- When comprehensive codebase state review is needed beyond architecture, redirect to `review-codebase`122123---124125## Self-Check126127### Core Success Criteria128129- [ ] **Architecture-only scope**: Only architecture dimensions are reviewed; no scope selection, language/framework conventions, security, or performance analysis performed130- [ ] **All six architecture dimensions covered**: Module/layer boundaries, dependency direction, single responsibility, cyclic dependencies, interface stability, and coupling are assessed where relevant131- [ ] **Findings format compliant**: Each finding includes Location, Category (`cognitive-architecture`), Severity, Title, Description, and optional Suggestion132- [ ] **Location-precise references**: All findings reference specific modules, packages, or files (not vague descriptions)133- [ ] **Actionable output**: Each finding provides a concrete refactoring suggestion or improvement direction134135### Process Quality Checks136137- [ ] Was only the architecture dimension reviewed (no scope/language/security)?138- [ ] Are boundaries, dependency direction, responsibility, cycles, interfaces, and coupling covered where relevant?139- [ ] Is each finding emitted with Location, Category=cognitive-architecture, Severity, Title, Description, and optional Suggestion?140- [ ] Are module/package/file references precise enough to act on?141142### Acceptance Test143144Does the output contain an architecture findings list covering all relevant structural dimensions with specific module/file references and actionable refactoring suggestions?145146---147148## Examples149150### Example 1: Reverse dependency151152- **Input**: Domain layer imports from infrastructure (e.g. DB driver) directly.153- **Expected**: Emit a finding for dependency direction; suggest interface in domain and implementation in infrastructure. Category = cognitive-architecture.154155### Example 2: Cycle between packages156157- **Input**: Package A imports B, B imports C, C imports A.158- **Expected**: Emit finding(s) identifying the cycle and suggest break point (e.g. extract shared interface or type to a neutral package). Category = cognitive-architecture.159160### Edge case: Small or single-file scope161162- **Input**: Single file or very small module.163- **Expected**: Review internal structure (responsibility, coupling to external types); if scope is too small for module-level concerns, state that and emit only findings that apply (e.g. single responsibility, interface clarity).
Run npx skillmds@latest add nesnilnehc/review-architecture in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Review code for architecture: module and layer boundaries, dependency direction, single responsibility, cyclic dependencies, interface stability, and coupling. Cognitive-only atomic skill; output is a findings list. It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free. This skill is licensed under MIT.
nesnilnehc (@nesnilnehc) published this skill. Their other Agent Skills are listed on their SkillMD profile.