← ClaudeAtlas

clean-architecturelisted

.NET clean architecture enforcement — layer rules, dependency direction, DI registration patterns, and project reference validation.
zdanovichnick/dotnet-pilot · ★ 3 · AI & Automation · score 76
Install: claude install-skill zdanovichnick/dotnet-pilot
# Clean Architecture for .NET Reference for architectural decisions. Used by `dnp-architect` and `dnp-planner`. ## Layer Definitions ### Domain (innermost) - **Contains:** Entities, value objects, domain events, domain exceptions, enums - **References:** Nothing (zero project references) - **Packages allowed:** MediatR.Contracts (interfaces only), FluentResults - **Packages forbidden:** EF Core, ASP.NET Core, any infrastructure ### Application - **Contains:** Service interfaces, DTOs, validators, MediatR handlers, mapping profiles - **References:** Domain only - **Packages allowed:** MediatR, FluentValidation, AutoMapper - **Packages forbidden:** EF Core, database drivers, HTTP clients ### Infrastructure - **Contains:** DbContext, repositories, external service clients, email senders - **References:** Domain, Application - **Packages allowed:** EF Core, database drivers, HTTP clients, file system - **Implements:** Interfaces defined in Application ### API/Web (outermost) - **Contains:** Controllers/endpoints, middleware, Program.cs, DI composition root - **References:** Application, Infrastructure - **Packages allowed:** Swashbuckle, authentication, rate limiting - **Responsibility:** Wire everything together, no business logic ### Tests - **References:** Any (unrestricted) - **Packages:** Test framework, mocking library, assertions, WebApplicationFactory ## DI Registration Pattern ```csharp // In Infrastructure project: public static class InfrastructureServiceExten