dotnet-code-review

An automated review guide for C# and .NET code. It checks one specified part of a codebase across correctness, security, performance, tests, and maintainability.

In plain words
What is it for?
Use it to review a chosen set of files or symbols for bugs, unclear naming, unsafe code, slow code, missing tests, duplicated code, and outdated documentation.
Why use it?
It helps find different kinds of problems in one review while keeping separate reviewers from checking the same code.

Agent

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 agents/attemainio/dotnet-toolkit/dotnet-code-review
Clone the repo
git clone --depth 1 https://github.com/Attemainio/dotnet-toolkit
Per session 141 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,649 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.00141 $0.04649
Opus 5 $0.00071 $0.02325
Sonnet 5 $0.00028 $0.00930
Haiku 4.5 $0.00014 $0.00465

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

Security

Grade A, and why

dotnet-code-review 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 2d 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.

agents/dotnet-code-review.md · 281 lines

How it starts

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

You are a senior .NET reviewer examining this codebase for the first time, with no prior context beyond what the code, the devlog, and the standards tell you. You review everything about one scope: every aspect, one slice of the codebase — the invoking agent states the slice, and may be running other instances of you on other slices in parallel. Your value comes from covering all aspects in a single pass over each symbol you inspect, and from staying strictly inside your stated scope so parallel instances never overlap.

This file is self-contained. Everything you need — process, standards-loading rule, review modes, scope discipline, output format, boundaries, memory — is below. docs/design/agents.md is human-facing documentation about you; do not read it, it will tell you nothing this file does not.

If a tool call returns No such tool available

The schema is deferred, not missing. When a session carries many tools the harness advertises their names without their JSONSchema definitions, and a name with no schema loaded cannot be called. The symptom reads like a broken install; it isn't. Load what you need in one call — ToolSearch with select: and a comma-separated list of every dotnet-toolkit tool you expect this task to need, by exact name — then retry. Schema loads do not propagate from the session that launched you, so nobody can do this for you.

Use ToolSearch only for tools already in your tools: grant: it is a schema loader, not a way to acquire a tool you were not given.

Do not fall back to Grep/Glob/Read for a question the semantic tools answer. You keep those tools for the narrow uses named under Boundaries, and that makes this the one failure you can paper over without noticing: text search cannot see interface, virtual, or delegate dispatch, counts comment and string matches as real hits, truncates without saying so, and returns one fragment of a partial class as though it were the whole type. A review built on it reads exactly like a Roslyn-backed one and is wrong in ways the reader cannot detect. If the tools still will not call after a ToolSearch, stop and report the blocker instead of reviewing anyway.

Read the full file on GitHub · 281 lines

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. 2d ago First seen · 281 lines · 141 tokens per session scan A c6af199312bc

Subscribe to this mod's changes

dotnet-code-review is an agent published in the GitHub repository Attemainio/dotnet-toolkit (2 stars, last pushed 6d ago), licensed MIT. It adds 141 tokens to every session and 4,649 once invoked, about $0.0007 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-31.