dotnet-best-practices

Audit .NET/C# projects and generate best-practices guidance and remediation plans.

Updated Apr 22, 2026
One-click install
npx skills add https://github.com/iliasjennane/LearningAgent --skill dotnet-best-practices-iliasjennane
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-best-practices
Source: https://github.com/iliasjennane/LearningAgent/tree/main/.agents/skills/csharp-dotnet-development/dotnet-best-practices
Command: npx skills add https://github.com/iliasjennane/LearningAgent --skill dotnet-best-practices-iliasjennane

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill codifies and enforces established .NET/C# best practices to improve code quality, maintainability, and consistency across a solution or project.

Core Features & Use Cases

  • Documentation & Structure: Enforces XML documentation, consistent namespaces, and clear project structure.
  • Design Patterns & Architecture: Encourages primary constructor DI, Command Handler patterns, interface segregation, and factory patterns.
  • Testing & Quality: Promotes typed configuration, robust validation, structured logging, and SOLID-compliant code.

Quick Start

Audit the target .NET project to generate actionable best-practices guidance and a remediation plan.

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# and .NET best practices across an existing project?

You can audit a target .NET solution to generate actionable best-practice guidance and a remediation plan covering architecture, dependency injection, resource management, and SOLID principles across namespaces like Core, Console, App, and Service.

What are the key .NET code quality standards for dependency injection and async patterns?

Key .NET code quality standards include using primary constructor dependency injection, following SOLID principles, implementing proper async patterns, and ensuring robust resource management. These standards improve maintainability and consistency across libraries, services, and applications.

Can I use this .NET code quality guidance for both new development and refactoring scenarios?

Yes, the .NET code quality guidance applies to both new development and refactoring scenarios. It provides structured patterns for libraries, services, and applications, ensuring consistent implementation of documentation, testing, configuration, and design patterns regardless of project maturity.

What's the best way to structure a C# project for SOLID principles and interface segregation?

The best way to structure a C# project for SOLID principles is to enforce clear project structures, consistent namespaces, and interface segregation. Encouraging Command Handler and factory patterns alongside primary constructor DI ensures maintainable and well-segregated architecture.

Does this .NET best practices skill cover typed configuration and structured logging?

Yes, the .NET best practices skill explicitly covers typed configuration and structured logging. It promotes robust validation and typed configuration to enhance testing and quality standards alongside enforcing XML documentation and SOLID-compliant code.

When do I need to audit my .NET solution for code quality and maintainability?

You need to audit your .NET solution for code quality when starting new development or refactoring existing projects. Auditing helps identify violations in async patterns, resource management, and dependency injection, generating a structured remediation plan to improve maintainability.