What problem does it solve?
This Skill helps you avoid common .NET design and implementation pitfalls by applying idiomatic C# patterns that improve maintainability, correctness, and performance.
Core Features & Use Cases
- Immutability-first models: Use records and init-only properties to reduce bugs from unintended state changes.
- Clear intent and boundary safety: Prefer explicit nullability, access modifiers, and dependency injection via abstractions.
- Reliable async and HTTP/API design: Follow async/await best practices (including cancellation and concurrency) and use consistent patterns for ASP.NET Core pipelines and minimal APIs.
Use Case: When building an ASP.NET Core service, you can refactor an existing controller/service layer to use immutable request/response models, DI-based repository abstractions, and correct async flows (with cancellation and parallelism where appropriate) to make the system more robust and easier to review.
Quick Start
Apply the patterns from dotnet-patterns to your current C# service code by refactoring your models for immutability and updating your services to use explicit nullability, constructor injection, and safe async/await with cancellation.