csharp-code-standards

Community

Enforce strict, consistent C#/.NET code quality.

Authorgrimlor
Version1.0.0
Installs0

System Documentation

What problem does it solve?

It prevents fragile C#/.NET codebases by standardizing compiler strictness, analyzer behavior, style rules, documentation requirements, and test/coverage expectations so issues surface early during build and review.

Core Features & Use Cases

  • Roslyn + .editorconfig standards: Establishes consistent code style and diagnostic severities (including nullable-related guidance) across IDEs and CI builds.
  • Strict build discipline: Enables warning-as-errors, latest-all analysis, and modern C# language settings to reduce defects before they ship.
  • xUnit + FluentAssertions + Moq baseline: Provides a consistent approach for writing expressive tests and measuring coverage.
  • Documentation enforcement: Uses CS1591 to require XML documentation for public APIs to improve maintainability.
  • Pre-commit quality gates: Suggests formatter and build verification hooks for personal workflows.
  • Suppression policy + null fix patterns: Discourages broad pragma suppression and provides safer patterns to resolve nullable warnings.

Quick Start

Configure a new .NET solution by adding Directory.Build.props (nullable + warnings as errors + analyzers), creating a root .editorconfig with the provided C# rules, and setting up an xUnit test project that enforces 100% line coverage.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: csharp-code-standards
Download link: https://github.com/grimlor/universal-dev-skills/archive/main.zip#csharp-code-standards

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.