CL

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.zip

Installs 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.
103 charsno explicit “when” trigger
Advanced

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

You give it
Code changes (e.g., refactors, pull requests)
You get back
A summary of architectural quality, findings with severity, and safe refactor suggestions

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.md
  • docs/architecture/ARCHITECTURE.md
  • docs/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

  1. Identify the changed files and map each file to a layer
  2. Inspect imports and dependencies between those files
    • Treat any direct import from src.infrastructure/ into src/application/ or src/presentation/ as a likely blocker unless the file is a documented composition root outside those layers
  3. Mark any boundary violations, layer leakage, or duplicated logic
  4. Note weak contracts, lingering mapping-style payloads, or compatibility layers that may no longer be justified
  5. Separate critical issues from minor improvements
  6. Suggest the smallest safe refactor instead of a full rewrite
  7. 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, or low
  • 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.

SkillInstallsUpdatedSafetyDifficulty
clean-architecture-review (this skill)03moNo flagsAdvanced
solid-principles579moNo flagsIntermediate
python-design-patterns192moNo flagsIntermediate
modular-code47moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry