New to Claude Skills? Learn how to install them →

google-gemini on GitHub

Code Reviewer

OfficialFree

Conduct thorough code reviews with ease.

Get this skill

Free · Opens the source repo

What Code Reviewer does

The Code Reviewer skill is designed to facilitate professional and comprehensive code reviews, whether for local changes or remote Pull Requests (PRs). It streamlines the review process by allowing users to specify their review target, making it easy to switch between reviewing local code changes and remote PRs. By leveraging the GitHub CLI, users can effortlessly check out PRs and prepare for reviews by running project-specific verification suites, ensuring that any automated failures are caught early in the process.

Once the review target is set, the skill guides users through an in-depth analysis of the code based on critical pillars such as correctness, maintainability, readability, efficiency, security, edge case handling, and testability. This structured approach ensures that no aspect of the code is overlooked. The skill also emphasizes the importance of providing constructive feedback, encouraging users to summarize their findings clearly and professionally, which helps maintain a positive collaborative environment.

The skill is particularly beneficial for developers and teams looking to enhance their code quality and maintain high standards in their projects. By focusing on both the technical and interpersonal aspects of code reviews, it supports developers in not only identifying issues but also in fostering a culture of continuous improvement and learning within their teams.

In addition, the Code Reviewer skill includes a cleanup step for remote PRs, allowing users to easily switch back to their default branch after completing the review. This attention to detail further streamlines the workflow, making it a valuable tool for any development team aiming to improve their code review process.

When to use it

Use this skill when you need to perform a code review for either local changes or remote Pull Requests, ensuring adherence to project standards.

When not to use it

This skill may not be suitable for quick, informal code checks or when working in environments where automated tools are already in place for code review.

What you can build with it

Reviewing Local Changes

Use this skill to analyze your current local code changes, ensuring they meet project standards before committing.

Evaluating Remote Pull Requests

Quickly check out and review remote PRs by number or URL, streamlining the collaboration process with your team.

Providing Constructive Feedback

Utilize the skill's structured feedback system to deliver clear and professional insights on code quality and improvements.

How to install Code Reviewer

View source

1. Install with the skills CLI

npx skills add google-gemini/gemini-cli/code-reviewer --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by google-gemini

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).

Frequently asked questions about Code Reviewer

Similar skills