dotnet-best-practices

Checks .NET/C# code quality and adherence to best practices and architecture patterns.

Updated Apr 25, 2026
One-click install
npx skills add https://github.com/Szantoi/spaceos-modules-cabinet --skill dotnet-best-practices-szantoi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-best-practices
Source: https://github.com/Szantoi/spaceos-modules-cabinet/tree/main/.claude/skills/dotnet-best-practices
Command: npx skills add https://github.com/Szantoi/spaceos-modules-cabinet --skill dotnet-best-practices-szantoi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill assesses and enhances the quality of .NET/C# code within a solution/project, ensuring best practices are followed to improve reliability and maintainability.

Core Features & Use Cases

  • Documentation & Structure: Automatically generates comprehensive XML documentation comments.
  • Design Patterns: Enforces the use of established design patterns and architecture.
  • Dependency Injection & Services: Validates proper dependency injection patterns and service registration.
  • Resource Management & Localization: Checks for the correct usage of ResourceManager for localization.
  • Async/Await Patterns: Ensures asynchronous operations are handled according to best practices.
  • Testing Standards: Validates use of MSTest with FluentAssertions, following the AAA pattern and testing for edge cases.
  • Configuration & Settings: Assesses configuration classes and settings implementations.
  • Semantic Kernel & AI Integration: Integrates AI operations using Microsoft.SemanticKernel.
  • Error Handling & Logging: Ensures structured logging and proper exception handling.
  • Performance & Security: Validates usage of .NET features and secure coding practices.
  • Code Quality: Assesses adherence to SOLID principles and best coding practices.

Quick Start

Use the dotnet-best-practices skill to check and optimize your code quality within your solution or project.

Frequently Asked Questions about dotnet-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate dependency injection patterns and service registration in C# .NET?

To validate dependency injection in C# .NET, the skill checks your service registration and DI patterns against established architecture guidelines, ensuring proper lifecycle management and SOLID adherence for improved code maintainability.

What is the best way to check async/await patterns in .NET for best practices?

Checking async/await patterns in .NET involves analyzing your asynchronous operations to ensure they follow best practices, preventing common pitfalls like deadlocks. Automated scripts review async code to confirm proper task handling and structured error reporting.

How do I enforce MSTest and FluentAssertions standards with the AAA pattern in C#?

Enforcing MSTest and FluentAssertions standards requires validating that your C# tests follow the Arrange-Act-Assert (AAA) pattern and include edge case testing. Analysis scripts assess your testing practices to ensure comprehensive coverage and adherence to established testing guidelines.

Can I use automated scripts to generate XML documentation comments for C# code?

Yes, you can use automated scripts to generate comprehensive XML documentation comments for C# code. The tool assesses your existing documentation structure and automatically generates missing XML comments to improve code quality and adherence to design guidelines.

Does this approach check for proper exception handling and structured logging in .NET?

Yes, this approach checks for proper exception handling and structured logging in .NET. It validates that your code implements secure coding practices and ensures errors are handled correctly with structured logs, improving application performance and security.

What are the limitations of using automated scripts for .NET code quality checks?

Limitations of using automated scripts for .NET code quality checks include their dependency on predefined rules for patterns like Semantic Kernel integration and ResourceManager localization. They cannot assess subjective architectural decisions or context-specific business logic beyond established best practices.