Skip to content
Back to skills

Dotnet Code Review

ASecurity

Reviews .NET/C# diffs against the repository's review methodology and rulebook, detecting one project profile and applicable markers before reporting evidence-backed findings. Use for code review or guideline compliance; do not use for implementation-only questions (use csharp-best-practices or the focused domain skill).

  • 7 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 4, 2026
ai-agentsc#testingcode-reviewapisecurityperformance

Works with

  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned December 4, 2026

npx -y skills add k4ndev/claude-code-dotnet --skill dotnet-code-review --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dotnet Code Review?

Add the live security badge to your README. It updates with every re-scan.

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

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: dotnet-code-review
description: Reviews .NET/C# diffs against the repository's review methodology and rulebook, detecting one project profile and applicable markers before reporting evidence-backed findings. Use for code review or guideline compliance; do not use for implementation-only questions (use csharp-best-practices or the focused domain skill).
---

# .NET Code Review

## Purpose
Deliver a deterministic, evidence-led review of changed .NET code using the supplied methodology for HOW and rulebook for WHAT.

## Scope
Review a diff/PR and only the surrounding code, configuration, callers, tests, and project metadata needed to validate impact. This skill does not implement changes unless the user separately asks to fix findings.

## When to use
- User asks to review, audit, assess, or approve .NET/C# changes.
- User asks whether a patch complies with the supplied guideline.

## Do not use for
- General C# explanation or implementation without review intent: use `csharp-best-practices` or a domain skill.
- Standalone HTTP contract review: use `api-contract-review`; add this skill only when the user requests a full guideline review.
- Generic architecture advice on unchanged code: use `clean-architecture` or `solid-principles`.

## Required context
Read both `references/SKILLS 1.md` and `references/guidline.en.md` before every review. If either is unavailable, state which file is missing and do not claim a guideline-based review. The methodology calls the rulebook `guidline.md` and sometimes uses `Profil` / `İstisna`; in this repository those references resolve to `guidline.en.md` and the rulebook's `Profile:` / `Exception:` fields. Likewise, `SKILLS.md` in the rulebook refers to `references/SKILLS 1.md`. Treat these as terminology aliases, not separate rule systems. The historical `archive/` versions named by the rulebook (`archive/guidline.v1.md`, `archive/guidline.v2.1.md`) are not shipped; never cite them or infer rules from them.

## Workflow
1. Honor the user's explicit profile, scope, language, and output constraints.
2. Detect exactly one base profile from the rulebook's §0 signals: `WebApi`, `MinimalApi`, `Worker`, `Library`, `Console`, `UI`, or `Legacy`. If signals conflict, name both candidates, pick the stronger one, and list the uncertainty under **Needs context**. Only when no signal is detectable, assume `WebApi` as the methodology prescribes, mark the Profile line `(assumed — see Needs context)`, and list the assumption under **Needs context**.
3. Detect zero or more actual markers: `DotnetTemplate`, `EFCore`, `Oracle`, `Messaging`, `gRPC`, `Container`; cite the source evidence, not a package-name guess.
4. Inspect the diff first. Trace affected callers, DI lifetimes, configuration, data flow, deployment assumptions, and relevant tests only as needed.
5. Filter by family matrix, per-rule `Profile:` overrides, markers, changed-code scope, and documented `Exception:`. Check the `SKILLS 1.md` precedence: explicit user instruction, rulebook, visible project conventions, general practice, preference (never a finding).
6. For every candidate, verify a real defect, support, applicability, actionability, proportionality, and a concrete fix. Apply MUST/SHOULD/MAY and analyzer-deduplication rules exactly. A `†` deprecated rule is never a finding; if relevant, cite the replacement rule named in its text. Informational appendix content is never a finding. Mark a `⁺` rule as `(v2 addition)` beside its ID. Never invent or infer a rule ID.
7. Deduplicate by root cause; rank findings and cap at 10 unless the user changes the limit. Identify omitted count/families.
8. Produce the methodology's exact sections: `Summary`, `Findings`, optional `Needs context`, optional `Positive notes`, and `Verdict`; include the mandatory `Profile` line and exactly one supported guideline/general-concern label per finding, then apply the fixed verdict thresholds. Do not execute builds/tests unless asked; never claim checks you did not run.

## Decision rules
- Guideline-supported finding: label `Guideline: FAMILY-NN` verbatim; include `(v2 addition)` for `⁺` rules.
- Real risk not supported by an applicable rule: label `General Engineering Concern (not covered by the guideline)`; do not attach a convenient but unrelated ID.
- Analyzer-covered issues are not duplicates of review findings: report only when the analyzer evidently missed it, was unjustifiably suppressed, or enablement is unknown; group once at Low as prescribed. Codes from optional analyzer packages (`VSTHRD`, `AsyncFixer`, `RS`, `IL`, `CP`) count only when that package or flag is referenced.
- Generated code, vendored code, lock files, and EF Core migrations are excluded from style/naming/docs rules; security and data-loss rules still apply (including destructive migrations, a missing migration for a model change, or an edited applied migration).
- Missing evidence is **Needs context**, not a defect. Documented exceptions suppress a finding.
- Do not report rule families gated off by profile, personal preference, speculative performance, untouched pre-existing issues (except the methodology's narrow Info allowance), or style-only issues in excluded generated/vendor files.

## Severity classification
Use the guideline's five levels (`Critical`, `High`, `Medium`, `Low`, `Info`) and its exact impact descriptions. Start at the default severity and shift at most one level with an evidence-based reason; MUST/SHOULD ceilings and the verdict thresholds are binding. A `SHOULD` with Low default cannot be raised.

## Expected output format
Use the exact prescribed methodology format. Every finding has a changed-code location, one label, problem, impact, and actionable fix; Critical/High/Medium require a fix. Keep IDs, paths, analyzer codes, and code verbatim. Use the user's requested language while retaining the same fields.

## Common mistakes
- Confusing the methodology with the rulebook or using `SKILLS 1.md`'s example filename as a literal path.
- Guessing a profile, applying an irrelevant marker, inventing IDs/severity, or citing a deprecated rule.
- Reporting analyzer-covered style noise twice, treating missing context as evidence, or changing the fixed verdict thresholds.
- Replacing the provided rulebook with generic .NET guidance.

## Edge cases
- Conflicting profile signals: name candidates, select the strongest supported profile, disclose uncertainty.
- Unknown profile: assume `WebApi` only when no signal exists, and mark it assumed in Summary and Needs context.
- No changes/findings: still include Summary, profile, and APPROVE verdict; omit empty optional sections.
- Guideline missing: clearly label any actual finding as a general engineering concern and disclose the limitation.
- The rulebook's `TECH-01` pairs .NET 10 with C# 13, while .NET 10 defaults to C# 14. Preserve the supplied text; the consuming project's effective `TargetFramework` and `LangVersion` are authoritative. Disclose the mismatch when relevant, but do not treat it as a finding by itself or invent a Rule ID.
- The v2.2 rulebook's TECH-01 text says .NET 8 is the minimum LTS baseline. As of 2026-11-25, .NET 8 and .NET 9 are past their stated November 10, 2026 support end; preserve TECH-01 as written, but disclose the dated support conflict and verify Microsoft's current lifecycle before calling a target supported. Do not silently rewrite the supplied guideline or invent an ID.
- The rulebook's `API-12` rejects "MVC `ActionResult` and model-binding attributes in route handlers". Apply it to the MVC model-binding pipeline (`ActionResult`, `[ModelBinder]`, `[BindProperty]`, controller-style binding). Minimal API binding-source attributes (`[FromRoute]`, `[FromQuery]`, `[FromHeader]`, `[FromBody]`, `[FromServices]`, `[AsParameters]`) are supported by ASP.NET Core and are not a finding by themselves. Preserve the supplied text; do not invent an ID.

## Examples
See [review examples](references/review-examples.md) for a valid finding and a deliberately invalid one.

## Test scenarios
- Positive: changed API diff with supported profile/markers activates this skill and only applicable IDs appear.
- Negative: “Explain C# `required` members” does not activate a review workflow.
- Boundary: EF Core query asked as review activates this skill plus `efcore-patterns` only for query semantics; a speed-only question routes to `performance-review` and `efcore-patterns` instead.
- Regression: legacy `guidline.md`/`SKILLS.md` names resolve to the two repository references; deprecated IDs never become findings.

## Related skills
`csharp-best-practices`, `security-audit`, `performance-review`, `api-contract-review`, `efcore-patterns`, `testing-quality`. Use this skill as the review coordinator; delegate only genuinely specialist checks and do not duplicate findings.

## References
- [Review methodology](references/SKILLS%201.md)
- [Authoritative rulebook](references/guidline.en.md)

Files in this skill

  • SKILL.md8.8 KB
  • examples.md627 B
  • references/SKILLS 1.md19.8 KB
  • references/guidline.en.md77.5 KB
  • references/review-examples.md1.6 KB

Attribution

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

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.