
from ai-tools24
Guidance on where to place repository interfaces in Clean Architecture — recommends defining repository interfaces in the use-case layer to avoid domain couplin
This skill provides concrete guidance and review checks for placing repository interfaces within a layered architecture. It argues for defining repository interfaces in the use-case (application) layer rather than the domain layer to prevent accidental coupling, enforce ID-based references between aggregates, and keep domain models focused on business rules. The content includes detection patterns and recommended project layouts.
Invoke this skill when reviewing code or repos for architecture hygiene, when deciding where to define repository interfaces, or when preparing a PR that touches persistence/adapter boundaries. It's useful during design reviews, refactors, and code audits focused on DDD and clean architecture.
Best used with developer-focused agents and tooling that can read code structure and produce architecture review notes (codex-cli, claude-code, cursor, gemini-cli).
This skill has not been reviewed by our automated audit pipeline yet.