csharp-review

Review C# code diffs against modern .NET best practices and SOLID principles.

Updated Jan 7, 2026
One-click install
npx skills add https://github.com/lbussell/agent-skills --skill csharp-review
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: csharp-review
Source: https://github.com/lbussell/agent-skills/tree/main/skills/csharp-review
Command: npx skills add https://github.com/lbussell/agent-skills --skill csharp-review

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers improve the quality, maintainability, and adherence to modern best practices in C# and .NET codebases by providing automated code review guidance.

Core Features & Use Cases

  • Best Practice Enforcement: Checks code against modern C#/.NET conventions, SOLID principles, and common code smells.
  • Modernization Guidance: Identifies opportunities to adopt newer language features like collection expressions and pattern matching.
  • Use Case: Before merging a pull request, use this Skill to get a detailed review of C# code changes, ensuring consistency and catching potential issues related to immutability, error handling, and dependency injection.

Quick Start

Review the last 3 commits in the current C# project for adherence to modern best practices.

Frequently Asked Questions about csharp-review

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

FAQPage Schema
What is C# code review for modern .NET best practices?

C# code review analyzes code diffs against modern .NET conventions, SOLID principles, and common code smells. It examines changes for issues related to collection expressions, record immutability, pattern matching, error handling, and dependency injection, providing structured feedback with suggested improvements.

How do I check C# code changes for SOLID principle violations?

To check C# code changes for SOLID principle violations, review the code diff using an automated analyzer. This Skill evaluates dependency injection patterns and overall code structure, providing structured feedback to ensure your pull request maintains consistency and catches potential architectural issues.

Does this C# reviewer identify opportunities to use collection expressions and pattern matching?

Yes, this C# reviewer identifies modernization guidance by analyzing code diffs. It specifically detects opportunities to adopt newer language features like collection expressions and pattern matching, helping you refactor existing code to align with modern .NET conventions.

Can I use this to review C# code before merging a pull request?

Yes, you can use this Skill to review C# code before merging a pull request. By analyzing the last few commits in your current .NET project, it catches potential issues related to immutability, error handling, and dependency injection, ensuring consistency and maintainability.

What's the best way to refactor C# code to fix common code smells?

The best way to refactor C# code to fix common code smells is to run an automated review against modern .NET best practices. This Skill analyzes your code changes and provides structured feedback with suggested code improvements for identified architectural and formatting issues.

Are there limitations to what this C# code review checks?

The C# code review focuses on modern language features, SOLID principles, and common code smells like collection expressions, record immutability, pattern matching, error handling, and dependency injection. It does not compile code or replace comprehensive runtime testing for functional logic verification.