Skip to main content
skill CX Codex

code-review · codewithmukesh — Claude Code skill: Roslyn MCP review for .NET

Multi-dimensional .NET code review: Roslyn MCP catches antipatterns and diagnostics, manual review covers the risky paths first.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add codewithmukesh/dotnet-claude-kit --skill code-review -a claude-code
Open on GitHub

What code-review does

The skill reviews .NET changes across five dimensions: correctness, security, performance, architecture compliance and test coverage. It starts by scoring blast radius — how far a change ripples. A one-line middleware edit outranks a 300-line rename, so review depth follows the radius, not the diff size.

Before reading any file it runs Roslyn MCP tools: detect_antipatterns flags async void, DateTime.Now, new HttpClient() and broad catch blocks, while get_diagnostics surfaces new warnings and nullability issues. Then find_references and get_dependency_graph show how many consumers a modified API has and where the effects spread. Boundary rules are checked with get_project_graph and detect_circular_dependencies.

Manual review follows a fixed order: data access, security, concurrency, integration, correctness, tests. Style and naming come last, because formatters and analyzers already own them. Every finding lands in Critical, Warnings or Suggestions and states the file and line, why it matters, and how to fix it. The analysis steps need a configured Roslyn MCP server — without it they simply won't run.

What it helps with

  • catch N+1 queries and a missing CancellationToken before merge
  • confirm every endpoint has [Authorize] or [AllowAnonymous]
  • estimate how many consumers a public API change breaks
  • spot layer violations and circular dependencies
  • decide where review effort goes on a large diff

Example prompts for the agent

  • /code-review the changes in this PR
  • review the Orders module, focus on data access and security
  • what should I review in this branch before merging?

How to install code-review

1Skills CLI (Vercel)

npx skills add codewithmukesh/dotnet-claude-kit --skill code-review -a claude-code

2Manually: put the files in place

~/.claude/skills/code-review/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/code-review/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about code-review

How do I install code-review in Claude?

Run npx skills add codewithmukesh/dotnet-claude-kit --skill code-review -a claude-code. The skill lands at ~/.claude/skills/code-review/SKILL.md.

What does code-review do?

It pairs Roslyn MCP analysis with a manual pass ordered by risk, then returns findings sorted into Critical, Warnings and Suggestions. Style and formatting are left out on purpose.

How is code-review different from a normal editor review?

It prioritises by blast radius — data access, security, concurrency and integration boundaries first, naming and formatting last. The analysis steps require a configured Roslyn MCP server.

Source text

SKILL.md · MIT
---
name: code-review
description: >
  MCP-powered multi-dimensional code review for .NET projects. Uses Roslyn
  analysis tools for antipatterns, diagnostics, references, and dependency
  graphs combined with structured manual review. Prioritizes effort with
  blast-radius scoring — data access, security, concurrency, and integration
  boundaries before style — and produces severity-categorized findings with
  actionable fixes. Use when: "review", "code review", "PR review", "review
  this", "review my code", "check code quality", "review changes", "what
  should I review", "review priorities", "blast radius", "critical path".
---

# /code-review — MCP-Powered Code Review

## What

Performs a multi-dimensional code review combining Roslyn MCP analysis with
structured manual review. Effort follows the 80/20 rule: the 20% of code that
causes 80% of incidents (data access, security, concurrency, integration
boundaries) gets thorough review; style and formatting are left to tooling.

Review dimensions: **Correctness** (logic, edge cases, null handling, async
pitfalls), **Security** (auth gaps, injection, secrets, CORS), **Performance**
(N+1, allocations, missing cancellation), **Architecture compliance** (layer
violations, boundary breaches), **Test coverage** (behavior tests for changed
types).

## When

- "Review this", "code review", "PR review", before merging a pull request
- After a major refactor to verify no regressions or design drift
- "What should I review?" — deciding where review effort goes on a large change
- Onboarding to unfamiliar code and wanting a quality assessment

## How

### Step 1: Scope and Score Blast Radius

Identify changed files (`git diff main...HEAD`, specified files, or module).
Score each change to set review depth — blast radius determines depth, not
line count. A one-line middleware change outranks a 300-line rename.

| Blast Radius | Examples | Depth |
|---|---|---|
| Critical | Middleware, auth, DB migrations, shared kernel, CI/CD | Thorough — every code path |
| High | Public API changes, message consumers, EF configuration, new module | Focused — consumers + behavior |
| Medium | New feature following existing patterns, bug fix, new endpoint | Standard — checklist pass |
| Low | Docs, formatting, renames, logging statements | Glance — build + tests pass |

### Step 2: MCP Analysis (before reading any file)

```
detect_antipatterns(projectFilter: "affected-project")   → async void, DateTime.Now, new HttpClient(), broad catch
get_diagnostics(scope: "project", path: "affected-project") → new warnings, nullability issues
```

Distinguish newly introduced findings from pre-existing ones — focus on new.

### Step 3: Blast Radius Verification

For each modified public API:

```
find_references(symbolName: "ModifiedType")              → count consumers; high count = high risk
get_dependency_graph(symbolName: "ModifiedMethod", depth: 2) → ripple effects
```

Check whether callers handle changed return types and new error cases.

### Step 4: Architecture Compliance

Verify dependency direction (Domain → nothing; Infrastructure → Application →
Domain) via `get_project_graph` and `detect_circular_dependencies`. Per
architecture: VSA features don't cross-reference; Clean Architecture domain has
zero project references; Modular Monolith modules communicate only via
integration events — `find_references` on a module's DbContext should resolve
only inside that module.

### Step 5: Manual Review — Priority Order

Review what tools can't catch, highest-risk areas first:

| Priority | Area | Check |
|---|---|---|
| 1 | Data access | N+1 (missing `Include`/projection), raw SQL with user input, missing `CancellationToken` |
| 2 | Security | Every endpoint has explicit `[Authorize]`/`[AllowAnonymous]`, input validated, no secrets in code, no PII in logs |
| 3 | Concurrency | Token propagated end-to-end, no `.Result`/`.Wait()`, thread-safe shared state |
| 4 | Integration | Retry/timeout on external calls, consumer idempotency, no swallowed exceptions |
| 5 | Correctness | Business logic, edge cases (empty/null/concurrent), entities mapped to DTOs at the boundary |
| 6 | Tests | Behavior tested (not implementation); happy path + main error case covered |
| — | Style/naming | Mention only after the above; formatters and analyzers own this |

### Step 6: Produce the Review

Every finding states what's wrong, why it matters, and how to fix it. Never
bury a security bug under naming nits.

```markdown
## Code Review: [Scope]

### Summary
[1-3 sentences: scope, risk level, recommendation]

### Critical (must fix before merge)
- **[Title]** — [file:line] [What's wrong. Why it matters. How to fix.]

### Warnings (should fix, creates tech debt)
- **[Title]** — [file:line] [...]

### Suggestions (nice to have)
- **[Title]** — [file:line] [...]

### Architecture Compliance
[PASS/WARN with boundary-violation notes]

### Test Coverage
[Which changed types have tests; specific scenarios to add]

### What's Good
- [Always include — reinforce good patterns]
```

**Quick review** (1-2 files, low blast radius): run `detect_antipatterns` +
`get_diagnostics`, read for correctness, output Summary + Issues + What's Good.

## Example

```
User: /code-review the changes in this PR

Claude: 7 changed files across 3 projects. CreateOrder touches data access
and a public endpoint — High blast radius. Running MCP analysis...

## Code Review: Order Processing Feature

### Summary
Adds CreateOrder/GetOrder endpoints with EF Core persistence. Well-structured
VSA feature. Two issues need attention before merge.

### Critical (must fix before merge)
- **Missing CancellationToken propagation** — CreateOrder.cs:38
  SaveChangesAsync() called without the token. Client disconnects keep
  burning server resources. Pass `ct` from the handler parameter.

### Warnings (should fix, creates tech debt)
- **N+1 query in GetOrder** — GetOrder.cs:25
  Order loaded without `.Include(o => o.Items)`; one lazy load per item
  during serialization. Eager-load or use a projection.

### Suggestions (nice to have)
- **Seal the handler** — CreateOrderHandler.cs:10
  Not designed for inheritance; `sealed` enables devirtualization.

### Architecture Compliance
PASS — all changes within Features/Orders/, no layer violations.

### Test Coverage
Happy path covered. Add tests for validation failure and not-found.

### What's Good
- Clean command/query separation; FluentValidation covers edge cases
- Response DTOs are records, no entity leaks
```

## Related

- `/de-sloppify` — Cleanup pass for the style/formatting issues review skips
- `/verify` — Automated verification pipeline (complements manual review)
- `/health-check` — Broader project health assessment beyond a single PR

© codewithmukesh · MIT · codewithmukesh/dotnet-claude-kit

Similar skills

Everything for Code review and refactoring →

code-review by other authors comes first.

code-review Matt Pocock Reviews changes from a chosen reference point against repository standards and the originating spec. Use it for a branch, PR, or work in progress. 789,521installs code-review official anthropics The skill reviews diffs and pull requests for security, performance and correctness. Useful when a change needs a look before merging. CX Codex +1 9,900installs code-review agno-team Automated code inspection for style violations, bugs, and best-practice gaps. The skill runs linting, identifies issues, and delivers structured feedback with severity levels. CX Codex +1 472installs code-review coderabbitai Runs CodeRabbit CLI reviews and feeds structured findings back to the agent. Helpful for catching bugs, security risks, and code quality issues before merging. CX Codex +1 14,800installs code-review getsentry A skill that reviews pull requests and code changes against Sentry engineering practices: security, performance, tests, design. CX Codex +1 5,500installs dotnet-design-pattern-review official github Reviews selected C#/.NET code for design patterns and suggests improvements without editing files. Use it when you need an architecture-focused code review. 11,609installs csharp-refactoring dotnet A skill that refactors C#/.NET code without changing behavior: it classifies the request first, edits by bindings, then confirms the result with a build and tests. CX Codex +1 1,800installs find-untested-sources dotnet Finds source files lacking corresponding tests using static AST parsing without project builds. Useful for coding agents before generating new test suites. CX Codex +1 3,100installs type-design-performance Aaronontheweb A skill that steers .NET type design toward performance: sealed classes, readonly structs, deferred enumeration, the right collection for the job. CX Codex +1 655installs api-breaking-change-detector official github Cross-references C# Web API controllers and DTOs against TypeScript or JavaScript clients in source code. Catches breaking contract drift before deployment. 23installs dotnet-slopwatch Aaronontheweb Detects LLM reward hacking in .NET code, catching disabled tests, silenced compiler warnings, and empty catch blocks. It validates changes right after an agent makes them. CX Codex +1 552installs

From the same set46

ddd A skill that teaches the agent Domain-Driven Design tactical patterns for .NET: aggregates, value objects, domain events, strongly-typed IDs and aggregate repositories. CX Codex +1 2,900installs clean-architecture A skill that lays out .NET code across four projects, keeps dependencies pointing inward, and shows where use case handlers belong. CX Codex +1 3,000installs verify Runs a .NET project check before review, covering builds, tests, security, formatting, and changed files. CX Codex +1 2,800installs project-setup Recommends .NET tech stack defaults for databases, auth, caching, and messaging. Helps pick stack defaults or review dependencies before writing code. CX Codex +1 2,800installs instinct-system Captures code patterns, user corrections, and project findings in separate stores. Use it when an agent needs to retain lessons from recurring work. CX Codex +1 2,800installs container-publish Builds OCI images straight from dotnet publish /t:PublishContainer, no Dockerfile involved. Useful when a .NET 10 app has to ship as a container and land in a registry. CX Codex +1 2,800installs workflow-mastery Workflow guide and configurations for .NET development in Claude Code. It introduces parallel sessions via git worktrees, verification loops, and context budgeting. CX Codex +1 2,800installs aspire Guides .NET Aspire setup for local service orchestration, resource wiring, and service discovery. Use it when working with AppHost or shared service defaults. CX Codex +1 2,800installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor