clean-architecture

Guide software projects with Clean Architecture dependency and layering principles.

Updated Jun 24, 2026
One-click install
npx skills add https://github.com/renatoxm/leanagentkit --skill clean-architecture-renatoxm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-architecture
Source: https://github.com/renatoxm/leanagentkit/tree/main/template/.agent/skills/references/clean-architecture
Command: npx skills add https://github.com/renatoxm/leanagentkit --skill clean-architecture-renatoxm

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps developers design and enforce the Clean Architecture principles in their software projects, ensuring maintainability and scalability over time.

Core Features & Use Cases

  • Dependency Rule Enforcement: Ensures that all dependencies point inward, separating business logic from infrastructure details.

  • Layered Architecture: Guides the organization of code into distinct layers: Entities, Use Cases, Interface Adapters, and Frameworks.

  • Boundary Identification: Helps define and enforce boundaries between the inner and outer layers of the architecture.

  • Use Case Orchestration: Explains how Use Cases coordinate with Entities and Interface Adapters to perform business operations.

  • Entity Encapsulation: Outlines the principles for designing Entities that encapsulate business rules and are framework-independent.

  • Interface Adapters and Frameworks: Discusses the role of Interface Adapters in translating data between Use Cases and external systems, and how Frameworks are treated as details.

  • Component Principles: Covers the principles of cohesion and coupling to organize and relate components within and between layers.

  • Dependency Rule: Explains the concentric circles model and the importance of dependencies pointing inward.

  • Boundary Anatomy: Describes the components involved in each boundary and the flow of data across boundaries.

Quick Start

Use the clean-architecture skill to learn about Clean Architecture principles and their application in software design.

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 organizes software into concentric layers where the dependency rule mandates that all dependencies point inward, ensuring inner business logic remains independent of outer infrastructure details.

How do I structure code into entities, use cases, and interface adapters?

Structure code by encapsulating business rules in framework-independent entities, orchestrating operations in use cases, and translating data between layers using interface adapters to maintain strict separation.

Do I need prior knowledge of software design patterns to use clean architecture?

Yes, implementing clean architecture requires existing knowledge of software architecture and design patterns to understand layering, component principles, and boundary identification effectively.

What is the best way to enforce boundaries between software architecture layers?

The best way to enforce boundaries is by applying component principles of cohesion and coupling to organize related elements, ensuring dependencies strictly point inward across the concentric circles.

How do interface adapters translate data between use cases and external systems?

Interface adapters translate data by acting as boundary components that convert data formats between inner use cases and outer frameworks, ensuring inner layers remain unaffected by external system changes.

When should I not use a layered architecture for my software project?

A layered architecture may not suit projects where strict maintainability and scalability are unnecessary, as it introduces boundary enforcement and component principles overhead that adds complexity to simple systems.