clean-architecture

Structure software around the Dependency Rule with layered boundaries and SOLID principles.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Business logic often becomes tightly coupled to frameworks, databases, and delivery mechanisms, making systems hard to test, change, and maintain. This Skill provides a disciplined framework for organizing code so that business rules remain independent of infrastructure details. ## Core Features & Use Cases - Dependency Rule Enforcement: Organize code into concentric circles (Entities, Use Cases, Adapters, Frameworks) where dependencies always point inward. - Architecture Scoring: Rate any architecture 0-10 against six principle areas and get specific improvements to reach 10/10. - Boundary Design Guidance: Apply full boundaries, partial boundaries, the Humble Object pattern, and plugin architecture with a composition root. - Use Case: When reviewing a codebase where ORM models leak into business logic, use this Skill to identify the violations, introduce repository interfaces, and restructure the layers so the database becomes a swappable detail. ## Quick Start Review my project's architecture and score it against the Clean Architecture principles, then suggest how to decouple the business logic from the framework.

Frequently Asked Questions about clean-architecture

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

FAQPage Schema
How do I apply the Dependency Rule in an existing codebase?

Identify outward dependencies in inner layers, define interfaces in the inner circle describing what it needs, move concrete implementations outward, and wire everything in a Main composition root. This four-step inversion process works for any violation.

What is the difference between entities and use cases in Clean Architecture?

Entities encapsulate enterprise-wide business rules that would exist without software, while use cases contain application-specific rules orchestrating data flow to and from entities. Each use case represents a single application operation like PlaceOrder or CancelOrder.

Does Clean Architecture work with microservices?

Yes, but services are deployment boundaries, not automatic architectural boundaries. Each service should apply the Dependency Rule internally with its own entities, use cases, and adapters, and avoid shared databases or shared data models.

How do I keep ORM models out of my business logic?

Use the two-model approach: keep pure domain entities in the inner circle and ORM-annotated persistence models in the adapter layer. Gateways map between the two, so schema changes never ripple into business rules.

When should I use a partial boundary instead of a full boundary?

Use partial boundaries when the anticipated need does not justify the cost of reciprocal ports and DTOs. Options include interfaces within one package, the strategy pattern, or a facade, reserving full boundaries for points of likely volatility.