What problem does it solve?
Vibe-driven refactors in ASP.NET Core projects often blur responsibilities across controllers, persistence, and application logic, making changes risky and hard to test.
This Skill helps your coding agent impose a Clean Architecture separation that keeps dependencies flowing inward and preserves behavior while moving toward a maintainable structure.
Core Features & Use Cases
- Layered Clean Architecture: Establish Domain, Application, Infrastructure, and API layers as distinct projects with a strict dependency rule (Domain has zero framework dependencies).
- MediatR-based use cases: Implement write/read operations as Commands/Queries with Handlers and co-located validation.
- Thin controllers: Convert HTTP requests into MediatR sends and return DTOs/results without direct EF Core or business logic.
- Data access isolation: Keep EF Core DbContext, repository implementations, and entity configurations within Infrastructure, exposed via Domain interfaces.
Use case: you inherit an ASP.NET Core 8+ codebase where controllers directly call DbContext and business logic is scattered, and you need a phased refactor plan that moves toward a testable CQRS + Clean Architecture layout.
Quick Start
Tell your agent: "Using this repository, map the current ASP.NET Core structure to a Clean Architecture (Domain/Application/Infrastructure/API) with MediatR Commands/Queries, then propose and implement a phased refactor plan that keeps controllers thin and moves EF Core code into Infrastructure."