architecture-review
Skill0 starsChanged 4 months agoApache-2.0View on GitHub
Review whether code respects the repository's intended architecture, backed by evidence rather than opinion. Reviews the whole system or one feature's diff. Checks the dependency rule of Clean Architecture where it applies, whether a new feature reused a mature framework instead of reinventing it, and whether a third-party library was considered before hand-rolling. On system-wide problems it asks whether to fix the whole system or narrow to the feature, then outputs an ordered plan. Reports only, never edits a file. Use when reviewing architecture, judging whether code fits the layering, before merging a feature, or when the user says "review architecture", "review the whole system", "clean architecture check", "đánh giá kiến trúc", "review kiến trúc", "review toàn hệ thống", "code có đúng clean architecture chưa".
52 other projects use a version of this.
Adopted by
Most recently taken up by
- HunLuanZhiZhu/Game-Studios-Plugintheir own version, first seen Oct 5, 2026
- microsoft/hve-coretheir own version, first seen Sep 29, 2026
- smitshivalkar-spectims4567/hsj-agent-skillstheir own version, first seen Sep 29, 2026
- Donchitos/Claude-Code-Game-Studiostheir own version, first seen Sep 29, 2026
- pradeepvonti-web/agentops-incident-hubtheir own version, first seen Sep 28, 2026
- gonimar/claude-web-studiotheir own version, first seen Sep 27, 2026
Used with
Projects with it also use asset-spec, create-control-manifest and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
cenconq25Skillasset-spec
Generates per-asset visual specifications and AI-generation prompts from PRDs and the design bible. Produces structured spec files and updates a master asset manifest. Use after design bible is approved and a UX spec or PRD identifies assets to produce. Output: design/assets/<asset>.md plus design/assets/manifest.md.
Also in 5 projects that use this
cenconq25Skillcreate-control-manifest
Produces a flat, immediately-actionable rules sheet — do this, never do that, per system and per layer — extracted from accepted ADRs, technical preferences, and framework reference docs. More directly usable than ADRs for day-to-day implementation. Run after /architecture-review passes.
Also in 5 projects that use this
- +10 more from cenconq25
Other versions52 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 52
- Donchitos/Claude-Code-Game-Studios★ 26ksame name
- microsoft/hve-core★ 1.5ksame name
- decebals/claude-code-java★ 747same name
- getsentry/warden★ 412same name
- owainlewis/blueprint★ 410same name
- proflead/codex-skills-library★ 153same name
- extra-org/extra★ 113same name
- thiientv/godmode★ 96same name
- striderZA/OpenCodeGameStudios★ 90same name
- codenamev/ai-software-architect★ 78same name
42 more not listed
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 repository11 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- commit-conventionSkill
- pr-conventionSkill
- repo-setupSkill
- code-styleSkill
- comment-reviewSkill
- review-gateSkill
- book-clean-architectureSkill
- book-legacy-codeSkill
- book-philosophy-of-software-designSkill
- book-refactoringSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 7 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 46 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Every claim carries evidence: a file:line, an import, a config entry, or a command and its output.
- Very specific: line 67
If the repository already declares an architecture (a domain/ layer, an architecture.md, an import-linter, ArchUnit or depguard config), …
- Distinctive: line 111
If none exists, run the grep across every inner layer and report the commands and their empty output as the evidence.
- Distinctive: line 131
Check three things, each with evidence from the tree:
- Distinctive: line 143
Do not invent a layer vocabulary.
- Distinctive: line 153
When the change builds something a mature framework or platform already solves, the reviewer asks whether it was reused.
- Distinctive: line 157
Check the diff for hand-rolled versions of solved problems:
- Distinctive: line 224
When the change is sound, say so plainly with the evidence: which layers the new files sit in, that the dependency rule holds by tool or by …
- Distinctive: line 232
Only when the user chose to fix the whole system in section 0.
“Common” is measured: kept by at least 6 in 10 of the 46 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Architecture review
You are a software architect reviewing code against the architecture the repository already intends, not against a template.
This skill reports only. It never edits a file. When a system-wide fix is wanted, it outputs an ordered plan, not changes.
Every claim carries evidence: a file:line, an import, a config entry, or a
command and its output. A verdict without evidence is not a verdict.
0. Pick the scope, then the fix question
Two scopes. The trigger decides which one starts.
| The user asks | Start scope |
| "review the architecture", "review the whole system", a broad health check | Whole system |
| "review this change", "does this feature fit", before merging a diff | One feature (the diff) |
Whole-system flow:
- Audit the whole tree with sections 1 to 5, not a diff.
- Found nothing wrong? Report that the architecture holds, with evidence. Stop.
Found problems? Ask one question before going further:
Found
<n>architecture problems across the system:<one line each>. Replysystemto plan a fix across the whole system, orfeatureto review only the current feature.- Reply
system: output the system-wide plan in section 7, ordered by blast radius. No file edits. - Reply
feature, or any answer that declines the system-wide scope: narrow to the current feature and run the feature flow below against that diff alone.
Feature flow: resolve the range as the pr-convention and comment-review
skills do. <base> is the integration branch the feature forks from, found with
git merge-base HEAD origin/<integration>. Diff with git diff <base>...HEAD,
or git add -N . then git diff HEAD for uncommitted work. State the range at
the top of the report. Run sections 1 to 5 against that diff.
1. Does Clean Architecture even apply here?
Clean Architecture separates business logic from frameworks and IO. It earns its cost only where there is business logic to protect. Decide before judging.
| Repository kind | Verdict |
| Application with domain rules (money, orders, auth, workflows) | Applies. Run section 2 |
| Library or SDK | Judge the public API surface, not layers |
| CLI or script under a few thousand lines | Does not apply. Layering it is over-engineering. Say so |
| Infrastructure, config, glue | Does not apply |
Detect the kind from the tree and the diff, not from a wish. If the repository never had layers and the change did not add business logic, the correct finding is "Clean Architecture does not apply to this repository", with the reason.
If the repository already declares an architecture (a domain/ layer, an
architecture.md, an import-linter, ArchUnit or depguard config), judge
the change against that, not against a generic ideal.
2. The dependency rule, with evidence
Clean Architecture reduces to one testable rule: source dependencies point inward. Inner layers know nothing of outer ones.
domain <- application <- adapters <- transport / frameworkA violation is an import that points outward. Prove it or drop the claim.
How to prove a violation
Grep the inner layers for outward imports. The exact pattern depends on the stack, but the shape is always the same:
| Stack | Command |
| Python | grep -rn "import fastapi|import sqlalchemy|import flask" domain/ application/ |
| Go | grep -rn "net/http|database/sql|gin-gonic" internal/domain/ |
| Java | check domain package for org.springframework, javax.persistence |
| TypeScript | grep -rn "express|prisma|@nestjs" src/domain/ |
A hit is a confirmed violation. Report it as:
src/domain/order.py:14 VIOLATION
the domain layer imports sqlalchemy, an outer concern
dependency points outward, breaking the dependency ruleEvidence that the rule holds
Passing is not the absence of a grep hit alone. Prefer machine-checked proof:
- An enforcement tool wired into CI:
import-linter(Python),ArchUnit(Java),depguardorgo-arch-lint(Go),eslint-plugin-boundaries(TS). Show the config and that CI runs it. - If none exists, run the grep across every inner layer and report the commands and their empty output as the evidence.
State which of the two you relied on. "Looks layered" is not evidence.
What the diff changed
For the current change specifically:
- Which layer does each new file belong to.
- Does any new import cross a boundary the wrong way.
- Did a new dependency get added to an inner layer's manifest.
3. Structure and layer naming
Clean Architecture fixes the dependency direction, not a folder vocabulary. Judge the tree against the naming the repository already chose, not a textbook set.
Check three things, each with evidence from the tree:
- Layer folders are named consistently. One scheme, not
domain/in one module andcore/for the same role in another. Report the split with both paths. - A file sits in the folder its role belongs to. A repository implementation
belongs in the adapter layer, not in
domain/. A use case belongs inapplication/, not in transport. Name the file and the layer it landed in. - A new file follows the pattern of its siblings. Where sibling files are
order_repository.py, a newOrderRepo.pyis the finding, by inconsistency, not by an outside rule.
Do not invent a layer vocabulary. If the repository has no declared layers, this section does not apply, the same as section 1.
File and folder casing as a lint rule belongs to code-style. This section
judges placement and layer naming, not the casing scheme.
4. Framework before hand-rolling
When the change builds something a mature framework or platform already solves, the reviewer asks whether it was reused. Reinventing a solved problem is a finding.
Check the diff for hand-rolled versions of solved problems:
| Hand-rolled in the diff | Established solution to reuse |
| HTTP router, request parsing | The web framework already in the project |
| Own ORM or query builder | The data layer already in the project |
| Own DI container, config loader | The framework's, or a small known library |
| Own retry, backoff, rate limit | tenacity, resilience4j, stdlib equivalents |
| Own date, money, validation logic | datetime/decimal, a validation library |
A finding here is not "you must add a dependency". It is "this reimplements X; the project already depends on Y that does it, or Y is the standard choice. Confirm the reinvention is deliberate."
Reinventing is sometimes correct: a one-off need, a hard licence, a heavy dependency for three lines. When the diff reinvents on purpose, the code should say why in one line. Absence of that reason is the finding, not the choice.
5. Was a third-party library considered
For a genuinely new capability, the question is whether the ecosystem was searched before writing custom code.
This cannot be proven from the diff alone, so ask rather than assume. Frame it as one question, not an accusation:
The diff adds a custom
<thing>. Which libraries did you evaluate, and why did none fit? If none were checked,<candidate-1>and<candidate-2>cover this.
Name real, current candidates for the stack. If you are not sure a library exists or is maintained, say you are not sure rather than inventing one.
Weigh the trade-off honestly. A dependency has a cost: supply-chain surface, version churn, transitive weight. The finding is not "always use a library". It is "a solved problem was solved again without a recorded reason".
6. Report
Order findings by blast radius: dependency-rule violations first, then reinvention, then unexamined library choices, then smaller structural notes.
architecture review of origin/main...HEAD
Clean Architecture: applies (repository has a domain/ layer)
Enforcement: import-linter, 2 contracts, run in CI
FINDINGS
src/domain/order.py:14 VIOLATION
the domain layer imports sqlalchemy
fix: move persistence behind a repository port in application/
src/api/retry.py:1 REINVENTION
hand-rolled exponential backoff
tenacity is already a dependency and does this. Confirm the reason
QUESTION
the diff adds a custom csv parser. Which libraries were evaluated?
the stdlib csv module handles quoting and newlines alreadyWhen the change is sound, say so plainly with the evidence: which layers the new files sit in, that the dependency rule holds by tool or by grep, and that no solved problem was reinvented. Do not manufacture findings.
7. System-wide fix plan
Only when the user chose to fix the whole system in section 0. Still no file edits. Output an ordered plan so the work can be handed off or done later.
Order by blast radius: the fix that unblocks or contains the most violations comes first. For each step give the evidence, the target state, and the move.
system-wide architecture fix plan
1. domain layer imports persistence (4 files)
evidence: grep hit in domain/order.py:14, domain/user.py:9, ...
target: domain depends on ports only
move: add repository ports in application/, invert the 4 imports
blast radius: clears the dependency-rule contract for the whole domain
2. three hand-rolled retry loops
evidence: api/retry.py:1, worker/backoff.py:20, ...
target: one retry policy
move: replace with tenacity, already a dependencyEach step is a separate commit and ships on its own. Name the safe order and say what breaks if a step is skipped. When a step needs a design decision, name the decision and stop there rather than assuming it. Do not fold the plan into one big-bang rewrite.
For carrying a step out later, the improve-codebase-architecture and
codebase-design skills do the editing. This skill stops at the plan.
Reference conventions
- Robert C. Martin, the Clean Architecture dependency rule
- The hexagonal, ports-and-adapters pattern (Alistair Cockburn)
- The twelve-factor app, for config and dependency handling
- The repository's own architecture document or lint config, which wins over all of the above
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.

