Agent skill

dotnet-best-practices

Ensure .NET/C# code meets best practices for the solution/project.

GitHub68,948★ · +463/wk · 2 repos on radarProfile →
copilotMIT
Install
npx skills add github/awesome-copilot --skill dotnet-best-practices --agent copilot

Same command for any agent — swap --agent for claude-code, codex, cursor.

Facts
Files in the skill folder: 1
SKILL.md size: 3 KB
Bundled scripts: none
Path: skills/dotnet-best-practices/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 37,432 · +281 this week
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# .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 - Use ResourceMana

What's inside
Steps it walks through
  1. Documentation & Structure
  2. Design Patterns & Architecture
  3. Dependency Injection & Services
  4. Resource Management & Localization
  5. Async/Await Patterns
  6. Testing Standards
  7. Configuration & Settings
  8. Semantic Kernel & AI Integration
  9. Error Handling & Logging
  10. Performance & Security
  11. Code Quality
More from awesome-copilot
All skills →
About this skill
What does the dotnet-best-practices skill do?

Ensure .NET/C# code meets best practices for the solution/project.

How do I install it?

Run `npx skills add github/awesome-copilot --skill dotnet-best-practices --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 github/awesome-copilot, a repository with 37,432 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.

Keep going