reviewing-dotnet-code

Review .NET/C# code for Microsoft conventions and modern patterns.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/BrendanShields/spec-flow --skill reviewing-dotnet-code
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: reviewing-dotnet-code
Source: https://github.com/BrendanShields/spec-flow/tree/main/plugins/spec/skills/reviewing-dotnet-code
Command: npx skills add https://github.com/BrendanShields/spec-flow --skill reviewing-dotnet-code

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams ensure .NET/C# code adheres to Microsoft conventions and modern patterns, accelerating code reviews and reducing style debates.

Core Features & Use Cases

  • Code Review Automation: Enforces PascalCase for classes, interfaces, and methods; suggests modern patterns like file-scoped namespaces, target-typed new, and records for DTOs.
  • Pattern Modernization: Recommends updates to naming and type usage to align with C# best practices during refactors.
  • Use Case: When reviewing a legacy C# project, the Skill highlights non-conforming identifiers and suggests modern equivalents.

Quick Start

Review the file 'OrderProcessor.cs' to ensure it follows .NET naming conventions and uses modern C# patterns.

Frequently Asked Questions about reviewing-dotnet-code

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

FAQPage Schema
How do I enforce Microsoft naming conventions in C# code?

Enforce Microsoft naming conventions by applying PascalCase to classes, interfaces, and methods, and camelCase to private fields and local variables. This Skill automatically reviews C# files and flags non-conforming identifiers, suggesting corrections aligned with official Microsoft standards to maintain consistency across your .NET codebase.

What modern C# patterns should I use in new code?

Modern C# patterns include file-scoped namespaces, target-typed new expressions, collection expressions, primary constructors, and records for data transfer objects. This Skill identifies opportunities to modernize your code during reviews and refactors, helping you adopt patterns available in recent C# versions.

How do I detect async anti-patterns in .NET code?

Common async anti-patterns include async void methods, blocking calls in async context, and missing cancellation tokens. This Skill scans your C# files to identify these issues and recommends fixes, helping prevent deadlocks, resource leaks, and unhandled exceptions in asynchronous code.

Can I automate code reviews for .NET naming and patterns?

Yes, this Skill automates code review checks by enforcing Microsoft conventions and detecting modern pattern opportunities across your C# files. It accelerates reviews by flagging style violations and suggesting modernizations, reducing manual effort and debate over naming standards.

What's the best way to refactor legacy C# code to modern standards?

Refactor legacy C# by updating identifiers to PascalCase conventions, replacing obsolete syntax with modern patterns like records and file-scoped namespaces, and removing async anti-patterns. This Skill reviews your legacy .NET projects and generates modernization suggestions aligned with current C# best practices.

Do I need prior knowledge of C# to use this code review approach?

Basic C# familiarity is helpful but not required. This Skill applies objective Microsoft conventions and established C# patterns, flagging deviations with clear suggestions. It works as a learning reference during code reviews, helping teams adopt standards consistently.