clean-architecture

Enforce the Dependency Rule across Presentation, Application, Domain, and Persistence layers.

1|Updated Jul 21, 2025
One-click install
npx skills add https://github.com/dpalfery/motorcycle-rag-system --skill clean-architecture-dpalfery
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-architecture
Source: https://github.com/dpalfery/motorcycle-rag-system/tree/main/.claude/skills/clean-architecture
Command: npx skills add https://github.com/dpalfery/motorcycle-rag-system --skill clean-architecture-dpalfery

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Skill provides a disciplined blueprint for organizing software projects to maintain the Dependency Rule and separation of concerns.

Core Features & Use Cases

  • Clear layer boundaries and dependency direction guidance (Presentation → Application → Domain ← Persistence).
  • Rules for allowed/forbidden dependencies, code structure, and testing practices to improve maintainability and testability.
  • Use Case: When starting a new project, follow these conventions to ensure scalable, framework-agnostic architecture.

Quick Start

Organize a new project into Presentation, Application, Domain, and Persistence layers and apply the described dependency rules to ensure a maintainable 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 the Dependency Rule across layered software architecture?

Separate code into Presentation, Application, Domain, and Persistence layers. Coordinate use cases with interfaces and ensure outer layers depend on abstractions, keeping the Domain layer pure and framework-independent to maintain clear boundaries.

What is clean architecture and how does it keep my codebase maintainable?

Clean architecture organizes software into Presentation, Application, Domain, and Persistence layers, enforcing strict dependency direction. This framework independence ensures maintainable code by isolating business rules from external concerns and improving testability.

How do I structure a new project to ensure framework independence and testability?

Structure new projects into Presentation, Application, Domain, and Persistence layers. Apply explicit dependency rules where outer layers depend on abstractions, ensuring domain purity and framework independence for scalable, testable architecture from the start.

Can I apply domain-driven design boundaries to an existing codebase?

Yes, apply layer boundaries by enforcing dependency direction rules and coordinating use cases with interfaces. Refactor outer layers to depend on abstractions, ensuring domain purity and framework independence across your existing Presentation, Application, Domain, and Persistence structures.

Why should outer layers depend on abstractions in layered architecture?

Outer layers depend on abstractions to enforce the Dependency Rule and maintain separation of concerns. This prevents framework coupling, preserves domain purity, and ensures your codebase remains testable and maintainable across all architectural boundaries.

When should I not use clean architecture for my software project?

Avoid clean architecture when strict layer boundaries and dependency rules introduce unnecessary overhead for small projects. If framework independence and domain purity are not critical, the added abstraction of coordinating use cases with interfaces may reduce development speed.