clean-architecture

Guide teams implementing Clean Architecture layers in .NET applications.

Updated Feb 26, 2023
One-click install
npx skills add https://github.com/burakergun394/projects --skill clean-architecture-burakergun394
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-architecture
Source: https://github.com/burakergun394/projects/tree/main/FollowCatcher/.claude/skills/clean-architecture
Command: npx skills add https://github.com/burakergun394/projects --skill clean-architecture-burakergun394

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Clean Architecture guides help teams implement the pattern in .NET projects, clarifying boundaries and responsibilities to reduce coupling.

Core Features & Use Cases

  • Layered architecture guidance: Domain, Application, Infrastructure, and API separation with clear responsibilities.
  • CQRS and domain rules: Guidance on commands, queries, validators, and domain events to enforce business rules.
  • Code organization templates: Typical folder structures and naming conventions for new features or refactors.

Quick Start

Use this guide to structure a new .NET feature by aligning domains, use cases, and infrastructure according to the four layers.

Frequently Asked Questions about clean-architecture

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

FAQPage Schema
How do I structure a .NET application using Clean Architecture?

Structure your .NET application using Clean Architecture by separating it into Domain, Application, Infrastructure, and API layers. This guidance enforces layer isolation, clarifies boundaries, and reduces coupling to keep business logic independent from infrastructure concerns.

What is the best way to implement CQRS and domain events in .NET?

Implement CQRS and domain events in .NET by defining deterministic commands and queries within the Application layer. This enforces business rules through validators and domain events, ensuring clear separation between read and write operations for typical software projects.

How do I organize files and naming conventions for a .NET Clean Architecture project?

Organize files and naming conventions for a .NET Clean Architecture project by following documented templates aligning domains, use cases, and infrastructure. This provides typical folder structures and clear naming rules to maintain consistency during new feature development or refactors.

Does Clean Architecture support Domain-Driven Design patterns in .NET?

Clean Architecture supports Domain-Driven Design patterns in .NET by applying specifications and the unit of work pattern within the domain and persistence layers. This isolates domain logic and manages transactional consistency across typical software project boundaries.

Why does my layered .NET architecture have high coupling between the domain and infrastructure?

Layered .NET architecture has high coupling when boundaries and responsibilities are unclear. Applying Clean Architecture guidance enforces strict layer isolation between the domain, application, and infrastructure, reducing dependencies and ensuring infrastructure details do not leak into business logic.

Can I use Clean Architecture to refactor an existing .NET application?

You can use Clean Architecture to refactor an existing .NET application by realigning domains, use cases, and infrastructure into the four layers. The guidance provides code organization templates and naming conventions to clarify boundaries and reduce coupling during the transition.