clean-architecture

Structure software around the Dependency Rule and concentric circles.

Updated Apr 18, 2026
One-click install
npx skills add https://github.com/sachio222/based-stack --skill clean-architecture-sachio222
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-architecture
Source: https://github.com/sachio222/based-stack/tree/main/clean-architecture
Command: npx skills add https://github.com/sachio222/based-stack --skill clean-architecture-sachio222

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Clean Architecture helps software teams structure code so business rules remain independent of frameworks, databases, and delivery mechanisms, enabling easier testing, maintenance, and long-term evolution.

Core Features & Use Cases

  • Dependency Rule and concentric circles: organize code so inner policies never depend on outer details.
  • Boundary anatomy and DIP: define clear boundaries with input/output ports and plugin-style wiring.
  • SOLID alignment across layers: ensure stable core and flexible adapters to support change.
  • Use cases include guiding module boundaries, architecture reviews, and domain modeling discussions.

Quick Start

Map your system into concentric circles (Entities, Use Cases, Adapters, Frameworks) and wire dependencies from the outside in.

Frequently Asked Questions about clean-architecture

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

FAQPage Schema
What is the Dependency Rule in clean architecture and how does it organize code?

The Dependency Rule organizes code into concentric circles where inner business policies never depend on outer details. This structure keeps business rules independent of frameworks, enabling easier testing, maintenance, and long-term evolution.

How do I structure software using ports and adapters with hexagonal architecture?

To structure software with ports and adapters, define clear boundaries with input and output ports. Wire dependencies plugin-style from the outside in, using a composition root at startup to inject adapters into the core use cases.

How do I map a system into concentric circles for clean architecture?

Map your system by grouping code into concentric circles: Entities, Use Cases, Adapters, and Frameworks. Ensure inner-circle business rules remain independent, and wire dependencies from the outside in at the composition root.

Does clean architecture work with SOLID principles across architectural layers?

Yes, clean architecture aligns with SOLID principles across layers to ensure a stable core and flexible adapters. This alignment supports change by keeping business rules independent of outer delivery mechanisms and frameworks.

When should I use clean architecture for module boundaries and domain modeling?

Use clean architecture during architecture reviews, domain modeling discussions, and when guiding module boundaries. It is applicable when you need business rules to remain independent of databases, frameworks, and delivery mechanisms.

What are the limitations of using clean architecture and concentric circles?

Clean architecture requires strict adherence to the Dependency Rule and introduces boundaries that can add initial structural overhead. It is less suitable for small scripts where the overhead of separating adapters and use cases outweighs maintainability benefits.