PluginBench
Skill
Official
Review
Audit score 70

code-reviewer

google-gemini/gemini-cli

Review code changes and pull requests for correctness, maintainability, and project standards.

What is code-reviewer?

This skill guides agents in conducting thorough code reviews for both local file changes and remote GitHub Pull Requests. It analyzes code across correctness, maintainability, readability, efficiency, security, error handling, and test coverage, then provides structured feedback with clear recommendations.

  • Review local staged and working tree changes or remote PRs by number/URL
  • Analyze code for correctness, maintainability, readability, efficiency, security, and edge case handling
  • Run project preflight verification suites to catch automated failures early
  • Provide structured feedback with critical issues, improvement suggestions, and nitpicks
  • Checkout and review remote PRs using GitHub CLI
  • Suggest additional test cases to improve coverage and robustness

How to install code-reviewer

npx skills add https://github.com/google-gemini/gemini-cli --skill code-reviewer
Prerequisites
  • Git repository initialized and configured
  • GitHub CLI (gh) installed for remote PR reviews
  • npm run preflight command available in project (optional but recommended)
Claude Code
Cursor
Windsurf
Cline

How to use code-reviewer

  1. 1.Provide a PR number/URL (e.g., 'Review PR #123') for remote reviews, or ask to review local changes
  2. 2.For remote PRs: agent will checkout the PR and run preflight checks; for local changes: agent will examine git status and diffs
  3. 3.Agent analyzes the code across seven pillars: correctness, maintainability, readability, efficiency, security, error handling, and testability
  4. 4.Review feedback is provided in structured format with summary, categorized findings, and clear recommendation
  5. 5.For remote PRs, optionally switch back to the default branch after review completion

Use cases

Good for
  • Review a colleague's pull request before merge to catch bugs and quality issues
  • Audit local code changes before committing to ensure they meet project standards
  • Assess security and performance implications of code modifications
  • Evaluate test coverage and suggest additional test cases for new functionality
  • Conduct pre-submission code review on local changes to improve code quality
Who it's for
  • Software developers and engineers
  • Code reviewers and maintainers
  • Teams following code review best practices
  • Projects with automated preflight checks

code-reviewer FAQ

Can this skill review both local and remote changes?

Yes. It reviews local staged/unstaged changes by default, or remote PRs if you provide a PR number or URL.

What does the preflight check do?

It runs npm run preflight to execute the project's standard verification suite and catch automated failures early.

What are the main review criteria?

Correctness, maintainability, readability, efficiency, security, edge case handling, and test coverage.

Does the skill suggest test cases?

Yes. It evaluates test coverage and suggests additional test cases to improve robustness.

What happens after a remote PR review?

The agent asks if you want to switch back to the default branch (main or master).

Full instructions (SKILL.md)

Source of truth, from google-gemini/gemini-cli.


name: code-reviewer description: Use this skill to review code. It supports both local changes (staged or working tree) and remote Pull Requests (by ID or URL). It focuses on correctness, maintainability, and adherence to project standards.

Code Reviewer

This skill guides the agent in conducting professional and thorough code reviews for both local development and remote Pull Requests.

Workflow

1. Determine Review Target

  • Remote PR: If the user provides a PR number or URL (e.g., "Review PR #123"), target that remote PR.
  • Local Changes: If no specific PR is mentioned, or if the user asks to "review my changes", target the current local file system states (staged and unstaged changes).

2. Preparation

For Remote PRs:

  1. Checkout: Use the GitHub CLI to checkout the PR.
    gh pr checkout <PR_NUMBER>
    
  2. Preflight: Execute the project's standard verification suite to catch automated failures early.
    npm run preflight
    
  3. Context: Read the PR description and any existing comments to understand the goal and history.

For Local Changes:

  1. Identify Changes:
    • Check status: git status
    • Read diffs: git diff (working tree) and/or git diff --staged (staged).
  2. Preflight (Optional): If the changes are substantial, ask the user if they want to run npm run preflight before reviewing.

3. In-Depth Analysis

Analyze the code changes based on the following pillars:

  • Correctness: Does the code achieve its stated purpose without bugs or logical errors?
  • Maintainability: Is the code clean, well-structured, and easy to understand and modify in the future? Consider factors like code clarity, modularity, and adherence to established design patterns.
  • Readability: Is the code well-commented (where necessary) and consistently formatted according to our project's coding style guidelines?
  • Efficiency: Are there any obvious performance bottlenecks or resource inefficiencies introduced by the changes?
  • Security: Are there any potential security vulnerabilities or insecure coding practices?
  • Edge Cases and Error Handling: Does the code appropriately handle edge cases and potential errors?
  • Testability: Is the new or modified code adequately covered by tests (even if preflight checks pass)? Suggest additional test cases that would improve coverage or robustness.

4. Provide Feedback

Structure

  • Summary: A high-level overview of the review.
  • Findings:
    • Critical: Bugs, security issues, or breaking changes.
    • Improvements: Suggestions for better code quality or performance.
    • Nitpicks: Formatting or minor style issues (optional).
  • Conclusion: Clear recommendation (Approved / Request Changes).

Tone

  • Be constructive, professional, and friendly.
  • Explain why a change is requested.
  • For approvals, acknowledge the specific value of the contribution.

5. Cleanup (Remote PRs only)

  • After the review, ask the user if they want to switch back to the default branch (e.g., main or master).