coding-conventions

Enforce consistent C# coding conventions across .NET projects with XML documentation rules.

4|1|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/FaysilAlshareef/dotnet-ai-kit --skill coding-conventions-faysilalshareef
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coding-conventions
Source: https://github.com/FaysilAlshareef/dotnet-ai-kit/tree/main/skills/core/coding-conventions
Command: npx skills add https://github.com/FaysilAlshareef/dotnet-ai-kit --skill coding-conventions-faysilalshareef

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Inconsistent C# coding styles across a codebase can lead to confusion, higher onboarding time, and harder maintenance. This Skill provides a clear, reusable set of conventions for namespaces, file organization, class modifiers, variable usage, and XML documentation to keep code readable and predictable.

Core Features & Use Cases

  • Enforce file organization: one primary type per file with file-scoped namespaces, and naming that matches filenames.
  • Standardize class conventions and access modifiers: promote sealed classes where appropriate and discourage unnecessary inheritance.
  • Enforce consistent var usage and XML documentation for public members to improve readability and maintainability.
  • Use Case: A team adopts these conventions across new features and legacy code to reduce style drift and streamline code reviews.

Quick Start

Install and apply the coding-conventions rules to your .NET solution to start enforcing the standard in new and existing code.

Frequently Asked Questions about coding-conventions

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

FAQPage Schema
How do I enforce consistent C# coding standards across a .NET project?

Standardizing C# coding conventions involves enforcing file-scoped namespaces, promoting sealed classes, standardizing var usage, and requiring XML documentation for public members to reduce style drift and streamline code reviews.

What is the best way to standardize XML documentation for public members in C#?

Standardizing C# coding conventions involves enforcing file-scoped namespaces, promoting sealed classes, standardizing var usage, and requiring XML documentation for public members to reduce style drift and streamline code reviews.

Can I apply coding conventions to an existing .NET codebase without breaking legacy code?

Applying coding conventions to existing .NET codebases uses style guidance, example templates, and review-ready checks to improve readability and maintainability while reducing style drift during new feature development and legacy updates.

Does this style guide require file-scoped namespaces and one primary type per file?

This C# style guide enforces file organization by requiring one primary type per file with file-scoped namespaces, ensuring file naming matches the primary type to maintain predictable code structure and easier onboarding.

Why should I use sealed classes in C# coding conventions?

C# coding conventions promote sealed classes to discourage unnecessary inheritance, standardize class conventions and access modifiers, and improve code predictability and maintainability across the .NET project.

When do I need to apply a C# style guide to reduce onboarding time?

Apply a C# style guide when inconsistent coding styles cause confusion, higher onboarding time, and harder maintenance, providing a reusable set of conventions for namespaces, file organization, and XML documentation.