Idiomatic C# and .NET patterns, conventions, dependency injection, async/await, and best practices for building robust, maintainable .NET applications.
The dotnet-patterns skill provides developers with a structured guide to writing idiomatic C# and .NET code, focusing on patterns, conventions, and best practices that enhance maintainability, robustness, and performance. It helps solve common challenges in .NET development, such as managing mutable state, ensuring proper asynchronous behavior, and maintaining clean service architectures. By offering guidance on dependency injection, async/await patterns, and configuration management, this skill enables developers to build more reliable and scalable applications while reducing technical debt.
Key features of the dotnet-patterns skill include guidance on immutability, explicit coding practices, and reliance on abstractions via interfaces and dependency injection. It emphasizes proper usage of async/await for non-blocking operations, including concurrent task execution for improved performance. The skill also covers the Options pattern for strongly-typed configuration binding, encouraging consistent and safe management of application settings. Throughout, it provides clear code examples that demonstrate both recommended practices and common pitfalls to avoid.
This skill is useful for professional C# developers, code reviewers, and software architects working on .NET applications. It is particularly valuable when writing new code, refactoring existing projects, or designing service architectures with ASP.NET Core. By following the principles outlined in this skill, developers can create maintainable, scalable, and performant applications while adhering to widely accepted .NET conventions.
Activate the skill when writing new C# code, reviewing existing code, refactoring .NET applications, or designing service architectures with ASP.NET Core.
Yes, it provides guidance on proper async/await usage, including concurrent task execution to avoid blocking operations and improve performance.
It is compatible with standard C# and .NET applications, particularly those using ASP.NET Core and dependency injection patterns. Some guidance may be less applicable to older or non-standard frameworks.
The skill focuses on patterns, conventions, and best practices but does not provide automated code fixes or tooling. Developers must apply the practices manually in their projects.
It covers the Options pattern for strongly-typed configuration binding, allowing developers to map configuration sections to objects safely and consistently.
Quick Setup:
.claude/skills/Repository
affaan-m/everything-claude-code