clean-architecture

Enforce Clean Architecture boundaries and dependency rules during design and refactoring.

1|1|Updated May 24, 2025
One-click install
npx skills add https://github.com/Abrahan-Eagle/zonix-eats-front --skill clean-architecture-abrahan-eagle
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-architecture
Source: https://github.com/Abrahan-Eagle/zonix-eats-front/tree/main/.agents/skills/clean-architecture
Command: npx skills add https://github.com/Abrahan-Eagle/zonix-eats-front --skill clean-architecture-abrahan-eagle

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provides structured guidance for applying Clean Architecture to design, review, and refactor software to achieve clear separation of concerns.

Core Features & Use Cases

  • Defines layer boundaries (entities, use cases, interface adapters, and frameworks) and rules for dependency direction to prevent leakage.
  • Offers strategies for architectural decisions such as partial vs full boundaries, a composition-root main, and testing considerations.
  • Serves as a reference for architectural decisions across teams and projects.

Quick Start

Apply these principles to reorganize a legacy codebase into domain-first layers and testable boundaries.

Frequently Asked Questions about clean-architecture

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

FAQPage Schema
How do I structure software using clean architecture to improve modularity?

Structure software using clean architecture by separating code into domain-first layers: entities, use cases, interface adapters, and frameworks. This approach enforces dependency direction rules, prevents framework leakage, and improves testability across the codebase.

What are the rules for dependency direction and boundaries in clean architecture?

Dependency direction rules in clean architecture mandate that inner layers like entities and use cases must not depend on outer layers like interface adapters or frameworks. Enforcing these boundaries prevents domain logic leakage and maintains strict separation of concerns.

How do I refactor a legacy codebase into domain-first layers?

Refactor a legacy codebase into domain-first layers by applying clean architecture principles during code reviews. Reorganize existing logic into entities, use cases, and adapters, establishing boundaries that isolate core domain rules from external framework dependencies.

What is the best way to make architectural decisions for partial versus full boundaries?

The best way to make architectural decisions for partial versus full boundaries is to evaluate modularity and testing needs. Use partial boundaries for simpler domain isolation or full boundaries when strict separation of concerns and independent testability are critical.

Do I need a composition-root main to enforce clean architecture?

You need a composition-root main to enforce clean architecture by centralizing dependency injection. This setup configures and wires dependencies at application startup, ensuring inner layers remain completely unaware of external frameworks and interface adapters.

When should I not use clean architecture for system design?

You should not use clean architecture for system design when a project is too small to justify domain-first layers, as enforcing strict boundaries and dependency direction rules on simple codebases introduces unnecessary overhead without meaningful modularity or testability gains.