clean-architecture

Apply Clean Architecture principles to enforce dependency direction and define layer boundaries in software systems.

4|Updated Jan 8, 2026
One-click install
npx skills add https://github.com/allthingslinux/portal --skill clean-architecture-allthingslinux
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-architecture
Source: https://github.com/allthingslinux/portal/tree/main/.cursor/skills/clean-architecture
Command: npx skills add https://github.com/allthingslinux/portal --skill clean-architecture-allthingslinux

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams and developers apply Clean Architecture principles to improve maintainability, testability, and scalability of software systems by enforcing clear separation of concerns and boundaries.

Core Features & Use Cases

  • Clear boundaries between entities, use cases, interfaces, and infrastructure to reduce coupling.
  • Guidance for dependency direction to prevent cyclic or inward-only dependencies.
  • Use-case driven design to keep business rules at the center and infrastructure on the edges.
  • Reference patterns and decision criteria for reorganizing legacy code toward a cleaner architecture.

Quick Start

Apply the guidelines to a provided project scenario: identify layers, define boundaries, and map dependencies to align with Clean Architecture.

Frequently Asked Questions about clean-architecture

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

FAQPage Schema
How do I enforce clean architecture boundaries when refactoring a legacy system?

Enforce clean architecture boundaries during refactoring by identifying entities, use cases, and interface adapters, then mapping dependencies to align with the correct dependency direction. This reduces coupling and keeps infrastructure on the outer edges.

What is clean architecture and when do I need it for my software design?

Clean architecture is a design approach that separates software into entities, use cases, interface adapters, and infrastructure layers. You need it when messy code structure reduces maintainability, testability, and scalability, requiring clear separation of concerns.

How do I fix cyclic dependencies and incorrect dependency direction in my code structure?

Fix cyclic dependencies and incorrect dependency direction by reorganizing layers to ensure dependencies point inward toward use cases and entities. Applying clean architecture principles prevents inward-only dependencies and keeps business rules decoupled from infrastructure.

Can I use clean architecture principles for system redesign and architecture reviews?

Clean architecture principles are applicable during architecture reviews and system redesign. They provide decision criteria and reference patterns to evaluate layer boundaries, enforce use-case driven design, and reorganize legacy code toward a cleaner structure.

What's the best way to start applying layered design to an existing project?

Start applying layered design by identifying current layers, defining boundaries between entities and infrastructure, and mapping existing dependencies. Align these dependencies with clean architecture guidelines to achieve a use-case driven structure.

Why does my code structure suffer from high coupling and low testability?

Code structure suffers from high coupling and low testability when layer boundaries are unclear and dependencies point inward. Without clean architecture principles, business rules become entangled with infrastructure, reducing overall system maintainability.