
Dotnet Best Practices
The dotnet-best-practices skill analyzes .NET/C# code within a solution or project to ensure compliance with established best practices, including XML documentation, design patterns, dependency injection, async/await patterns, testing standards, and security protocols. It is designed for .NET developers and teams who need to maintain code quality and consistency across their projects. This skill solves the problem of enforcing architectural standards, improving code maintainability, and reducing technical debt by providing guidance on proper use of C# 12+ features, Microsoft.Extensions libraries, and established patterns like Command Handlers and Factory patterns.
- install copies · 90 days. Times the install command was copied on this site in the last 90 days, bots filtered.
- 24
- skills.sh installs
- 16.1K
- GitHub stars
- 41K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add github/awesome-copilot --skill dotnet-best-practices --agent claude-codeInstalls into .claude/skills of the current project.
Files
.NET/C# Best Practices
Your task is to ensure .NET/C# code in ${selection} meets the best practices specific to this solution/project. This includes:
Documentation & Structure
- Create comprehensive XML documentation comments for all public classes, interfaces, methods, and properties
- Include parameter descriptions and return value descriptions in XML comments
- Follow the established namespace structure: {Core|Console|App|Service}.{Feature}
Design Patterns & Architecture
- Use primary constructor syntax for dependency injection (e.g.,
public class MyClass(IDependency dependency)) - Implement the Command Handler pattern with generic base classes (e.g.,
CommandHandler<TOptions>) - Use interface segregation with clear naming conventions (prefix interfaces with 'I')
- Follow the Factory pattern for complex object creation.
Dependency Injection & Services
- Use constructor dependency injection with null checks via ArgumentNullException
- Register services with appropriate lifetimes (Singleton, Scoped, Transient)
- Use Microsoft.Extensions.DependencyInjection patterns
- Implement service interfaces for testability
Resource Management & Localization
Sponsors
Details
- Repository
- github.com/github/awesome-copilot
- Categories
- Git & Pull Requests, AI & Agent Building, .NET & C#
More from github/awesome-copilot
All 318- Sql Optimization16K
- Sql Code Review15.6K
- Chrome Devtools15.4K
- Microsoft Docs15K
- Playwright Explore Website14.8K
- Azure Devops Cli14.8K
- Javascript Typescript Jest14.5K
- Nuget Manager14.5K
- Microsoft Code Reference14.4K
- Web Design Reviewer14.3K
- Playwright Automation Fill In Form13.7K
- Create Specification13.6K
- Game Engine13.4K
- Create Agentsmd13.3K
- Refactor Plan13K
- Pytest Coverage13K
- Penpot Uiux Design12.9K
- Memory Merger12.9K
- Postgresql Code Review12.8K
- Create Implementation Plan12.6K
- Webapp Testing12.5K
- Architecture Blueprint Generator12.3K
- Typescript Mcp Server Generator12.1K
- Java Junit11.8K