dotnet-best-practices

Audit .NET/C# solutions for XML docs, DI, SOLID, and testing compliance.

Updated Nov 15, 2025
One-click install
npx skills add https://github.com/HongQuan78/Chatty.BE --skill dotnet-best-practices-hongquan78
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-best-practices
Source: https://github.com/HongQuan78/Chatty.BE/tree/main/.agents/skills/dotnet-best-practices
Command: npx skills add https://github.com/HongQuan78/Chatty.BE --skill dotnet-best-practices-hongquan78

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

.NET/C# codebases often drift from consistent standards, leading to maintenance challenges, reduced readability, and harder onboarding. This Skill enforces a comprehensive set of best practices to keep code aligned with the project's goals and quality bar.

Core Features & Use Cases

  • XML documentation and descriptive comments for public APIs to improve maintainability and knowledge transfer.
  • Enforce design patterns and architecture guidelines (primary constructor syntax, proper DI usage, SOLID principles, factory patterns).
  • Consistent testing, logging, error handling, and configuration validation to improve reliability and observability.

Quick Start

Run a targeted best-practices audit on the current solution and generate a plan to implement XML docs, DI improvements, and SOLID adherence.

Frequently Asked Questions about dotnet-best-practices

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

FAQPage Schema
How do I enforce C# code quality and SOLID principles across an existing .NET solution?

Enforce C# code quality by applying project-wide best practices across your .NET solution. This includes generating a plan to implement XML documentation, primary constructor DI syntax, and strict SOLID design adherence.

What is the best way to standardize dependency injection and architecture in .NET projects?

Standardize .NET architecture by enforcing primary constructor DI syntax, interface segregation, and factory patterns. This ensures consistent dependency injection usage and maintains structural integrity across the codebase.

How do I implement structured logging and robust error handling in C#?

Implement robust C# error handling and structured logging by applying comprehensive best practices. This enforces consistent observability and reliability standards across both new and existing code.

Does this .NET best practices approach work for both new and legacy codebases?

Yes, the .NET best practices enforcement applies to both new and existing code across solutions. It handles documentation, architecture, configuration validation, and testing improvements regardless of the codebase age.

How do I ensure public APIs in C# have proper XML documentation?

Ensure C# public APIs have proper XML documentation by enforcing descriptive comments project-wide. This improves maintainability, readability, and knowledge transfer across the development team.

What are the limitations of automated .NET architecture and code quality enforcement?

Automated .NET code quality enforcement focuses on patterns like async/await, DI, and SOLID principles, but complex domain-specific business logic validation may require manual architectural review beyond standard best practices.