clean-architecture

Guide software architects in implementing Clean Architecture and related patterns.

Updated May 11, 2026
One-click install
npx skills add https://github.com/LeonardoDiasRR/dev-harness --skill clean-architecture-leonardodiasrr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-architecture
Source: https://github.com/LeonardoDiasRR/dev-harness/tree/main/skills/clean-architecture
Command: npx skills add https://github.com/LeonardoDiasRR/dev-harness --skill clean-architecture-leonardodiasrr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenge of designing maintainable, scalable, and robust software architectures. It helps developers implement best practices and patterns such as Clean Architecture, Hexagonal, and Onion architectures.

Core Features & Use Cases

  • Understanding Clean Architecture: Provides an in-depth guide to Clean Architecture principles, including its four layers, the Dependency Rule, and the importance of separating policy from implementation.
  • Architecture Patterns: Covers various architectural patterns such as Hexagonal and Onion, their differences, and how they can be applied.
  • Dependency Injection: Explains different approaches to dependency injection, including constructor injection, factory pattern, and DI containers.
  • Testability: Discusses the testability of software designed using Clean Architecture and how to create a test pyramid for different layers.
  • Use Case: Helps developers design a system by following the principles outlined, resulting in a codebase that is easier to maintain and scale.

Quick Start

To begin learning Clean Architecture, read the provided documentation and apply the principles to your current project.

Frequently Asked Questions about clean-architecture

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

FAQPage Schema
What is Clean Architecture and how does its Dependency Rule work?

Clean Architecture is a software design pattern that separates concerns into four layers, using the Dependency Rule to ensure dependencies point inward toward policy, increasing maintainability and testability. It isolates business logic from external frameworks.

How do Hexagonal and Onion architectures compare to Clean Architecture?

Hexagonal and Onion architectures are related architectural patterns that also separate policy from implementation by isolating business logic. They differ in structural approach but share the same goal of increasing maintainability and testability.

How do I implement dependency injection in a Clean Architecture project?

Implement dependency injection in Clean Architecture using constructor injection, the factory pattern, or DI containers. This approach ensures dependencies point inward, keeping external frameworks isolated from core business policies.

Do I need to know SOLID principles to apply Clean Architecture?

Yes, applying Clean Architecture requires prior knowledge of software design principles, especially SOLID principles and the Dependency Rule. This foundational knowledge is necessary to properly separate concerns and structure the four layers.

How does Clean Architecture improve software testability across different layers?

Clean Architecture improves software testability by separating policy from implementation, allowing you to create a test pyramid that targets different layers independently. This isolation ensures business rules are testable without external framework dependencies.