review

nijaru's avatarfrom nijaru

Code review using parallel subagents.

⭐3stars🔀0forks📁View on GitHub🕐Updated Jan 10, 2026⬇️1downloads

When & Why to Use This Skill

This Claude skill automates comprehensive code reviews by orchestrating three specialized parallel subagents focused on correctness, safety, and quality. It intelligently detects the review scope from git diffs or specific paths, identifies logic errors, security vulnerabilities, and design smells, and delivers a prioritized, actionable summary to streamline the development workflow and ensure high-quality software delivery.

Use Cases

  • Automated Pull Request Reviews: Streamline the PR process by automatically analyzing code changes for logic bugs, boundary conditions, and edge cases before human intervention.
  • Security & Vulnerability Auditing: Identify critical security risks such as hardcoded secrets, injection vulnerabilities, and improper input validation across new code changes.
  • Technical Debt & Quality Control: Evaluate codebases for design smells, over-engineering, and non-idiomatic patterns to maintain long-term maintainability and performance.
  • Pre-push Validation: Use as a local gatekeeper to catch 'must-fix' errors and silent failures in staged changes before they reach the remote repository.
namereview
descriptionCode review using parallel subagents.
allowed-toolsRead, Grep, Glob, Bash, Task

Code Review

Code review using 3 parallel subagents. Scope detected automatically.

Workflow

  1. Detect scope (see below)
  2. Launch 3 parallel reviewer subagents
  3. Aggregate findings by severity, deduplicate
  4. Report summary with actionable items

Scope Detection

# Priority order:
# 1. User provided specific files/paths? -> Review those
# 2. Feature branch? -> diff vs main
# 3. Upstream remote? -> diff vs upstream/main
# 4. Version tags? -> diff vs last tag
# 5. Unpushed commits? -> diff vs origin/main
# 6. Staged changes? -> git diff --cached
# 7. Unstaged changes? -> git diff
# 8. Nothing -> inform user

Parallel Subagents

Launch all 3 in parallel using Task tool with subagent_type: reviewer:

Agent 1: Correctness

Logic and functional correctness.

  • Logic errors, off-by-one, boundary conditions
  • Null/undefined handling
  • State consistency (partial failures)
  • Race conditions (if concurrent)
  • Edge cases: empty, max, negative, zero
  • Control flow correctness
  • Algorithm correctness

Agent 2: Safety

Security and error handling (defensive thinking).

  • Input validation at boundaries
  • Hardcoded secrets, credentials
  • Injection: SQL, XSS, command, path traversal
  • Auth/authz checks
  • Sensitive data in logs
  • Silent failures, empty catch blocks
  • Error propagation (swallowed vs bubbled)
  • Fallback behavior hiding problems
  • Resource cleanup on error

Agent 3: Quality

Design, performance, and idioms.

  • Fits existing patterns?
  • Single responsibility
  • Over-engineering (future problems?)
  • Code smells: long functions (>40 lines), large files (>400 lines)
  • Dead code, unused variables
  • Naming: intention-revealing, proportional to scope
  • No _v2, _new suffixes
  • Unnecessary allocations (String vs &str, Vec vs &[T])
  • O(n²) where O(n) possible
  • Blocking I/O in async, N+1 queries
  • Language idioms (Rust/Python/Go/TS)

Subagent Prompt

Review code changes for [FOCUS: Correctness | Safety | Quality].

Scope: [diff or files]

Report issues with confidence >= 80%. Format:

[SEVERITY] file:line - Issue
  -> Fix

Severities:
- ERROR: Must fix (bugs, security, silent failures)
- WARN: Should fix (smells, performance)
- NIT: Optional (style, minor)

Be thorough. No false positives. Only flag what you're confident about.

Aggregation

  1. Deduplicate (same issue from multiple agents = 1 issue)
  2. Sort: ERROR → WARN → NIT
  3. Group by file

Output Format

## Review Summary

Scope: [X files, Y lines]
Issues: ERROR: X, WARN: X, NIT: X

## Critical (must fix)

[ERROR] file:line - Issue
  -> Fix

## Important (should fix)

[WARN] file:line - Issue
  -> Fix

## Minor

[NIT] file:line - Issue
  -> Fix

## Strengths

- What's done well

## Verdict

LGTM / LGTM with nits / Needs work

Quick Review (small changes)

For < 50 lines, review directly without subagents:

  • Logic correct, edge cases handled
  • Errors handled, not swallowed
  • No security issues
  • No debug statements
  • Naming clear
  • Fits existing patterns