dotnet-best-practices

Review .NET/C# code for architecture, DI, logging, and test standards.

Updated Jan 15, 2026
One-click install
npx skills add https://github.com/ethanhanderson/church-presenter --skill dotnet-best-practices-ethanhanderson
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-best-practices
Source: https://github.com/ethanhanderson/church-presenter/tree/main/.agents/skills/dotnet-best-practices
Command: npx skills add https://github.com/ethanhanderson/church-presenter --skill dotnet-best-practices-ethanhanderson

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps developers ensure their .NET/C# solution follows consistent, production-grade best practices across documentation, architecture, dependency injection, testing, and operational concerns.

Core Features & Use Cases

  • Documentation & Structure: Enforces XML documentation for public APIs and a consistent namespace structure tailored to the project.
  • Architecture & Coding Standards: Promotes patterns like primary constructor DI, command handler patterns, SOLID principles, and cohesive, readable code.
  • Quality, Testing & Operations: Standardizes xUnit testing with FluentAssertions and Moq where needed, plus structured logging and robust async/error handling.

Quick Start

Apply dotnet-best-practices to the current selection of .NET/C# code in your project to identify what needs to be updated to meet the repository’s conventions.

Frequently Asked Questions about dotnet-best-practices

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

FAQPage Schema
What are the best practices for dependency injection in C# to improve code quality?

To enforce .NET architecture standards, review project structure for consistent namespaces, implement command handler patterns, and apply SOLID principles. This ensures cohesive, readable code across core and app layers while maintaining separation of concerns and standardized error handling.

How do I structure xUnit tests with FluentAssertions and Moq in a .NET project?

Structuring xUnit tests with FluentAssertions and Moq requires standardizing test conventions across your .NET project. You should use FluentAssertions for readable assertions and apply Moq specifically where mocking dependencies is needed to isolate core logic during testing.

Does this .NET code review guidance cover async patterns and error handling?

Yes, this .NET code review guidance covers async patterns and error handling by providing robust operational recommendations. It ensures secure async implementations and standardized error handling procedures are applied consistently throughout the core and app layers.

When do I need XML documentation for public APIs in C#?

XML documentation for public APIs in C# is required to ensure consistent documentation coverage across your .NET solution. You need it when enforcing production-grade best practices to maintain quality and provide clear API usage guidelines for developers.