clean-ddd-hexagonal

Designs backend systems using Clean Architecture, DDD, and Hexagonal patterns.

Updated Feb 4, 2026
One-click install
npx skills add https://github.com/esimplicityinc/water-demo --skill clean-ddd-hexagonal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-ddd-hexagonal
Source: https://github.com/esimplicityinc/water-demo/tree/main/.opencode/skills/clean-ddd-hexagonal
Command: npx skills add https://github.com/esimplicityinc/water-demo --skill clean-ddd-hexagonal

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a structured approach to building backend systems using Clean Architecture, Domain-Driven Design, and Hexagonal patterns. It helps teams design scalable, testable software by clarifying domain boundaries, aggregates, ports, and adapters.

Core Features & Use Cases

  • Guidance on layering: Domain, Application, Infrastructure, with clear responsibilities.
  • DDD tactical patterns: Entities, Value Objects, Aggregates, Domain Events, Repositories, and Services.
  • Hexagonal architecture: Ports and Adapters to isolate the core from infrastructure.
  • Use case scaffolding: Examples for placing orders, querying state, and integrating with external systems.
  • Language-agnostic: Applies across Go, Rust, Python, TypeScript, Java, C#.

Quick Start

Start by creating a minimal 3-layer skeleton (domain, application, infrastructure). Define a small domain model (e.g., Order with items and total), implement a repository interface in domain, a use-case in application, and a simple adapter in infrastructure. Then run lightweight tests to verify boundary rules and event flow.

Frequently Asked Questions about clean-ddd-hexagonal

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 DDD patterns?

Structure your backend into domain, application, and infrastructure layers with clear responsibilities, applying DDD tactical patterns like aggregates, entities, and repositories to separate business rules from technical concerns.

Can I apply clean architecture and hexagonal patterns across different programming languages?

Implement CQRS and event sourcing by separating command and query use cases in the application layer, persisting state changes as domain events to reconstruct aggregates and enable scalable read models.

When should I not use hexagonal architecture for my backend service?

Yes, clean architecture and hexagonal patterns are language-agnostic, applying consistently across Go, Rust, Python, TypeScript, Java, and C# to enforce domain boundaries and infrastructure isolation.

What's the best way to scaffold a use case like placing an order using DDD and hexagonal patterns?

Avoid hexagonal architecture for simple CRUD services or prototypes where the overhead of defining ports, adapters, and multiple layers outweighs the benefit of strict domain isolation.

What's the best way to scaffold a use case like placing an order using DDD and hexagonal patterns?

Start by defining a minimal domain model with aggregates and repository interfaces, implement an order placement use case in the application layer, and connect infrastructure adapters to verify boundary rules and event flow.