Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design.
SkillScore100Maintained
Automatic
◆Coding pack
Last verified 8/7/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
Prohibits database ORM annotations on pure domain entities.
Requires separate ORM database models mapped to domain entities inside the repository.
1 fixed21 passed either way0 still failing0 broke
Pass-rate lift
+5 pp
Tokens
+62%
Agent turns
0%
Response time
-28%
Model gemini-3.6-flashMeasured 8/7/2026v122 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
A developer wants to add SQLAlchemy Column definitions directly onto core User domain entities to avoid writing duplicate class definitions. Is this recommended, and how should database mapping be structured?
What was checked, without and with the skill
Checked
Without skill
With skill
Prohibits database ORM annotations on pure domain entities.
Missed
Passed
Requires separate ORM database models mapped to domain entities inside the repository.
Missed
Passed
case-06 · gemini-3.6-flash · 8/7/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md159 lines3 files
Architecture Patterns
Master proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design to build maintainable, testable, and scalable systems.
Given: a service boundary or module to architect.
Produces: layered structure with clear dependency rules, interface definitions, and test boundaries.
When to Use This Skill
Designing new backend services or microservices from scratch
Refactoring monolithic applications where business logic is entangled with ORM models or HTTP concerns
Establishing bounded contexts before splitting a system into services
Debugging dependency cycles where infrastructure code bleeds into the domain layer
Creating testable codebases where use-case tests do not require a running database
Implementing domain-driven design tactical patterns (aggregates, value objects, domain events)
Core Concepts
1. Clean Architecture (Uncle Bob)
Layers (dependency flows inward):
Entities: Core business models, no framework imports
Use Cases: Application business rules, orchestrate entities
Interface Adapters: Controllers, presenters, gateways — translate between use cases and external formats
Frameworks & Drivers: UI, database, external services — all at the outermost ring
Key Principles:
Dependencies point inward only; inner layers know nothing about outer layers
Business logic is independent of frameworks, databases, and delivery mechanisms
Every layer boundary is crossed via an abstract interface
Testable without UI, database, or external services
2. Hexagonal Architecture (Ports and Adapters)
Components:
Domain Core: Business logic lives here, framework-free
Ports: Abstract interfaces that define how the core interacts with the outside world (driving and driven)