dotnet-architecture

Guide Clean Architecture implementation across .NET project layers with dependency rules.

1|Updated Sep 9, 2025
One-click install
npx skills add https://github.com/emaginebr/zTools --skill dotnet-architecture-emaginebr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-architecture
Source: https://github.com/emaginebr/zTools/tree/main/.claude/skills/dotnet-architecture
Command: npx skills add https://github.com/emaginebr/zTools --skill dotnet-architecture-emaginebr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a comprehensive, step-by-step guide to implementing Clean Architecture in .NET projects, ensuring a robust, maintainable, and scalable codebase.

Core Features & Use Cases

  • Layered Architecture Guidance: Covers DTO, Domain, Infra.Interfaces, Infra, and Application layers.
  • Dependency Management: Enforces strict dependency rules between layers.
  • Use Case: When starting a new .NET project or refactoring an existing one to adopt Clean Architecture principles, this Skill guides the creation and integration of all necessary components, from data transfer objects to repository implementations and DI setup.

Quick Start

Use the dotnet-architecture skill to create a new entity named 'Product' following the Clean Architecture pattern.

Frequently Asked Questions about dotnet-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement Clean Architecture in a .NET project?

To implement Clean Architecture in a .NET project, structure your solution across DTO, Domain, Infra.Interfaces, Infra, and Application layers. This approach enforces strict dependency rules and sets up dependency injection for maintainable code.

What is the best way to structure domain entities and repositories in .NET?

Structuring domain entities and repositories in .NET requires isolating domain logic from infrastructure. Use the repository pattern within Infra.Interfaces and implement strict dependency rules to keep your core layer independent.

Can I use dependency injection with Clean Architecture in dotnet?

Yes, dependency injection is essential for Clean Architecture in dotnet. It enforces strict dependency rules between layers, allowing the Application layer to depend on Infra.Interfaces rather than concrete implementations.

How do I refactor an existing .NET project to follow Clean Architecture principles?

Refactoring an existing .NET project to Clean Architecture involves restructuring code into Domain, Application, and Infra layers. You must migrate data transfer objects, update repository implementations, and configure dependency injection.

When do I need a separate DTO layer in .NET Clean Architecture?

You need a separate DTO layer in .NET Clean Architecture to isolate data transfer objects from the domain core. This prevents domain entity exposure at the application boundaries and maintains strict separation of concerns.