42 Clean Architecture rules organized by priority for designing maintainable, testable software systems.
Works with
Covers 8 rule categories from dependency direction and entity design (critical) through testing architecture (low-medium), each with specific guidance and code examples
Dependency rules enforce inward-pointing dependencies, interface ownership, and acyclic component graphs to prevent architectural decay
Entity and use case rules isolate business logic from frameworks, persistence,
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionclean-architectureExecute the skills CLI command in your project's root directory to begin installation:
Fetches clean-architecture from pproenca/dot-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate clean-architecture. Access via /clean-architecture in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
1
total installs
1
this week
95
GitHub stars
0
upvotes
Run in your terminal
1
installs
1
this week
95
stars
Comprehensive guide to Clean Architecture principles for designing maintainable, testable software systems. Based on Robert C. Martin's "Clean Architecture: A Craftsman's Guide to Software Structure and Design." Contains 42 rules across 8 categories, prioritized by architectural impact.
Reference these guidelines when:
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Dependency Direction | CRITICAL | dep- |
| 2 | Entity Design | CRITICAL | entity- |
| 3 | Use Case Isolation | HIGH | usecase- |
| 4 | Component Cohesion | HIGH | comp- |
| 5 | Boundary Definition | MEDIUM-HIGH | bound- |
| 6 | Interface Adapters | MEDIUM | adapt- |
| 7 | Framework Isolation | MEDIUM | frame- |
| 8 | Testing Architecture | LOW-MEDIUM | test- |
dep-inward-only - Source dependencies point inward onlydep-interface-ownership - Interfaces belong to clients not implementersdep-no-framework-imports - Avoid framework imports in inner layersdep-data-crossing-boundaries - Use simple data structures across boundariesdep-acyclic-dependencies - Eliminate cyclic dependencies between componentsdep-stable-abstractions - Depend on stable abstractions not volatile concretionsentity-pure-business-rules - Entities contain only enterprise business rulesentity-no-persistence-awareness - Entities must not know how they are persistedentity-encapsulate-invariants - Encapsulate business invariants within entitiesentity-value-objects - Use value objects for domain conceptsentity-rich-not-anemic - Build rich domain models not anemic data structuresusecase-single-responsibility - Each use case has one reason to changeusecase-input-output-ports - Define input and output ports for use casesusecase-orchestrates-not-implements - Use cases orchestrate entities not implement business rulesusecase-no-presentation-logic - Use cases must not contain presentation logicusecase-explicit-dependencies - Declare all dependencies explicitly in constructorusecase-transaction-boundary - Use case defines the transaction boundarycomp-screaming-architecture - Structure should scream the domain not the frameworkcomp-common-closure - Group classes that change togethercomp-common-reuse - Avoid forcing clients to depend on unused codecomp-reuse-release-equivalence - Release components as cohesive unitscomp-stable-dependencies - Depend in the direction of stabilitybound-humble-object - Use humble objects at architectural boundariesbound-partial-boundaries - Use partial boundaries when full separation is prematurebound-boundary-cost-awareness - Weigh boundary cost against ignorance costbound-main-component - Treat main as a plugin to the applicationbound-defer-decisions - Defer framework and database decisionsbound-service-internal-architecture - Services must have internal clean architectureadapt-controller-thin - Keep controllers thinadapt-presenter-formats - Presenters format data for the viewadapt-gateway-abstraction - Gateways hide external system detailsadapt-mapper-translation - Use mappers to translate between layersadapt-anti-corruption-layer - Build anti-corruption layers for external systemsframe-domain-purity - Domain layer has zero framework dependenciesframe-orm-in-infrastructure - Keep ORM usage in infrastructure layerframe-web-in-infrastructure - Web framework concerns stay in interface layerframe-di-container-edge - Dependency injection containers live at the edgeframe-logging-abstraction - Abstract logging behind domain interfacestest-tests-are-architecture - Tests are part of the system architecturetest-testable-design - Design for testability from the starttest-layer-isolation - Test each layer in isolationtest-boundary-verification - Verify architectural boundaries with testsRead individual reference files for detailed explanations and code examples:
| File | Description |
|---|---|
| references/_sections.md | Category definitions and ordering |
| assets/templates/_template.md | Template for new rules |
| metadata.json | Version and reference information |
Make data-driven prioritization decisions faster
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Prerequisites
Time Estimate
30-60 minutes to see productivity improvements
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid when
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
pproenca/dot-skills
pproenca/dot-skills
asyrafhussin/agent-skills
mattpocock/skills
parcadei/continuous-claude-v3
cursor/plugins
clean-architecture is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
clean-architecture fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
clean-architecture fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
clean-architecture reduced setup friction for our internal harness; good balance of opinion and flexibility.
clean-architecture fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
Registry listing for clean-architecture matched our evaluation — installs cleanly and behaves as described in the markdown.
Keeps context tight: clean-architecture is the kind of skill you can hand to a new teammate without a long onboarding doc.
clean-architecture has been reliable in day-to-day use. Documentation quality is above average for community skills.
clean-architecture fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
clean-architecture has been reliable in day-to-day use. Documentation quality is above average for community skills.
showing 1-10 of 65