Last verified
Code Review Plugin
Editor's PickAnalyze staged diffs and PRs for real bugs, with line-referenced findings by severity
Add marketplace
/plugin marketplace add anthropics/claude-plugins-officialCommands
- /review
"Code review happens before I open the PR, not after someone else merges something wrong."
What is the Code Review Plugin?
The Code Review Plugin is an official Claude Code plugin that puts a /review command in the developer tools workflow. It reads staged diffs or specified file ranges, applies heuristic and model-based analysis, and returns findings with file and line references grouped by severity: errors to fix, warnings to address, suggestions to consider.
How does it work?
After installation via /plugin marketplace add anthropics/claude-plugins-official, the /review command is available in any Claude Code session. The plugin reads the current git diff, chunks it by file, and submits each chunk with context to Claude using a structured review prompt. Findings print with file:line anchors so you can jump straight to the issue.
Teams that also want automated test coverage can combine this plugin with the Test Runner plugin for a complete pre-commit check: review the diff for issues, then run tests to confirm correctness.
When should you use it?
Use the Code Review plugin before every pull request, especially on refactors or cross-cutting changes where a reviewer might miss a quiet regression. It also fits into pair programming sessions when you want a second read without switching tools.
Frequently asked questions
What does the /review command analyze?
By default /review reads all staged changes in the current git working tree. Pass a file path or a commit range (e.g., `/review HEAD~3..HEAD`) to scope the review. The plugin maps findings to line numbers and groups them by severity: error, warning, and suggestion.
Can I customize the review rules the plugin applies?
Yes. Add a `.claude/review-config.json` to your repository to specify languages, style guides, and which severity levels to include. The plugin merges your config with the default ruleset at runtime, so project-specific conventions win.
Does the Code Review plugin post comments to GitHub automatically?
Not by default. It prints findings to the Claude Code terminal. Pass the `--post-pr` flag with a PR URL to push inline review comments via the GitHub API. A `GITHUB_TOKEN` in the environment is required.