Proactively apply when designing APIs, microservices, or scalable backend structure. Triggers on DDD, Clean Architecture, Hexagonal, ports and adapters, entities, value objects, domain events, CQRS, event sourcing, repository pattern, use cases, onion architecture, outbox pattern, aggregate root, anti-corruption layer. Use when working with domain models, aggregates, repositories, or bounded contexts. Clean Architecture + DDD + Hexagonal patterns for backend services, language-agnostic (Go, Rust
Detected risks:
The `clean-ddd-hexagonal` skill is designed to guide backend developers in structuring APIs, microservices, and scalable backend systems using a combination of Domain-Driven Design (DDD), Clean Architecture, and Hexagonal Architecture principles. It addresses the complexity of modeling intricate business domains while maintaining testable, maintainable, and infrastructure-agnostic code. By synthesizing these architectural approaches, the skill helps teams enforce clear boundaries between the domain logic, application services, and infrastructure, ensuring that dependencies always point inward and domain models remain at the center of the system.
Use this skill for complex, long-lived systems with multiple entry points and significant business rules, especially when teams need to maintain high test coverage and swap out infrastructure components. Avoid it for simple CRUD applications, prototypes, or very small teams.
The skill is language-agnostic and can be applied to Go, Rust, Python, TypeScript, Java, and C# backends.
No. CQRS and Event Sourcing are only recommended when read/write models or event histories are divergent or necessary. Most systems do not require full implementation of these patterns.
Follow the inward dependency rule: outer layers (infrastructure) depend on inner layers (application and domain), never the reverse. The domain layer should never depend on infrastructure or application services.
It's generally not necessary for single-entry systems or small projects. The skill is optimized for systems with multiple interfaces and evolving complexity.
Quick Setup:
.claude/skills/Repository
ccheney/robust-skills