Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Reviewing Dotnet Code

ASecurity

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.

416 stars
0 votes
0 copies
5 views
Added 2/9/2026
developmentc#expressrefactoring

Security Analysis

A100/100

Scanned 2/12/2026

Install to Claude Code

$npx -y skills add aiskillstore/marketplace --skill reviewing-dotnet-code --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Reviewing Dotnet Code?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Reviewing Dotnet Code
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aiskillstore-reviewing-dotnet-code/badge)](https://www.skillsdirectory.com/skills/aiskillstore-reviewing-dotnet-code)

More formats (shields.io, HTML) on the badges page.

Download with Pro
Files
SKILL.md
---
name: reviewing-dotnet-code
description: |
  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.
tools:
  - Read
  - Edit
  - Grep
  - Glob
---

# Reviewing .NET Code

Apply Microsoft's .NET coding conventions and modern C# patterns when reviewing or generating code.

## Quick Reference

### Naming Conventions

| 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()` |

### Type Keywords

Always use language keywords over framework types:

```csharp
// Correct
string name;
int count;
bool isActive;

// Avoid
String name;
Int32 count;
Boolean isActive;
```

### Modern C# Patterns (C# 10+)

```csharp
// 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" }
    """;
```

## Review Workflow

### Step 1: Check Naming

Scan for naming violations:
- Classes/methods not in PascalCase
- Private fields without underscore prefix
- Parameters/locals not in camelCase
- Async methods missing `Async` suffix

### Step 2: Check Patterns

Look for outdated patterns:
- `String` instead of `string`
- `new List<T>()` instead of `new()` or `[]`
- Block-scoped namespaces
- Manual null checks instead of `?.` or `??`

### Step 3: Check Async/Await

Flag async anti-patterns:
- `async void` (except event handlers)
- `.Result` or `.Wait()` blocking calls
- Missing `ConfigureAwait(false)` in libraries

### Step 4: Check Exception Handling

Verify exception patterns:
- Catching `Exception` instead of specific types
- Empty catch blocks
- Not using `using` for disposables

### Step 5: Check LINQ Usage

Identify LINQ opportunities:
- Manual loops that could be `Select`/`Where`/`Any`
- Multiple enumerations (should `.ToList()`)

## When to Read Reference Files

**Read REFERENCE.md when:**
- User asks for detailed naming rules
- Reviewing complex class hierarchies
- Need specific async/await guidance
- Reviewing exception handling patterns

**Read EXAMPLES.md when:**
- Need before/after refactoring samples
- Showing concrete improvements
- User asks "how should this look?"

## Anti-Patterns to Flag

### Critical (Always Flag)

```csharp
// 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) { }
```

### Important (Flag in Reviews)

```csharp
// 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
```

## Code Generation Templates

### Service Class

```csharp
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);
    }
}
```

### Record DTO

```csharp
namespace MyApp.Models;

public record CustomerDto(
    int Id,
    string Name,
    string Email,
    DateOnly CreatedDate);
```

### Interface

```csharp
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);
}
```

## EditorConfig Integration

If project has `.editorconfig`, defer to those rules for style preferences. Check before suggesting style changes.

## Review Checklist

- [ ] Naming follows conventions
- [ ] Using language keywords (string, int, bool)
- [ ] Async methods have Async suffix
- [ ] No async void (except event handlers)
- [ ] No blocking calls (.Result, .Wait())
- [ ] Using statements for disposables
- [ ] Specific exception types caught
- [ ] LINQ used where appropriate
- [ ] Modern C# features applied

Attribution

aiskillstoreaiskillstore
View sourceMore from aiskillstore →
SSkills DirectorySkills Directory

Know which skills are safe — weekly.

Best new skills + every skill we flagged as malicious. From the team that scanned 103,619.

Join free

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Know which skills are safe — weekly.

Best new skills + every skill we flagged as malicious. From the team that scanned 103,619.

Join free

Related Skills

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

284972 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2222 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Tanstack Start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 + Cloudflare Workers app with file-based routing and server functions — even if they don't name TanStack Start specifically. No template repo — Claude generates every file fresh per ...

10311 votes

Pentest

PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.

5491 votes
View all in development →