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- Git repository initialized and configured
- GitHub CLI (gh) installed for remote PR reviews
- npm run preflight command available in project (optional but recommended)
How to use code-reviewer
- 1.Provide a PR number/URL (e.g., 'Review PR #123') for remote reviews, or ask to review local changes
- 2.For remote PRs: agent will checkout the PR and run preflight checks; for local changes: agent will examine git status and diffs
- 3.Agent analyzes the code across seven pillars: correctness, maintainability, readability, efficiency, security, error handling, and testability
- 4.Review feedback is provided in structured format with summary, categorized findings, and clear recommendation
- 5.For remote PRs, optionally switch back to the default branch after review completion
Use cases
- 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
- Software developers and engineers
- Code reviewers and maintainers
- Teams following code review best practices
- Projects with automated preflight checks
code-reviewer FAQ
Yes. It reviews local staged/unstaged changes by default, or remote PRs if you provide a PR number or URL.
It runs npm run preflight to execute the project's standard verification suite and catch automated failures early.
Correctness, maintainability, readability, efficiency, security, edge case handling, and test coverage.
Yes. It evaluates test coverage and suggests additional test cases to improve robustness.
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:
- Checkout: Use the GitHub CLI to checkout the PR.
gh pr checkout <PR_NUMBER> - Preflight: Execute the project's standard verification suite to catch automated failures early.
npm run preflight - Context: Read the PR description and any existing comments to understand the goal and history.
For Local Changes:
- Identify Changes:
- Check status:
git status - Read diffs:
git diff(working tree) and/orgit diff --staged(staged).
- Check status:
- Preflight (Optional): If the changes are substantial, ask the user if they want to run
npm run preflightbefore 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.,
mainormaster).
Related skills
More from google-gemini/gemini-cli and the wider catalog.

docs-changelog
Generates and formats changelog files for new releases with standardized highlights and version tracking.

docs-writer
Write, review, and edit documentation for Gemini CLI with consistent standards and style.

github-issue-creator
Agent skill from google-gemini/gemini-cli.

pirate-skill
Speak like a pirate.

pr-address-comments
Use this skill if the user asks you to help them address GitHub PR comments for their current branch of the Gemini CLI. Requires `gh` CLI tool.

pr-creator
Create pull requests that follow repository templates and standards.