dotnet-patterns

Apply idiomatic C# and .NET patterns for robust application development.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/luongldptit/move-ticket --skill dotnet-patterns-luongldptit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-patterns
Source: https://github.com/luongldptit/move-ticket/tree/main/.agent/skills/dotnet-patterns
Command: npx skills add https://github.com/luongldptit/move-ticket --skill dotnet-patterns-luongldptit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the inconsistency and technical debt that comes with unstandardized C# and .NET development, ensuring your code follows proven industry best practices to be robust, performant, and easy to maintain over time.

Core Features & Use Cases

  • Idiomatic C# & .NET Conventions: Enforces best practices for immutability, explicit null safety, and clear access modifiers to reduce bugs and improve code readability.
  • Production Architecture Patterns: Provides proven implementations for dependency injection, async/await workflows, EF Core repository patterns, ASP.NET Core middleware, and minimal API organization.
  • Use Case: When refactoring a legacy ASP.NET Core service with blocking async calls and mutable data models, use this Skill to align the codebase with modern .NET standards and eliminate common anti-patterns like deadlocks.

Quick Start

Use the dotnet-patterns skill to refactor the existing UserService class to use async/await all the way, add proper guard clauses for null validation, and replace mutable public setters with init-only properties for data models.

Frequently Asked Questions about dotnet-patterns

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

FAQPage Schema
How do I refactor legacy ASP.NET Core code to prevent async deadlocks?

Refactor legacy ASP.NET Core services by applying standardized async/await workflows all the way through the call stack to eliminate blocking calls and resolve common .NET deadlock anti-patterns.

What is the best way to enforce immutability in C# data models?

Enforce immutability in C# data models by replacing mutable public setters with init-only properties, applying explicit null safety, and using clear access modifiers to reduce bugs and improve readability.

How do I implement the EF Core repository pattern in a .NET application?

Implement the EF Core repository pattern by applying proven production architecture patterns for dependency injection and data access, ensuring robust and maintainable .NET application development.

Can I use this to add null validation guard clauses to an existing UserService?

Yes, you can refactor an existing UserService by adding proper guard clauses for explicit null validation, replacing mutable setters with init-only properties, and aligning with modern .NET standards.

Why does unstandardized C# code lead to maintainability issues?

Unstandardized C# code leads to inconsistency and technical debt because it lacks proven industry best practices for null safety, dependency injection, and async workflows, making the application difficult to maintain over time.

Does this Skill apply to designing Minimal API organization in ASP.NET Core?

Yes, this Skill provides production architecture patterns for ASP.NET Core middleware and minimal API organization, ensuring your service architecture design follows idiomatic C# and .NET conventions.