What problem does it solve?
Writing C# and .NET code often leads to inconsistent quality, common anti-patterns like deadlocks from blocking async calls, or poor maintainability from mutable state and missing dependency injection, which increase bug rates and technical debt for .NET applications.
Core Features & Use Cases
- Idiomatic Pattern Guidance: Covers immutability, explicit nullability, dependency injection, async/await best practices, and the options pattern for clean, maintainable code.
- Production-Ready Examples: Includes concrete implementations for EF Core repository patterns, custom middleware, minimal APIs, guard clauses, and the result pattern for explicit error handling.
- Anti-Pattern Avoidance: Explicitly lists common .NET pitfalls like async void methods, blocking on async code, and mutable static state with clear fixes.
- Use Case: When building an ASP.NET Core e-commerce API, use this skill to implement proper DI for your order repository, avoid deadlocks in async service methods, and structure your code for long-term maintainability.
Quick Start
Use the dotnet-patterns skill to review your existing C# user service implementation to identify async anti-patterns and suggest improvements for immutability and dependency injection adherence.