code-review-csharp

code-review-csharp is a skill for Claude Code, Codex from pnp/copilot-prompts. It costs 66 tokens per session (2,575 once invoked), scanned A, original, MIT.

A structured reviewer for C# code, the programming language commonly used with .NET applications. It checks naming, performance, security, readability, and .NET practices.

In plain words
What is it for?
Use it to review a C# file, class, or code snippet. It can focus on naming, performance, security, readability, or all of these, with the .NET version and issue severity taken into account.
Why use it?
It gives a consistent way to find and prioritize problems in C# code instead of relying only on an informal review. It can narrow the review to a chosen topic or severity level.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/pnp/copilot-prompts/code-review-csharp
Any agent
npx skills add pnp/copilot-prompts --skill code-review-csharp
Clone the repo
git clone --depth 1 https://github.com/pnp/copilot-prompts

Made for: Claude Code, Codex.

Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,575 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00066 $0.02575
Opus 5 $0.00033 $0.01288
Sonnet 5 $0.00013 $0.00515
Haiku 4.5 $0.00007 $0.00258

Measured 3d ago against content hash 642a8e6cb5db, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-review-csharp scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

samples/skills/code-review-csharp/SKILL.md · 233 lines

How it starts

The opening of the file, as written. The whole thing — 233 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Review C# Code for Best Practices

Perform a structured code review of C# source code. Identify issues related to naming conventions, performance, security, readability, and .NET best practices. Produce a prioritized report with actionable suggestions.

Gather Context

Before reviewing, determine:

  1. Code to review — the C# file, class, or snippet. If the user points to a file, read it. If they paste code, use it directly.
  2. Review focus — what to prioritize:
    • all (default) — full review across all categories
    • naming — naming conventions only
    • performance — performance and memory only
    • security — security vulnerabilities only
    • readability — clarity, structure, and maintainability only
  3. Target framework — the .NET version. Default to .NET 8 if not specified. Auto-detect from <TargetFramework> in .csproj if accessible.
  4. Severity thresholdall (default), warnings-and-above, or critical-only.

If context is missing: Default to all focus, .NET 8, and all severities. Don't block the review to ask — just state your assumptions at the top of the report. Only ask if you genuinely have no code to review.

Report Format

# Code Review: {FileName or ClassName}

> Target: .NET {version} | Focus: {focus} | Reviewed: {date}

## Summary

{One-paragraph overview. Lead with the most important finding. State the total issue count by severity.}

## Issues

| # | Severity | Location | Issue | Why It Matters | Suggestion |
|---|----------|----------|-------|----------------|------------|
| 1 | Critical | `Class.Method:L12` | {issue} | {impact} | {fix} |
| 2 | Warning  | `Class.Property`   | {issue} | {impact} | {fix} |
| 3 | Info     | `Class.Method:L25` | {issue} | {impact} | {fix} |

## What's Done Well

- {Positive pattern — be specific, not generic}

## Recommendations

1. **[Critical]** {Highest-impact change}
2. **[Warning]** {Next priority}
3. ...

Severity levels:

  • Critical — bugs, security vulnerabilities, data loss risks. Fix immediately.
  • Warning — convention violations, performance pitfalls, maintainability concerns. Fix soon.
  • Info — style preferences, minor modernization opportunities. Fix when convenient.

Read the full file on GitHub · 233 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 233 lines · 66 tokens per session scan A 642a8e6cb5db

Subscribe to this mod's changes

code-review-csharp is a skill published in the GitHub repository pnp/copilot-prompts (859 stars, last pushed 9d ago), licensed MIT. It adds 66 tokens to every session and 2,575 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

python-architecture

Activate when creating new modules, refactoring class hierarchies, introducing design patterns, or making changes spanning 3+ files in the APM CLI codebase.

microsoft/apm · 37 tokens

clean-architecture-dotnet

Use when domain logic leaks into API/Infrastructure, project references violate layer boundaries, or you need to decide between CQS (always), CQRS bus (complex domains), and DDD patterns (invariants and events).

SebastienDegodez/copilot-instructions · 50 tokens

creating-dotnet-mcp-servers

Use when building Model Context Protocol (MCP) servers in .NET, configuring tools, transports (SSE/stdio), JSON serialization for AOT, or testing MCP endpoints.

SebastienDegodez/copilot-instructions · 43 tokens

dotnet-testing-autodata-xunit-integration

AutoFixture 與 xUnit 整合完整指南。當需要使用 AutoData 或 InlineAutoData 簡化 xUnit 參數化測試資料準備時使用。涵蓋自訂 Customization 與測試資料屬性,提升測試可讀性與維護性。 Make sure to use this skill whenever the user mentions AutoData, InlineAutoData, MemberAutoData, AutoFixture xUnit integration, or parameterized test data attributes, even if they don't explicitly…

kevintsengtw/dotnet-testing-agent-skills · 181 tokens

dotnet-testing-autofixture-nsubstitute-integration

AutoFixture 與 NSubstitute 整合指南 - 實現自動模擬 (Auto-Mocking)。當需要自動建立 Mock 物件、簡化複雜相依性注入測試時使用。涵蓋 AutoNSubstituteDataAttribute、Frozen 機制、Greedy 建構策略。包含 IMapper (AutoMapper/Mapster) 等特殊相依性的客製化處理。 Make sure to use this skill whenever the user mentions AutoFixture with NSubstitute, auto-mocking, AutoNSubstituteCustomization…

kevintsengtw/dotnet-testing-agent-skills · 217 tokens

dotnet-testing-bogus-fake-data

使用 Bogus 產生擬真假資料的專門技能。當需要產生真實感的姓名、地址、電話、Email、公司資訊等測試資料時使用。涵蓋 Faker 類別、多語言支援、自訂規則、大量資料產生等。 Make sure to use this skill whenever the user mentions Bogus, Faker, fake data, realistic test data, generating names/addresses/emails, or seed data, even if they don't explicitly ask for fake data guidance. Keywords: bogus…

kevintsengtw/dotnet-testing-agent-skills · 178 tokens