csharp-style-guide

Enforce C#/.NET style, quality, and safety guidelines in pull requests and CI workflows.

7|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/KentoShimizu/sw-agent-skills --skill csharp-style-guide
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: csharp-style-guide
Source: https://github.com/KentoShimizu/sw-agent-skills/tree/main/skills/csharp-style-guide
Command: npx skills add https://github.com/KentoShimizu/sw-agent-skills --skill csharp-style-guide

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Enforces consistent C#/.NET coding standards to improve readability, maintainability, and reliability across codebases, catching style and design issues early.

Core Features & Use Cases

  • Enforces naming conventions, nullability annotations, async patterns, and API design guidelines across C# artifacts.
  • Guides code structure and error handling, ensuring boundary and testability considerations are respected.
  • Applies during code reviews and CI checks to flag violations and suggest refactors.

Quick Start

Run the C# style-guide evaluation on touched files to enforce naming, nullability, and API design rules.

Frequently Asked Questions about csharp-style-guide

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

FAQPage Schema
How do I enforce C# coding standards and naming conventions in pull requests?

You can enforce C# coding standards by applying automated style-guide checks to touched .cs, .csproj, and .razor files during pull requests. This validates naming conventions, nullability annotations, and API design to ensure consistent coding practices.

What's the best way to validate async patterns and nullability in .NET code reviews?

The best way to validate async patterns and nullability in .NET code reviews is to run an automated style evaluation that flags violations and suggests refactors for unsafe async usage and missing nullability annotations across C# artifacts.

Do I need dotnet-format and dotnet test to run automated C# style checks in CI?

Yes, you need dotnet-format, dotnet-build, and dotnet test to run automated C# style checks in CI. These dependencies are required to validate naming, nullability, async usage, and API design against enforced quality guidelines.

Can I use a C# style guide to check .csproj, .props, and .targets files?

Yes, you can use a C# style guide to check .csproj, .props, and .targets files. The evaluation applies to these project file formats alongside .cs, .sln, and .razor files to ensure consistent coding practices across all .NET artifacts.

Why does my C# code review fail on API design and boundary testability considerations?

Your C# code review fails on API design and boundary testability because the style evaluation actively guides code structure and error handling, ensuring boundary and testability considerations are respected before changes can be approved.

When should I not use an automated C# style guide for .NET codebases?

You should not use an automated C# style guide when modifying files outside the supported .cs, .csproj, .sln, .props, .targets, and .razor formats, as the evaluation specifically targets these .NET artifacts to catch design issues early.