Skip to content
Back to skills

Review Local

ASecurity

Orchestrated code review of git diff using parallel agents. Standard mode (diff-scoped) or full mode (adds Roslyn semantic analysis). Produces severity-grouped plan.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 6, 2026
code-qualitygorefactoringcode-reviewgitsecurityperformance

Works with

  • mcp

Security analysis

A100/100

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

Scanned October 6, 2026

npx -y skills add e128/dotnet-reference --skill review-local --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Review Local?

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

Security grade badge for Review Local
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/e128-review-local/badge)](https://www.skillsdirectory.com/skills/e128-review-local)

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: review-local
description: >
  Orchestrated code review of git diff using parallel agents. Standard mode (diff-scoped)
  or full mode (adds Roslyn semantic analysis). Produces severity-grouped plan.
when_to_use: "dispatched by review router"
argument-hint: "[--full] [days N | commits N] [--perf] [--test-quality] [dry run] [critical only]"
user-invocable: true
---

# Review: Local Mode

Comprehensive code review using orchestrated agents. Discovers changed .NET files from git history, dynamically identifies code review agents, runs them in parallel, and produces a consolidated report grouped by severity.

**Standard mode (default):** Day-to-day review, fast turnaround, diff-scoped agent review only.
**Full mode (`--full`):** Pre-ship review, maximum coverage, adds solution-wide Roslyn semantic analysis (antipatterns + circular dependencies).

## Usage

```
code review days 1            # Standard
review --full last 3 days     # Full 3-vector
dry run                       # Preview only
critical only                 # Filter to CRITICAL
--perf                        # Spawn a performance-focused review agent
--test-quality                # Load enriched test rubric
```

## Scope Parameters

| Pattern in user message          | Scope                                           |
|----------------------------------|-------------------------------------------------|
| `days N` / `last N days`         | `scripts/diff.sh --days N --files`              |
| `commits N` / `last N commits`   | `scripts/diff.sh --commits N --files`           |
| `dry run` / `preview`            | Discovery only, no agents                       |
| `critical only` / `high+`        | Filter report by min severity                   |
| `--perf`                         | Spawn a performance-focused review agent on diff scope |
| `--test-quality`                 | Inject enriched Test Quality Rubric              |

If no scope is provided, ask for one.

## --perf and --test-quality Flags

**--perf:** Spawn a performance-focused review agent on diff scope in addition to normal review agents, using the anti-pattern catalog in [references/perf-patterns.md](references/perf-patterns.md). Findings merged into report.

**--test-quality:** Load enriched Test Quality Rubric from [references/review-rubrics.md](references/review-rubrics.md) and inject into agent prompts for `tests/**/*.cs` files.

## How It Works

### Phase 1: Discovery

Run in parallel: no ordering dependency:
- Parse arguments from user input
- Gather change context: `scripts/diff.sh --json`, with `--days N` or `--commits N` when the scope names one
- Discover agents dynamically: read `.claude/agents/`. Filter to code-review-relevant agents (include: code, review, check, fix, validate, compliance, security, quality, refactor, build, test, warning, diagnostic, concurrency, performance, exclude: pipeline, sanitizer, lode, corpus, mhtml, markdown, web, fetch, download)

From diff: filter to .NET files. Classify each changed file with `scripts/internal/mechanical-diff.sh --json`, files marked `MECHANICAL` (every changed token is a pure namespace-prefix substitution) are excluded from deep review. Generate unified diff. Pick per-agent-slice diff delivery with `scripts/internal/cr-diff-deliver.sh <difffile>`, it emits `inline` / `write <path>` / `split <paths…>` by the 30KB/40KB thresholds (writing to `.claude/tmp/cr-<name>.diff` or splitting at file boundaries). Clean up `.claude/tmp/cr-*.diff` after completion.

### Phase 2: Execution

**Vector 1: Code-Review Agents (always runs)**
Spawn agents in parallel: pass each the unified diff and severity rules. Include: "Review only the diff provided. Flag pre-existing concerns as 'adjacent concern' without investigating." Handle timeouts/errors gracefully.

**Vector 2: Roslyn Navigator (--full only)**
Run MCP calls in main context (session-only):
1. `mcp__cwm-roslyn-navigator__detect_antipatterns` with the solution file
2. `mcp__cwm-roslyn-navigator__detect_circular_dependencies` with the solution file

Severity mapping: Circular (cross-project) → HIGH, Circular (namespace) → MEDIUM, Antipatterns → MEDIUM, Generated code → SKIP, Informational → LOW.

Graceful degradation: if MCP unavailable, note "Roslyn navigator: MCP server not running, skipped".

### Phase 3: Plan Generation

See [references/implementation.md](references/implementation.md) for full orchestration details: dedup algorithm, severity grouping, plan file format (plan.md/tasks.md/context.md), report template, and analyzer-candidate mining integration.

### Phase 4: Exit

1. Offer to execute the plan if CRITICAL or HIGH issues
2. Spawn the `analyzer-review-miner` agent in background to mine findings for new analyzer candidates
3. Return exit code: 0 (clean/LOW), 1 (MEDIUM/HIGH), 2 (CRITICAL)

## Severity Classification

| Severity     | Description              | Examples                                          |
|--------------|--------------------------|---------------------------------------------------|
| **CRITICAL** | Blocks shipping          | Build failures, security vulns, race conditions   |
| **HIGH**     | Must fix before merge    | Analyzer errors, concurrency, perf regressions    |
| **MEDIUM**   | Should fix               | Code smells, refactoring, missing XML docs        |
| **LOW**      | Nice to have             | Style preferences, minor optimizations            |

## Review Rubrics

Seven rubric checklists in [references/review-rubrics.md](references/review-rubrics.md). Inject relevant sections into agent prompts based on diff content. Eighth rubric for multi-file consistency in [references/cross-file-consistency.md](references/cross-file-consistency.md).

## References

- [references/compliance-and-format.md](references/compliance-and-format.md)
- [references/review-rubrics.md](references/review-rubrics.md)
- [references/cross-file-consistency.md](references/cross-file-consistency.md)
- [references/error-handling.md](references/error-handling.md)
- [references/implementation.md](references/implementation.md)
- [references/clanker-patterns.md](references/clanker-patterns.md)
- [references/perf-patterns.md](references/perf-patterns.md)

Files in this skill

  • SKILL.md6.1 KB
  • references/clanker-patterns.md8.8 KB
  • references/compliance-and-format.md2.8 KB
  • references/cross-file-consistency.md3.2 KB
  • references/error-handling.md928 B
  • references/implementation.md8.7 KB
  • references/perf-patterns.md8.5 KB
  • references/review-rubrics.md21 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.

Comments

Loading comments…