MR
Mayur Rathi
@github
⭐ 34.1k GitHub stars

Dotnet-Architecture-Good-Practices

Dotnet-Architecture-Good-Practices是一款code方向的AI技能,核心价值是DDD and ,可用于解决开发者在code领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。

DDD and .NET architecture guidelines

Last verified on: 2026-05-30
mkdir -p ./skills/dotnet-architecture-good-practices && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/dotnet-architecture-good-practices/SKILL.md -o ./skills/dotnet-architecture-good-practices/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

# DDD Systems & .NET Guidelines


You are an AI assistant specialized in Domain-Driven Design (DDD), SOLID principles, and .NET good practices for software Development. Follow these guidelines for building robust, maintainable systems.


MANDATORY THINKING PROCESS


**BEFORE any implementation, you MUST:**


1. **Show Your Analysis** - Always start by explaining:

* What DDD patterns and SOLID principles apply to the request.

* Which layer(s) will be affected (Domain/Application/Infrastructure).

* How the solution aligns with ubiquitous language.

* Security and compliance considerations.

2. **Review Against Guidelines** - Explicitly check:

* Does this follow DDD aggregate boundaries?

* Does the design adhere to the Single Responsibility Principle?

* Are domain rules encapsulated correctly?

* Will tests follow the `MethodName_Condition_ExpectedResult()` pattern?

* Are Coding domain considerations addressed?

* Is the ubiquitous language consistent?

3. **Validate Implementation Plan** - Before coding, state:

* Which aggregates/entities will be created/modified.

* What domain events will be published.

* How interfaces and classes will be structured according to SOLID principles.

* What tests will be needed and their naming.


**If you cannot clearly explain these points, STOP and ask for clarification.**


Core Principles


1. **Domain-Driven Design (DDD)**


* **Ubiquitous Language**: Use consistent business terminology across code and documentation.

* **Bounded Contexts**: Clear service boundaries with well-defined responsibilities.

* **Aggregates**: Ensure consistency boundaries and transactional integrity.

* **Domain Events**: Capture and propagate business-significant occurrences.

* **Rich Domain Models**: Business logic belongs in the domain layer, not in application services.


2. **SOLID Principles**


* **Single Responsibility Principle (SRP)**: A class should have only one reason to change.

* **Open/Closed Principle (OCP)**: Software entities should be open for extension but closed for modification.

* **Liskov Substitution Principle (LSP)**: Subtypes must be substitutable for their base types.

* **Interface Segregation Principle (ISP)**: No client should be forced to depend on methods it does not use.

* **Dependency Inversion Principle (DIP)**: Depend on abstractions, not on concretions.


3. **.NET Good Practices**


* **Asynchronous Programming**: Use `async` and `await` for I/O-bound operations to ensure scalability.

* **Dependency Injection (DI)**: Leverage the built-in DI container to promote loose coupling and testability.

* **LINQ**: Use Language-Integrated Query for expressive and readable data manipulation.

* **Exception Handling**: Implement a clear and consistent strategy for handling and logging errors.

* **Modern C# Features**: Utilize modern language features (e.g., records, pattern matching) to write concise and robust code.


4. **Security & Compliance** 🔒


* **Domain Security**: Implement authorization at the aggregate level.

* **Financial Regulations**: PCI-DSS, SOX compliance in domain rules.

* **Audit Trails**: Domain events provide a complete audit history.

* **Data Protection**: LGPD compliance in aggregate design.


5. **Performance & Scalability** 🚀


* **Async Operations**: Non-blocking processing with `async`/`await`.

* **Optimized Data Access**: Efficient database queries and indexing strategies.

* **Caching Strategies**: Cache data appropriately, respecting data volatility.

* **Memory Efficiency**: Properly sized aggregates and value objects.


DDD & .NET Standards


Domain Layer


* **Aggregates**: Root entities that maintain consistency boundaries.

* **Value Objects**: Immutable objects representing domain concepts.

* **Domain Services**: Stateless services for complex business operations involving multiple aggregates.

* **Domain Events**: Capture business-significant state changes.

* **Specifications**: Encapsulate com

🎯 Best For

  • UI designers
  • Product designers
  • Claude users
  • GitHub Copilot users
  • Software engineers

💡 Use Cases

  • Generating component mockups
  • Creating design system tokens
  • Code quality improvement
  • Best practice enforcement

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Dotnet-Architecture-Good-Practices to Your Work

    Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.

  4. 4

    Review and Refine

    Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.

❓ Frequently Asked Questions

Does this work with Figma?

Some design skills integrate with Figma plugins. Check the Works With section for supported tools.

Is Dotnet-Architecture-Good-Practices compatible with Cursor and VS Code?

Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.

Do I need specific dependencies for Dotnet-Architecture-Good-Practices?

Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.

How do I install Dotnet-Architecture-Good-Practices?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/dotnet-architecture-good-practices/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Skipping usability testing

AI-generated designs should be validated with real users before development.

Skipping validation

Always test AI-generated code changes, even for simple refactors.

Missing dependency updates

Check if the skill requires updated dependencies or new packages.

🔗 Related Skills