clean-architecture
Clean Architecture principles and best practices from Robert C. Martin's book. This skill should be used when designing software systems, reviewing code structure, or refactoring applications to achieve better separation of concerns. Triggers on tasks involving layers, boundaries, dependency direction, entities, use cases, or system architecture.
Security Assessment
Detected risks:
About clean-architecture
The clean-architecture skill is a comprehensive guide to Robert C. Martin's Clean Architecture principles for designing maintainable, testable software. It distills the book into 42 rules across eight categories, prioritized by architectural impact, and is meant for designing systems, reviewing code structure, or refactoring toward better separation of concerns.
Its rule categories, in priority order, are dependency direction and entity design (critical), use case isolation and component cohesion (high), boundary definition (medium-high), interface adapters and framework isolation (medium), and testing architecture. Each rule has a prefixed identifier (such as dep-, entity-, or usecase-) and a dedicated reference file with detailed explanation and code examples, covering concepts like inward-only dependencies, persistence-ignorant entities, input and output ports, screaming architecture, humble objects, and a framework-free domain layer.
It is most useful for engineers and architects who want a structured, prioritized checklist of Clean Architecture rules to apply when designing modules, defining layer boundaries, or auditing code for architectural violations.
FAQ
What is this skill based on?
Robert C. Martin's book Clean Architecture, distilled into 42 rules across eight categories prioritized by architectural impact.
When should I use it?
When designing software systems or modules, structuring dependencies between layers, defining business and infrastructure boundaries, or reviewing and refactoring for architectural violations.
What are the rule categories?
Dependency direction, entity design, use case isolation, component cohesion, boundary definition, interface adapters, framework isolation, and testing architecture.
How is the guidance organized?
Each rule has a prefixed identifier and a dedicated reference file with a detailed explanation and code examples.
Which rules are most critical?
Dependency direction and entity design, for example keeping source dependencies pointing inward and keeping entities unaware of how they are persisted.
All Files
46 filesInstall clean-architecture
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
pproenca/dot-skills