/ddd-skills:ddd-architecture-selectorfrom ddd-skills
Helps select among 5 DDD architectures (Layered, Onion, Hexagonal, Clean, COLA) based on project context, team size, and domain classification. Also recommends CQRS level and microservice splitting.
Ships in ddd-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Architecture selection decision guide that evaluates 5 DDD architecture patterns (Layered, Onion, Hexagonal, Clean, COLA) against project context — team size, business complexity, tech stack, infrastructure change frequency, and ecosystem preference.
| ✅ Use When | ❌ Skip When |
|---|---|
| Starting a new project: need architecture decision | Architecture already decided → go directly to that skill |
| Comparing multiple DDD architectures | Just need DDD learning → use ddd-architecture-awesome |
| Team unsure which approach fits best | Need architecture evaluation of existing project → use ddd-architecture-evaluator |
| Planning microservice splitting strategy | Need domain modeling after selection → use ddd-domain-designer |
| Evaluating CQRS necessity | Non-DDD project evaluation (consider standard MVC) |
| Chinese enterprise team making tech decisions | Simple CRUD with no DDD needed → use standard MVC |
| Team size / DDD maturity unknown | Need code review of existing DDD code → use ddd-code-reviewer |
| Category | Description | Alternative |
|---|---|---|
| ✅ Handles | New project architecture selection (5 DDD architectures) | — |
| ✅ Handles | Architecture comparison for migration decisions | — |
| ✅ Handles | CQRS / Event Sourcing necessity assessment | — |
| ✅ Handles | Domain classification (Core / Generic / Supporting) | — |
| ✅ Handles | Microservice splitting based on bounded contexts | — |
| ✅ Handles | Team size → architecture mapping | — |
| ⚠️ Requires | Basic project context: team size, business complexity, tech stack | — |
| ⚠️ Requires | Domain expert or product owner involvement for classification | — |
| ❌ Out of Scope | Architecture already decided — do not use this skill | ddd-architecture-layered / ddd-architecture-onion / ddd-architecture-hexagonal / ddd-architecture-clean / ddd-architecture-cola (Install each with: npx skills add full-stack-skills/ddd-skills --skill <name>) |
| ❌ Out of Scope | Just need DDD learning & concepts — should not use this skill | ddd-architecture-awesome (Install: npx skills add full-stack-skills/ddd-skills --skill ddd-architecture-awesome) |
| ❌ Out of Scope | Evaluate existing architecture health & quality — do not use | ddd-architecture-evaluator (Install: npx skills add full-stack-skills/ddd-skills --skill ddd-architecture-evaluator) |
| ❌ Out of Scope | Domain modeling / aggregate design after selection — not use | ddd-domain-designer (Install: npx skills add full-stack-skills/ddd-skills --skill ddd-domain-designer) |
| ❌ Out of Scope | Code review for DDD compliance — do not use this skill | ddd-code-reviewer (Install: npx skills add full-stack-skills/ddd-skills --skill ddd-code-reviewer) |
| ❌ Out of Scope | Non-DDD / standard MVC projects — not use this skill | Use standard MVC guides (not DDD skills) |
This skill is designed for: Backend developers (implementing DDD architectures), Software architects (evaluating and selecting patterns), Tech leads (reviewing team implementations), and DDD beginners (learning domain-driven design fundamentals).
| Dimension | Layered | Onion | Hexagonal | Clean | COLA |
|---|---|---|---|---|---|
| Learning Cost | ★☆☆ | ★★★ | ★★★ | ★★★ | ★★☆ |
| Business Complexity Fit | ★☆☆ | ★★★ | ★★★ | ★★★ | ★★★ |
| CRUD Efficiency | ★★★ | ★☆☆ | ★☆☆ | ★☆☆ | ★★☆ |
| Infrastructure Replaceability | ★☆☆ | ★★★ | ★★★ | ★★★ | ★★☆ |
| Test Friendliness | ★☆☆ | ★★★ | ★★★ | ★★★ | ★★★ |
| Chinese Community | ★★★ | ★☆☆ | ★☆☆ | ★☆☆ | ★★★ |
| Code Generation Support | Good | Poor | Poor | Poor | Excellent |
| Module Physical Isolation | Low | Medium | Medium | High | High |
| Evolution Path Clarity | ★☆☆ | ★★★ | ★★★ | ★★★ | ★★★ |
| Team Size Fit | 1-5 | 5-15 | 5-15 | 15-50 | 5-50 |
| Origin | Martin Fowler | Jeffrey Palermo (2008) | Alistair Cockburn (2005) | Robert C. Martin (2012) | Alibaba (2018) |
| Architecture | Best For | Avoid When |
|---|---|---|
| Layered | Simple CRUD, small teams, traditional MVC migration | Complex business rules, frequent infra changes |
| Onion | High test coverage, changing infrastructure | CRUD-heavy apps, teams with no abstraction experience |
| Hexagonal | Multi-entry systems, microservice standardization | Simple single-entry CRUD, quick prototypes |
| Clean | Large enterprise systems, strict physical isolation | Small teams (<5), rapid MVP iterations |
| COLA | Chinese Spring Boot ecosystem, engineering standards | Non-Java stacks, international teams |
Business Complexity?
│
├── Simple CRUD (80%+ CRUD operations)
│ └── Planning DDD adoption in future?
│ ├── No → LAYERED ARCHITECTURE
│ └── Yes → COLA Simplified (single module)
│
├── Moderate (core business logic with rules)
│ ├── Chinese ecosystem / Spring Boot + MyBatis? → COLA
│ ├── Value domain layer purity most? → HEXAGONAL
│ ├── Multi-entry system (REST + CLI + MQ)? → HEXAGONAL
│ ├── Infrastructure changes often? → HEXAGONAL / ONION
│ └── .NET / Python stack? → ONION
│
└── High (multiple BCs, microservices)
├── Enterprise / international team? → CLEAN ARCHITECTURE
├── Chinese enterprise, per-service standards? → COLA (multi-module)
├── Mixed tech stack per service? → HEXAGONAL per service
└── Need microservice + standard per module? → COLA + HEXAGONAL hybrid
| Team Size | Recommended Architecture | Rationale |
|---|---|---|
| 1-5 | Layered or COLA simplified | Lowest ceremony, fastest delivery |
| 5-15 | Hexagonal / Onion / COLA (single module) | Balance abstraction and productivity |
| 15-50 | Clean / COLA (multi-module) | Physical isolation, parallel team work |
| 50+ | Microservices + Hexagonal per service | Autonomous teams, independent deploy |
Evolution Path: Team grows → upgrade architecture progressively: 1-5 (Layered) → 5-15 (Hexagonal) → 15-50 (Clean/COLA) → 50+ (Microservices+Hex).
| If you have... | Then choose... | Why |
|---|---|---|
| Spring Boot + MyBatis + Chinese team | COLA | Ecosystem match, Chinese docs, scaffolding |
| Multi-entry (REST + CLI + MQ + gRPC) | Hexagonal | Adapter pattern handles multiple entry points |
| Strict module physical isolation, large enterprise | Clean | Entity → UseCase → Adapter enforced isolation |
| Infrastructure changes often (DB, MQ swap) | Hexagonal or Onion | Port/Adapter makes swapping trivial |
| Rapid prototype → evolve DDD later | Layered → upgrade | Lowest startup cost, clear evolution path |
| Complex business rules + TDD | Hexagonal | Domain layer independently testable |
| Team new to DDD, incremental adoption | Layered | Closest to traditional 3-tier, gentlest learning curve |
| Microservice internal architecture standard | Hexagonal + COLA per service | Port isolation + engineering standards |
| Read-heavy, complex queries | CQRS L2 | Read/write separation, independent optimization |
| Full audit trail needed | Event Sourcing (L3) | Event stream naturally supports audit |
| Domain Type | Investment Strategy | Architecture Recommendation | Examples |
|---|---|---|---|
| Core Domain (核心域) | Max investment, build in-house | Hexagonal / Clean / COLA with rich domain model | Order management, Payment processing, Pricing engine |
| Generic Domain (通用域) | Purchase or open-source reuse | Layered or off-the-shelf SaaS | Authentication, Authorization, Notification |
| Supporting Domain (支撑域) | Outsource or low priority | Layered or simple CRUD | Reports, Admin dashboard, Data export |
Key rule: Don't apply Hexagonal or Clean to generic/supporting domains — it wastes effort. Reserve complex architectures for Core domains only.
| Level | Description | Cost | Architecture Support | When to Use |
|---|---|---|---|---|
| L0 — None | Single model, single DB | Zero | All architectures (default) | Simple CRUD, no read/write conflict |
| L1 — Model Separation | CommandService + QueryService, shared DB | Low | All architectures | Moderate read/write disparity |
| L2 — DB Separation | Command DB + Read DB (ES/slave), sync via events | Medium | Hexagonal / Clean / COLA | High read volume, complex queries |
| L3 — Event Sourcing | Event Store + Projections, full event replay | High | Hexagonal / Clean | Audit trail, temporal queries, compliance |
Recommendation: Start at L0, prove need for higher levels. L2+ should only be adopted alongside Hexagonal or Clean architectures for proper port isolation.
| Selected | Next Skill |
|---|---|
| Layered | ddd-architecture-layered (Install: npx skills add full-stack-skills/ddd-skills --skill ddd-architecture-layered) |
| Onion | ddd-architecture-onion (Install: npx skills add full-stack-skills/ddd-skills --skill ddd-architecture-onion) |
| Hexagonal | ddd-architecture-hexagonal (Install: npx skills add full-stack-skills/ddd-skills --skill ddd-architecture-hexagonal) |
| Clean | ddd-architecture-clean (Install: npx skills add full-stack-skills/ddd-skills --skill ddd-architecture-clean) |
| COLA | ddd-architecture-cola (Install: npx skills add full-stack-skills/ddd-skills --skill ddd-architecture-cola) |
Related: ddd-cqrs-architecture / ddd-domain-designer / ddd-architecture-evaluator (each installable via npx skills add full-stack-skills/ddd-skills --skill <name>)
See references/gotchas.md for 15 pitfalls.
See references/faq.md for 15 Q&A.
This skill is pure documentation. It does not collect user data, does not access external services or networks, and contains no executable scripts.
See references/ for deep comparisons, microservice/domain, clean+DDD+hexagonal, ddd4j analysis, gotchas, FAQ, external resources, and 5 case studies.
agents/openai.yaml (opens in a new tab)examples/01-ecommerce-platform.md (opens in a new tab)examples/02-enterprise-logistics.md (opens in a new tab)examples/03-fintech-billing.md (opens in a new tab)examples/04-healthcare-payer-system.md (opens in a new tab)examples/05-saas-startup-evolution.md (opens in a new tab)references/06-clean-ddd-hexagonal-strategic.md (opens in a new tab)references/11-partme-08-microservice-models.md (opens in a new tab)references/12-partme-10-ddd-middle-platform.md (opens in a new tab)references/13-partme-19-principles.md (opens in a new tab)references/14-partme-20-distributed-qa.md (opens in a new tab)references/guides/02-cheatsheet.md (opens in a new tab)references/guides/07-comparison-matrix.md (opens in a new tab)references/guides/09-faq.md (opens in a new tab)references/guides/10-gotchas.md (opens in a new tab)references/patterns/01-architecture-deep-comparison.md (opens in a new tab)references/patterns/03-clean-ddd-hexagonal-cqrs.md (opens in a new tab)references/patterns/04-clean-ddd-hexagonal-hexagonal.md (opens in a new tab)references/patterns/05-clean-ddd-hexagonal-layers.md (opens in a new tab)references/patterns/08-ddd4j-architecture-deep-dive.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
16 skills in this plugin
/ddd-api-designerAPI design from domain model — CQRS command/query separation, REST API endpoint design, data object conversion chain (PO→DO→DTO→VO), unified response format, OpenAPI/Swagger generation, BFF pattern, API versioning, and security design. Use when user asks about API design, REST API, OpenAPI, BFF, DTO design, 接口设计, or data object conversion./ddd-architecture-awesomeProvides comprehensive guidance for Domain-Driven Design (DDD) concepts, strategic design, tactical design, and architecture patterns. Includes DDD applicability assessment, Pattern Boundaries table (what each pattern is and is NOT), Complexity Ladder (when to adopt each level), Core Concepts quick reference with Entity/ValueObject/Aggregate patterns, full architecture landscape overview, anti-patterns with fixes, multi-language reference implementations, and complete primary source references. Use when the user asks about DDD basics, needs to understand DDD concepts, evaluates DDD applicability, or wants an introduction to domain-driven design./ddd-architecture-cleanComprehensive guidance for Clean Architecture (整洁架构) — Robert C. Martin's Clean Architecture with Enterprise Business Rules, Use Cases, Interface Adapters, and Frameworks layers. Covers core entities, use case interactors, dependency rules, and full implementation steps with Java/Spring Boot examples. Use when user asks about Clean Architecture, 整洁架构, Robert Martin, Uncle Bob, use case driven architecture, or needs to implement DDD with clean architecture./ddd-architecture-colaComprehensive guidance for COLA v5 Architecture (菱形架构) — Alibaba's COLA framework with adapter/application/domain/infrastructure layers. Covers full project scaffolding, architecture validation (cola-creator + cola-validator combined), dependency rule checking with ArchUnit, CQRS integration, and multi-module Maven/Gradle project generation. Use when user asks about COLA architecture, 菱形架构, cola-creator, cola-validator, 创建 COLA 项目, or needs Alibaba DDD framework./ddd-architecture-docDDD architecture documentation generation — C4 model diagrams (Context/Container/Component/Code), ADR (Architecture Decision Records), domain model documentation, API documentation, architecture decision log, and team communication templates. Use when user asks about architecture documentation, 架构文档, ADR, C4 diagram, domain model doc, 架构决策记录, or needs to document DDD architecture for team./ddd-architecture-evaluatorDDD architecture evaluation and evolution — DDD maturity 5-level model (AdHoc/Aware/Applied/Scaled/Optimized), architecture fitness assessment (business alignment/team fit/tech fit/evolution capability), technical debt quantification with scoring, architecture evolution roadmap (4 phases), and migration risk assessment. Use when user asks about architecture evaluation, 架构评估, DDD maturity, 技术债务, architecture evolution, 架构演进, or needs to assess DDD implementation health.Generated from the plugin's indexed repository (full-stack-skills/ddd-skills) — no native marketplace selected
npx claudepluginhub p/full-statck-skills-ddd-skillsOther plugins' skills for the same job