Provides implementation patterns for Clean Architecture, Hexagonal Architecture (Ports & Adapters), and Domain-Driven Design in Java 21+ Spring Boot 3.5+ applications.
SkillScore100Maintained
Automatic
◆Coding pack
Last verified 8/21/2026
What it changes
Passed 22 of 22 test cases with the skill, and 21 of 22 without it.
Without skill95%
With skill100%
Checks it passed that the model alone missed
The folder layout must include distinct top-level directories for domain, application, adapters or infrastructure.
1 fixed21 passed either way0 still failing0 broke
Pass-rate lift
+5 pp
Tokens
+50%
Agent turns
0%
Response time
-33%
Model gemini-3.6-flashMeasured 8/21/2026v422 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
A test case the skill fixed. Same model, same prompt, with and without the skill.
Prompt
Show the recommended top-level folder layout under `src/` for a NestJS project following Clean Architecture and Hexagonal patterns.
What was checked, without and with the skill
Checked
Without skill
With skill
The folder layout must include distinct top-level directories for domain, application, adapters or infrastructure.
Missed
Passed
case-16 · gemini-3.6-flash · 8/21/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md174 lines6 files
Clean Architecture, DDD & Hexagonal Architecture for NestJS
Overview
This skill provides comprehensive guidance for implementing Clean Architecture, Domain-Driven Design (DDD), and Hexagonal Architecture patterns in NestJS/TypeScript applications. It covers the architectural layers, tactical patterns, and practical implementation examples for building maintainable, testable, and loosely-coupled backend systems.
When to Use
Architecting complex NestJS applications with long-term maintainability
Refactoring from tightly-coupled MVC to layered architecture
Implementing rich domain models with business logic encapsulation
Designing testable systems with swappable infrastructure
Creating microservices with clear bounded contexts
Separating business rules from framework code
Implementing event-driven architectures with domain events
Instructions
1. Understand the Architectural Layers
Clean Architecture organizes code into concentric layers where dependencies flow inward. Inner layers have no knowledge of outer layers: