SKILL

dotnet-best-practices

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

Target: Software development & testing. Automatically collected · unverified.

Excerpt from the author’s documentation

Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.

Read the original English text

Topics in the source

  • .NET/C# Best Practices
  • Documentation & Structure
  • Design Patterns & Architecture
  • Dependency Injection & Services
  • Resource Management & Localization
  • Async/Await Patterns
  • Testing Standards
  • Configuration & Settings

Your task is to ensure .NET/C# code in ${selection} meets the best practices specific to this solution/project. This includes: 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} 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 ) Use interface segregation with clear naming conventions (prefix interfaces with 'I') Follow the Factory pattern for complex object creation. 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 Use ResourceManager for localized messages and error strings Separate LogMessages and ErrorMessages resource files Access resources via resourceManager.GetString("MessageKey") Use async/await for all I/O operations

This is an excerpt. Refer to the complete source and its current requirements.

Source repository
OKHP3/skillz
Source file
community/dotnet-best-practices/SKILL.md
Fixed revision
7b187777d42ab7bc7bab1e5f2c940cd3139ecebf
Read the complete original documentation ↗

Requirements

  • Only the author’s Skill metadata is included. Read the full instructions to check dependencies, licensing and conditions of use.

A small first task

先阅读原作者说明,再决定是否在自己的 AI 工具中使用。

Instructions for your AI tool

Author documentation is not live verification by this site. Without evidence, we do not mark a resource as compatible, safe or free.

Sources and evidence

This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.

Author: OKHP3/skillz · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-10T10:00:54.185Z.

Categories are inferred from names, descriptions and paths. They do not establish compatibility.

License and attribution

MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.

Original license ↗

Synchronization, copying and user-reported success do not mark a resource as runtime-tested.

Limitations and notes

  • Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.