dotnet-patterns
Idiomatic C# and .NET patterns, conventions, dependency injection, async/await, and best practices for building robust, maintainable .NET applications.
npx skills add mturac/everything-openai-codex --skill dotnet-patterns --agent codex
Same command for any agent — swap --agent for claude-code, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# .NET Development Patterns Idiomatic C# and .NET patterns for building robust, performant, and maintainable applications. ## When to Activate - Writing new C# code - Reviewing C# code - Refactoring existing .NET applications - Designing service architectures with ASP.NET Core ## Core Principles ### 1. Prefer Immutability Use records and init-only properties for data models. Mutability should be an explicit, justified choice. ```csharp // Good: Immutable value object public sealed record Money(decimal Amount, string Currency); // Good: Immutable DTO with init setters public sealed class CreateOrderRequest { public required string CustomerId { get; init; } public required IReadOnlyList<OrderItem> Items { get; init; } } // Bad: Mutable model with public setters public class Order { public string CustomerId { get; set; } public List<OrderItem> Items { get; set; } } ``` ### 2. Explicit Over Implicit Be clear about nullability, access modifiers, and intent. ```csharp // Good: Explicit access modifiers and nullability public sealed class UserService { private readonly IUserRepository _repository; private readonly ILogger<UserService> _logger; public UserService(IUserRepository repository
- When to Activate
- Core Principles
- 1. Prefer Immutability
- 2. Explicit Over Implicit
- 3. Depend on Abstractions
- Async/Await Patterns
- Proper Async Usage
- Parallel Async Operations
- Options Pattern
- Result Pattern
- Repository Pattern with EF Core
- Middleware and Pipeline
- Minimal API Patterns
- Guard Clauses
What does the dotnet-patterns skill do?
Idiomatic C# and .NET patterns, conventions, dependency injection, async/await, and best practices for building robust, maintainable .NET applications.
How do I install it?
Run `npx skills add mturac/everything-openai-codex --skill dotnet-patterns --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From mturac/everything-openai-codex, a repository with 84 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
