C# Best Practices

Enforce idiomatic C# coding standards and best practices.

Updated Jan 22, 2026
One-click install
npx skills add https://github.com/ngxtm/skill-rule --skill c-best-practices
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: C# Best Practices
Source: https://github.com/ngxtm/skill-rule/tree/main/rules/dotnet/best-practices
Command: npx skills add https://github.com/ngxtm/skill-rule --skill c-best-practices

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces idiomatic C# patterns and conventions, leading to cleaner, more maintainable, and robust codebases.

Core Features & Use Cases

  • Enforces Naming Conventions: Ensures consistent use of PascalCase, camelCase, etc.
  • Promotes Clean Architecture: Guides project structure and dependency management.
  • Implements Best Practices: Covers DI, logging, configuration, and immutability.
  • Use Case: A new developer joins a C# project and needs to understand the established coding standards. This Skill provides a clear, actionable guide to follow.

Quick Start

Apply the C# best practices to the provided code snippet.

Frequently Asked Questions about C# Best Practices

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

FAQPage Schema
What are the standard C# coding conventions for clean and maintainable code?

Standard C# coding conventions enforce idiomatic patterns like PascalCase for naming, structured dependency injection, and immutability to ensure clean and maintainable .NET codebases.

How do I structure a C# project to follow clean architecture best practices?

To structure a C# project for clean architecture, apply established .NET guidelines for project organization, dependency management, and configuration to promote robust and maintainable code.

What's the best way to implement dependency injection and logging in C#?

The best way to implement dependency injection and logging in C# is to follow established .NET guidelines, ensuring robust configuration and adherence to idiomatic coding standards.

Does this approach enforce specific naming conventions for C# files?

Yes, this approach enforces specific C# naming conventions, requiring consistent use of PascalCase and camelCase to align with established .NET guidelines for code quality.

Why should I use immutability patterns in C# development?

You should use immutability patterns in C# development because they enforce idiomatic coding standards that lead to more robust, maintainable, and cleaner codebases.

Can I apply these dotnet coding standards to an existing codebase?

Yes, you can apply these dotnet coding standards to an existing codebase by using the guidelines to refactor project structure, dependency injection, and naming conventions for maintainability.