PlugWiki

dotnet-best-practices Skill for Claude: A C# and .NET Code Checklist

dotnet-best-practices makes Claude review and fix C# code against one fixed .NET checklist from GitHub's awesome-copilot.

Installs
15.9K
on skills.sh
Stars
40.7K
on GitHub
Updated
Oct 2026
last repo commit

dotnet-best-practices is a one-file checklist from the github/awesome-copilot collection. It tells Claude to make the C# code you point at meet the practices listed in 11 sections, from XML doc comments and primary constructor injection to async patterns, testing and logging.

It is opinionated and tied to a particular project style. It asks for the namespace pattern {Core|Console|App|Service}.{Feature}, the Command Handler pattern with generic base classes, MSTest with FluentAssertions and Moq, and Microsoft.SemanticKernel for AI work. Check that this matches your solution before you apply it.

It bundles no scripts and names no tools. The text is written to act on ${selection}, the code you have selected.

Good for

  • .NET developers who want Claude to apply the same conventions to every class
  • Reviewers who want a consistent checklist for C# changes
  • Teams that already use MSTest, Moq, FluentAssertions or Semantic Kernel

Install dotnet-best-practices

Claude Code

  1. 1

    Copy this prompt.

    Install the dotnet-best-practices skill in Claude Code. Run this command:
    
    npx skills add https://github.com/github/awesome-copilot --skill dotnet-best-practices
    
    Then check that it loaded and tell me how to use it.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js.

From its listing on skills.sh. Source.

What's in the skill

When it loads

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

Sections in SKILL.md

  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

Key facts

License (per GitHub)
MIT
Installs on skills.sh
15,922 as of 2026-11-02
Last repo commit
2026-10-30
Files in the skill folder
1 file including SKILL.md

What it includes

  • XML doc comments on public members, a fixed namespace pattern

    Asks for XML comments with parameter and return descriptions, and the namespace layout {Core|Console|App|Service}.{Feature}.

    Documentation and structure

  • Primary constructors, Command Handler, factories

    Primary constructor injection, a generic CommandHandler<TOptions> base, I-prefixed interfaces and the Factory pattern for complex creation.

    Design patterns and architecture

  • Constructor injection with null checks, service lifetimes

    Uses Microsoft.Extensions.DependencyInjection, picks Singleton, Scoped or Transient lifetimes and puts services behind interfaces.

    Dependency injection and services

  • ResourceManager strings, split log and error resources

    Keeps messages in resource files and reads them with _resourceManager.GetString.

    Resource management and localization

  • async for all I/O, Task returns, ConfigureAwait(false)

    Covers async I/O, return types, ConfigureAwait(false) and async exception handling.

    Async/await patterns

  • MSTest, FluentAssertions, Moq, Arrange-Act-Assert

    Tests both success and failure paths and includes null parameter validation tests.

    Testing standards

  • Typed settings classes with validation attributes

    Uses IConfiguration binding, data annotations and appsettings.json.

    Configuration and settings

  • Kernel setup, model settings, structured output

    Uses Microsoft.SemanticKernel for AI operations and structured outputs for reliable responses.

    Semantic Kernel and AI integration

  • Structured logging, scoped context, specific exceptions

    Uses Microsoft.Extensions.Logging with scoped context and descriptive exceptions.

    Error handling and logging

  • C# 12+, .NET 8, input validation, parameterized queries

    Asks for C# 12+ and .NET 8 features where they apply, input validation and parameterized database queries.

    Performance and security

  • SOLID, no duplication, disposal patterns

    Asks for SOLID principles, shared base classes, domain names, focused methods and proper disposal.

    Code quality

From the official docs

Questions

What does the dotnet-best-practices skill do?

It makes Claude check C# code against an 11-section checklist and bring the code in line. The sections run from XML documentation and dependency injection to async, testing, logging and security.

How do I install it?

Use the install box above. The skills CLI command installs this one skill from github/awesome-copilot into the agent you choose.

Does it work for any .NET project?

Only partly. Several rules assume a specific project style, such as the namespace pattern {Core|Console|App|Service}.{Feature}, a CommandHandler<TOptions> base class, MSTest with Moq and Semantic Kernel. Drop the rules that do not fit your solution.

Does it need an API key?

The SKILL.md names no API key and bundles no scripts. It is one text file of instructions.

Is it safe to install?

It bundles no scripts: the folder is one SKILL.md of coding rules. The awesome-copilot README says its content comes from third-party developers and asks you to inspect it before installing. Review the diff Claude makes to your code as you would any other change.

Why does it mention ${selection}?

The text says to check the C# code in ${selection}, a placeholder for the code you have selected. Name the file, class or folder in your prompt so Claude knows what to review.

Information

updated Nov 2, 2026

Folder
skills/dotnet-best-practices

github/awesome-copilotskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 1
  1. dotnet-best-practices SKILL.md · github.com

Updated Nov 2, 2026.