clean-architecture

Analyze application codebases for Clean Architecture principle violations and dependency direction issues.

Updated Apr 9, 2026
One-click install
npx skills add https://github.com/remiconnesson/insights-garden --skill clean-architecture-remiconnesson
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-architecture
Source: https://github.com/remiconnesson/insights-garden/tree/main/.agents/skills/clean-architecture
Command: npx skills add https://github.com/remiconnesson/insights-garden --skill clean-architecture-remiconnesson

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Clean Architecture helps you design software that stays maintainable, testable, and easy to change by keeping business rules isolated from frameworks, databases, and delivery mechanisms. It is especially useful when codebases start to become tangled, dependencies point the wrong way, or refactoring is blocked by tight coupling.

Core Features & Use Cases

  • Dependency direction guidance: keep inner business layers independent from outer technical details.
  • Domain and entity design: model real business rules, invariants, and value objects without persistence or UI concerns.
  • Use case structuring: separate orchestration from business logic, define input/output ports, and keep controllers thin.
  • Boundary and framework isolation: place ORM, web, logging, and external API concerns at the edges.
  • Testing architecture: make each layer testable in isolation and enforce boundaries with architecture tests.
  • Use case: Review a Next.js or backend repository, identify architectural violations, and produce a prioritized refactoring plan that improves separation of concerns.

Quick Start

Ask for a Clean Architecture review of a codebase or feature, and I will identify boundary violations, recommend layer changes, and summarize the highest-impact refactors first.

Frequently Asked Questions about clean-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I identify clean architecture violations in my codebase?

Clean architecture violations are identified by analyzing dependency direction, entity purity, and layer boundaries to detect inward-pointing dependencies and tight coupling. The review produces a prioritized refactoring plan that isolates business rules from frameworks and infrastructure.

When do I need to apply dependency inversion to separate business logic from frameworks?

Dependency inversion is needed when inner business layers depend on outer technical details like databases or web frameworks. Applying it keeps domain entities and use cases isolated, ensuring system maintainability and testability during refactoring.

Can I use this to review a Next.js or backend repository for separation of concerns?

Yes, you can review Next.js or backend repositories to evaluate framework isolation and component cohesion. The analysis checks whether ORM, web, and logging concerns are placed at the edges, keeping controllers thin and use cases properly isolated.

How do I structure use cases and input/output ports for testable software design?

Use cases are structured by separating orchestration from business logic and defining clear input and output ports. This separation keeps controllers thin, allows each layer to be tested in isolation, and enforces boundaries through architecture tests.

What is the best way to refactor tangled dependencies that block code changes?

The best way to refactor tangled dependencies is mapping layer boundaries and enforcing dependency direction so inner layers stay independent. A prioritized refactoring plan improves separation of concerns by moving external API and persistence concerns to the edges.