clean-architecture
Installation
SKILL.md
Clean Architecture
Use this skill when
- Organizing application code with stable business rules in the center
- Making the app testable and independent of UI/DB/framework
- Refactoring a codebase with tangled layers
Do not use this skill when
- The cost of layering outweighs the benefit (small CRUD apps)
- You are doing service boundaries (use service-boundaries)
Instructions
- Define entities and use cases as plain, framework-free code.
- Define repositories/presenters as interfaces in the inner ring.
- Implement adapters for DB, HTTP, and UI in the outer ring.
- Enforce the dependency rule: nothing inner may import outer.
- Use dependency injection at composition edges.
- Test the business rules without any framework.