Dotnet Patterns
Idiomatic C# and .NET conventions covering immutability, dependency injection, async/await, and common application patterns.
- CCM score
- 71 of 100
- skills.sh installs
- 10.9K
- GitHub stars
- 312.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers records and init-only models, explicit nullability and access modifiers, and interface-based service boundaries registered through DI
- Includes async/await guidance with CancellationToken propagation, concurrent
Task.WhenAllloads, the Options pattern, and a Result type for expected failures - Enforces avoidance of blocking calls such as
.Resulton async methods, which can deadlock - Designed for developers writing or reviewing C# and ASP.NET Core code, including EF Core repositories and Minimal API endpoints
Install
$ npx -y skills add affaan-m/ecc --skill dotnet-patterns -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
.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.
// 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.
// Good: Explicit access modifiers and nullability
public sealed class UserService
{
private readonly IUserRepository _repository;
private readonly ILogger<UserService> _logger;
Details
- Repository
- github.com/affaan-m/ecc
- Categories
- .NET & C#, Backend & APIs
- First seen
- Jul 14, 2026
Questions
What does the dotnet-patterns skill do?
It gives the agent idiomatic C# and .NET patterns for writing and reviewing code, covering dependency injection, async and await, and general conventions. The skill is meant for building robust, maintainable .NET applications.
How do I install the dotnet-patterns skill?
Run npx -y skills add affaan-m/ecc --skill dotnet-patterns -y in your project. After that, the agent can apply the skill's C# and .NET patterns when you write or review code.
Where does dotnet-patterns rank in the .NET and C# category?
It ranks in the top 10 of the .NET and C# category on Claude Marketplaces. Its patterns cover immutable models, interface-based dependencies, async usage with CancellationToken, the Options pattern, and EF Core repositories.
When should I use dotnet-patterns?
Use it when writing new C# code, reviewing C# code, or refactoring a .NET application. It also helps when designing service architectures with ASP.NET Core.
More from affaan-m/ecc
All 257- Healthcare Eval Harness10.9K
- Llm Trading Agent Security10.8K
- Nodejs Keccak25610.8K
- Github Ops10.8K
- Customer Billing Ops10.8K
- Lead Intelligence10.8K
- Code Tour10.7K
- Finance Billing Ops10.7K
- Api Connector Builder10.7K
- Openclaw Persona Forge10.7K
- Google Workspace Ops10.7K
- Knowledge Ops10.7K
- Workspace Surface Audit10.7K
- Terminal Ops10.7K
- Gan Style Harness10.7K
- Agent Sort10.7K
- Product Capability10.7K
- Csharp Testing10.7K
- Opensource Pipeline10.7K
- Hipaa Compliance10.7K
- Connections Optimizer10.6K
- Project Flow Ops10.6K
- Research Ops10.6K
- Automation Audit Ops10.6K
Similar to Dotnet Patterns
More .NET & C#dotnet-backend-patternswshobson/agents20K installsMaster C#/.NET patterns for production APIs covering async, DI, EF Core, Dapper, caching, and testing.
dotnet-best-practicesgithub/awesome-copilot16.4K installsOpinionated .NET/C# review guide that checks code against project conventions for DI, async, testing, and AI integration.
csharp-prosickn33/agentic-awesome-skills322 installsModern C# development guidance covering records, pattern matching, async/await, nullable contracts, and .NET testing practices.
dotnetmindrally/skills765 installsOpinionated .NET backend guidelines covering Clean Architecture layout, async EF Core patterns, and API security conventions.
modern-csharp-coding-standardsaaronontheweb/dotnet-skills2.4K installsModern C# coding standards for records, pattern matching, value objects, async, and Span<T>/Memory<T> with a functional style.
csharp-concurrency-patternsaaronontheweb/dotnet-skills1.7K installsDecision guide for choosing among async/await, Channels, Rx, Akka.NET Streams, and Akka.NET Actors in .NET, avoiding locks where possible.