architecture-patterns

Apply Clean Architecture, Hexagonal Architecture, and Domain-Driven Design to backend systems.

5|Updated Aug 23, 2025
One-click install
npx skills add https://github.com/camoneart/claude-code --skill architecture-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: architecture-patterns
Source: https://github.com/camoneart/claude-code/tree/main/skills/architecture-patterns
Command: npx skills add https://github.com/camoneart/claude-code --skill architecture-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) and references (resource) components.

What problem does it solve?

Designing maintainable, testable, and scalable backend systems is a complex challenge. This Skill provides a deep dive into proven architectural patterns like Clean Architecture, Hexagonal Architecture, and Domain-Driven Design, helping you build resilient applications.

Core Features & Use Cases

  • Clean Architecture: Guides on structuring layers (Entities, Use Cases, Adapters, Frameworks) with inward-pointing dependencies.
  • Hexagonal Architecture: Explains Ports and Adapters for technology-agnostic core logic and easy testability.
  • Domain-Driven Design (DDD): Covers strategic (Bounded Contexts) and tactical (Entities, Value Objects, Aggregates, Repositories) patterns.
  • Use Case: When starting a new complex backend system, this Skill helps you choose and implement an architecture that ensures business logic is independent of frameworks, making the system highly testable and adaptable.

Quick Start

Example: Structure a Clean Architecture project

This outlines the recommended directory structure for a Clean Architecture application.

app/ ├── domain/ # Entities & business rules ├── use_cases/ # Application business rules ├── adapters/ # Interface implementations └── infrastructure/ # Framework & external concerns

Frequently Asked Questions about architecture-patterns

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

FAQPage Schema
How do I structure a backend application using Clean Architecture?

Clean Architecture organizes code into four layers—Entities (business rules), Use Cases (application logic), Adapters (interfaces), and Frameworks (external tools)—with dependencies pointing inward. This keeps business logic independent of frameworks and makes testing straightforward without requiring UI or external services.

What's the difference between Clean Architecture and Hexagonal Architecture?

Hexagonal Architecture emphasizes Ports (interfaces) and Adapters (implementations) to isolate core domain logic from technology choices, enabling framework-agnostic systems. Clean Architecture achieves similar goals through layered separation. Both enforce inward dependencies and testability; Hexagonal is more explicit about external boundaries.

When should I use Domain-Driven Design for backend development?

Domain-Driven Design suits complex systems where business logic must stay independent of technical implementation. Use it when building new backends, refactoring monoliths, or migrating to loosely coupled designs. DDD covers Bounded Contexts, Entities, Value Objects, and Aggregates to establish a clear domain-first structure.

How do I refactor a monolith into a maintainable architecture?

Refactoring applies Clean Architecture, Hexagonal Architecture, or Domain-Driven Design principles to establish clear boundaries, enforce inward dependencies, and separate domain logic from infrastructure. This process supports migration to loosely coupled designs and prepares systems for microservices decomposition.

Can I apply these architecture patterns to microservices?

Yes. These patterns guide microservices decomposition by establishing architecture standards and clear domain-first structures within each service. They enforce framework independence and testability, making services resilient and independently deployable.

Do these patterns work with any backend framework?

Yes. Clean Architecture, Hexagonal Architecture, and Domain-Driven Design are framework-agnostic by design. They isolate business logic from framework specifics, allowing you to swap technologies without rewriting core domain rules.