clean-architecture
Structure software around the Dependency Rule: source code dependencies point inward from frameworks to use cases to entities. Use when the user mentions "architecture layers", "dependency rule", "ports and adapters", "hexagonal architecture", "use case boundary", "onion architecture", "screaming architecture", or "framework independence". Also trigger when decoupling business logic from databases or frameworks, defining module boundaries, or debating where to put business rules. Covers componen
Security Assessment
Detected risks:
About clean-architecture
The clean-architecture skill provides guidance for designing software systems around the Dependency Rule, ensuring that source code dependencies always point inward toward business rules and higher-level policies. Its primary purpose is to help teams separate core business logic from frameworks, databases, user interfaces, and other implementation details. By establishing clear architectural boundaries, the skill supports the creation of systems that are easier to test, maintain, and evolve over time. It emphasizes that business rules are the most important part of a system, while technologies such as databases, web frameworks, and delivery mechanisms are replaceable details.
The skill focuses on Clean Architecture principles, including the Dependency Rule, concentric architectural circles, boundary management, dependency inversion, framework independence, and component organization. It explains how entities, use cases, interface adapters, and frameworks should interact while maintaining proper dependency direction. The skill also provides an architectural scoring approach, rating designs on a scale from 0 to 10 based on adherence to these principles and identifying improvements needed to achieve full alignment. It covers concepts such as ports and adapters, hexagonal architecture, onion architecture, use case boundaries, data transfer across layers, and SOLID-oriented architectural thinking.
This skill is useful for software architects, technical leads, developers, and engineering teams who are designing new systems or reviewing existing architectures. Common use cases include defining module boundaries, decoupling business logic from databases or frameworks, evaluating dependency management strategies, reviewing layer responsibilities, and discussing framework independence. It is particularly valuable when teams want to improve maintainability, testability, and long-term adaptability of software systems.
FAQ
When should I use the clean-architecture skill?
Use it when designing or reviewing software architecture, defining layers and boundaries, applying the Dependency Rule, or separating business rules from frameworks and infrastructure concerns.
Does this skill support ports and adapters, hexagonal architecture, or onion architecture?
Yes. The skill explicitly covers concepts such as ports and adapters, hexagonal architecture, onion architecture, use case boundaries, and framework independence.
Can this skill help evaluate an existing architecture?
Yes. It includes a scoring approach that rates architecture from 0 to 10 based on adherence to Clean Architecture principles and identifies improvements needed to reach full alignment.
Is this skill tied to a specific programming language or framework?
No. The principles focus on dependency direction, boundaries, and business-rule independence rather than any specific language, framework, or database technology.
What are the main limitations or requirements?
The guidance requires maintaining inward-pointing source code dependencies and keeping inner layers independent from outer implementation details. Architectural decisions should respect the Dependency Rule and boundary separation principles.
Install clean-architecture
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
wondelai/skills