clean-architecture-review
Audits code for clean architecture compliance, checking for layer leakage and coupling issues.
Install
mkdir -p .claude/skills/clean-architecture-review && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12884" && unzip -o skill.zip -d .claude/skills/clean-architecture-review && rm skill.zipInstalls to .claude/skills/clean-architecture-review
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Review changes for clean architecture boundary violations, layer leakage, and misplaced business logic.Key capabilities
- →Identify changed files and map them to layers
- →Inspect imports and dependencies for boundary violations
- →Mark layer leakage or duplicated logic
- →Note weak contracts or lingering payloads
- →Suggest smallest safe refactors
How it works
This skill reviews code changes by mapping files to architectural layers, inspecting dependencies for violations, and suggesting minimal refactors.
Inputs & outputs
When to use clean-architecture-review
- →Reviewing architectural changes
- →Detecting layer leakage
- →Validating clean architecture compliance
- →Refactoring code boundaries
About this skill
Canonical references
Read these first:
.specify/README.md.specify/memory/constitution.md.specify/review-checklist.mddocs/architecture/ARCHITECTURE.mddocs/architecture/ARCHITECTURE_TRANSITIONS.md
When to use
Use this skill when:
- reviewing refactors
- reviewing pull requests
- planning architectural changes
- checking whether code placement matches clean architecture rules
- validating whether a change increased coupling between layers
Goal
Identify whether the implementation respects project boundaries and recommend the smallest safe improvement. Also assess whether the changed area improves explicit contracts, onboarding readability, and temporary-structure discipline.
Review process
- Identify the changed files and map each file to a layer
- Inspect imports and dependencies between those files
- Treat any direct import from
src.infrastructure/intosrc/application/orsrc/presentation/as a likely blocker unless the file is a documented composition root outside those layers
- Treat any direct import from
- Mark any boundary violations, layer leakage, or duplicated logic
- Note weak contracts, lingering mapping-style payloads, or compatibility layers that may no longer be justified
- Separate critical issues from minor improvements
- Suggest the smallest safe refactor instead of a full rewrite
- Preserve both execution modes:
- Discord bot
- Windows desktop app
Output format
Summary
A short summary of the architectural quality of the change.
Findings
For each finding include:
- severity:
critical,medium, orlow - file or module
- issue
- why it weakens clean architecture
- recommended fix
Prefer calling out:
- hidden coupling
- unclear ownership of responsibilities
- temporary facades that should remain temporary
- poor readability for the next contributor in the affected flow
Safe refactor suggestions
List the smallest safe refactors in priority order.
Validation points
List what should be tested after the change, especially for:
- bot flow
- desktop app hotkey flow
- shared services and use cases
When not to use it
- →When a full rewrite is preferred over a small refactor
- →When architectural changes are not being planned or reviewed
- →When code placement does not need to be checked against clean architecture rules
Limitations
- →Treats direct import from `src.infrastructure/` into `src/application/` or `src/presentation/` as a likely blocker
- →Suggests the smallest safe refactor instead of a full rewrite
- →Preserves both Discord bot and Windows desktop app execution modes
How it compares
This workflow systematically identifies clean architecture boundary violations and suggests targeted refactors, providing a structured approach to maintaining architectural integrity unlike ad-hoc code reviews.
Compared to similar skills
clean-architecture-review side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| clean-architecture-review (this skill) | 0 | 3mo | No flags | Advanced |
| solid-principles | 57 | 9mo | No flags | Intermediate |
| python-design-patterns | 19 | 2mo | No flags | Intermediate |
| modular-code | 4 | 7mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
solid-principles
SmidigStorm
Enforce SOLID principles (Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion) in object-oriented design. Use when writing or reviewing classes and modules.
python-design-patterns
wshobson
Python design patterns including KISS, Separation of Concerns, Single Responsibility, and composition over inheritance. Use when making architecture decisions, refactoring code structure, or evaluating when abstractions are appropriate.
modular-code
parcadei
Modular Code Organization
component-common-domain-detection
tech-leads-club
Identifies duplicate domain functionality across components and suggests consolidation opportunities. Use when finding common domain logic, detecting duplicate functionality, analyzing shared classes, planning component consolidation, or when the user asks about common components, duplicate code, or domain consolidation.
framework-migration-code-migrate
sickn33
You are a code migration expert specializing in transitioning codebases between frameworks, languages, versions, and platforms. Generate comprehensive migration plans, automated migration scripts, and
framework-migration-legacy-modernize
sickn33
Orchestrate a comprehensive legacy system modernization using the strangler fig pattern, enabling gradual replacement of outdated components while maintaining continuous business operations through ex