Skill Productivity

code-review

The Code Review plugin adds a `/code-review` command that reviews pull requests by running multiple specialized agents in parallel. It scores each issue for confidence and posts only issues scoring 80 or higher, to filter out false positives.

  • 37.6k GitHub stars
brew install gh
code-review preview image

What it is

The Code Review Plugin automates pull request review. It launches multiple agents in parallel, and each one independently audits the changes from a different perspective. Confidence scoring then filters out false positives, so only high-quality, actionable feedback gets posted. Its single command, /code-review, works through these steps: 1. Checks whether a review is needed, skipping closed, draft, trivial, or already-reviewed PRs. 2. Gathers relevant CLAUDE.md guideline files from the repository. 3. Summarizes the pull request changes. 4. Launches four parallel review agents. 5. Scores each issue. 6. Filters out low-confidence issues. 7. Posts a review comment. The four agents have distinct roles: - Agents #1 and #2 audit for CLAUDE.md compliance, giving redundancy for guideline checks. - Agent #3 scans for obvious bugs in the changes only. - Agent #4 analyzes git blame and history for context-based issues. Additional confidence scorers, one per issue, rate each issue independently from 0 to 100 based on evidence strength and verification. For CLAUDE.md issues, the scorer verifies that the guideline explicitly mentions the problem. The default threshold is 80, and issues below it are filtered out. The filter removes several kinds of false positives: - Pre-existing issues not introduced in the PR - Code that looks like a bug but isn't - Pedantic nitpicks - Issues linters will catch - General quality issues, unless they are covered in CLAUDE.md - Issues with lint ignore comments The posted comment lists each issue with a short explanation, which may cite the relevant CLAUDE.md rule. Each issue links directly to the code using a full SHA and line ranges. If no issue scores 80 or higher, no comment is posted. The plugin uses the GitHub CLI (gh) to view PR details and diffs, fetch repository data, read git blame and history, and post review comments. You can customize it by editing commands/code-review.md. There you can change the confidence threshold, or add agent tasks such as security, performance, accessibility, or documentation quality checks.

Who it's for

  • Developers and teams reviewing pull requests on GitHub
  • Repositories that maintain CLAUDE.md guideline files and want compliance checking
  • Teams with PRs touching critical code paths or coming from multiple contributors
  • Teams wanting automated review as part of their PR or CI/CD workflow

Requirements

Requirements

  • Git repository with GitHub integration
  • GitHub CLI (gh) installed and authenticated
  • CLAUDE.md files (optional but recommended for guideline checking)

Setup

  1. Plugin availability

    This plugin is included in the Claude Code repository. The command is automatically available when using Claude Code.

  2. Install GitHub CLI

    Install the GitHub CLI on macOS with Homebrew, or see the GitHub CLI installation page (https://cli.github.com/).

    bash
    brew install gh
  3. Authenticate GitHub CLI

    Authenticate the GitHub CLI, then verify that the repository has a GitHub remote.

    bash
    gh auth login

هالبلَگن بيعطيك أمر `/code-review` بيراجع الـ pull requests عن طريق كذا agent شغّالين بنفس الوقت. بيعطي كل مشكلة علامة ثقة، وما بينشر غير المشاكل اللي علامتها 80 أو أكتر، فبتخلص من الإنذارات الغلط.

Examples

Run a code review

bash
bash
/code-review

What it does: Performs an automated code review on the pull request using multiple specialized agents.

Example workflow on a PR branch

bash
bash
# On a PR branch, run:
/code-review

# Claude will:
# - Launch 4 review agents in parallel
# - Score each issue for confidence
# - Post comment with issues ≥80 confidence
# - Skip posting if no high-confidence issues found

What it does: Shows what happens when the command runs on a PR branch, including the confidence filtering.

Standard PR review workflow

bash
bash
# Create PR with changes
/code-review

# Review the automated feedback
# Make any necessary fixes
# Merge when ready

What it does: Shows where the command fits in a typical pull request workflow.

Adjusting the confidence threshold

markdown
markdown
Filter out any issues with a score less than 80.

What it does: This line lives in commands/code-review.md. Change 80 to your preferred threshold (0-100).