skills/brendanshields/reviewing-dotnet-code/SKILL.md
Reviews and generates .NET/C# code following Microsoft conventions and modern patterns. Use when reviewing C# files, writing .NET code, refactoring, or when user mentions "C#", ".NET", "dotnet", "csharp", or asks about naming conventions in .NET projects.
npx skillsauth add aiskillstore/marketplace reviewing-dotnet-codeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Apply Microsoft's .NET coding conventions and modern C# patterns when reviewing or generating code.
| Element | Style | Example |
|---------|-------|---------|
| Classes, Records | PascalCase | CustomerService, OrderRecord |
| Interfaces | IPascalCase | IRepository, IDisposable |
| Methods | PascalCase | GetCustomer(), ValidateOrder() |
| Properties | PascalCase | FirstName, IsActive |
| Public Fields | PascalCase | MaxRetryCount |
| Parameters | camelCase | customerId, orderDate |
| Local Variables | camelCase | itemCount, isValid |
| Private Fields | _camelCase | _connectionString, _logger |
| Constants | PascalCase | DefaultTimeout, MaxItems |
| Enums | PascalCase (singular) | Color.Red, Status.Active |
| Async Methods | PascalCaseAsync | GetCustomerAsync() |
Always use language keywords over framework types:
// Correct
string name;
int count;
bool isActive;
// Avoid
String name;
Int32 count;
Boolean isActive;
// File-scoped namespaces
namespace MyApp.Services;
// Target-typed new
List<Customer> customers = new();
// Collection expressions
string[] items = ["one", "two", "three"];
// Primary constructors
public class Service(ILogger logger, IRepository repo);
// Records for immutable data
public record CustomerDto(string Name, string Email);
// Raw string literals
var json = """
{ "name": "test" }
""";
Scan for naming violations:
Async suffixLook for outdated patterns:
String instead of stringnew List<T>() instead of new() or []?. or ??Flag async anti-patterns:
async void (except event handlers).Result or .Wait() blocking callsConfigureAwait(false) in librariesVerify exception patterns:
Exception instead of specific typesusing for disposablesIdentify LINQ opportunities:
Select/Where/Any.ToList())Read REFERENCE.md when:
Read EXAMPLES.md when:
// async void (except event handlers)
public async void ProcessData() { }
// Blocking on async
var result = GetDataAsync().Result;
task.Wait();
// Empty catch
try { } catch { }
// Catching base Exception
catch (Exception ex) { }
// Hungarian notation
int iCount; // use: count
string strName; // use: name
// Screaming caps
const int MAX_SIZE = 100; // use: MaxSize
// System types
String name; // use: string
namespace MyApp.Services;
public class CustomerService(
ILogger<CustomerService> logger,
ICustomerRepository repository)
{
public async Task<Customer?> GetByIdAsync(
int id,
CancellationToken cancellationToken = default)
{
logger.LogDebug("Getting customer {Id}", id);
return await repository.FindByIdAsync(id, cancellationToken);
}
}
namespace MyApp.Models;
public record CustomerDto(
int Id,
string Name,
string Email,
DateOnly CreatedDate);
namespace MyApp.Abstractions;
public interface ICustomerRepository
{
Task<Customer?> FindByIdAsync(int id, CancellationToken ct = default);
Task<IReadOnlyList<Customer>> GetAllAsync(CancellationToken ct = default);
Task AddAsync(Customer customer, CancellationToken ct = default);
}
If project has .editorconfig, defer to those rules for style preferences. Check before suggesting style changes.
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.