clean-architecture-ddd

Structure backend software into four-layer clean architecture with domain-driven design.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/DaichiHoshina/ai-tools --skill clean-architecture-ddd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-architecture-ddd
Source: https://github.com/DaichiHoshina/ai-tools/tree/main/claude-code/skills/clean-architecture-ddd
Command: npx skills add https://github.com/DaichiHoshina/ai-tools --skill clean-architecture-ddd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Business logic often becomes tangled as systems grow, making maintenance and scalability hard. Clean architecture and DDD provide a clear separation of concerns to keep codebases robust.

Core Features & Use Cases

  • Layered architecture with Domain, Application, Interface, and Infrastructure boundaries to control dependencies.
  • DDD tactics including Entity, Value Object, Aggregate, Repository, and UseCase patterns to model complex domains.
  • Guidelines for refactoring and new projects to improve testability, maintainability, and scalability in backend systems.

Quick Start

Set up the project structure following clean-architecture-ddd guidelines and start organizing code into domain, application, and infrastructure layers.

Frequently Asked Questions about clean-architecture-ddd

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

FAQPage Schema
How do I structure a backend project using clean architecture and domain-driven design?

Structure your backend project using clean architecture and DDD by organizing code into four layers: Domain, Application, Interface, and Infrastructure. This enforces strict dependency direction and defined use-case boundaries to ensure testability and maintainability.

What is the best way to model complex domains using DDD tactics?

The best way to model complex domains using DDD is applying Entity, Value Object, Aggregate, Repository, and UseCase patterns. These tactics isolate business logic within the Domain layer, keeping it robust and independent from infrastructure concerns.

Can I use clean architecture to refactor an existing backend system with tangled business logic?

Yes, you can use clean architecture to refactor existing backend systems with tangled business logic. It provides guidelines for refactoring by establishing layered boundaries, controlling dependency direction, and implementing repository patterns to improve scalability.

When do I need repository patterns and dependency inversion in architecture design?

You need repository patterns and dependency inversion in architecture design when separating domain logic from infrastructure. This approach enforces dependency direction across the Domain, Application, Interface, and Infrastructure layers to achieve high testability and maintainability.

Does clean architecture with DDD work for both new projects and large-scale refactors?

Clean architecture with DDD works for both new projects and large-scale refactors across backend domains. It solves the problem of tangled business logic as systems grow by providing a clear separation of concerns through a four-layer stack.