Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Skip to main content
CodeRabbit analyzes your code changes and surfaces specific issues, then Claude Code applies fixes based on CodeRabbit’s context-rich feedback.
The command will:
The
Review only committed changes:
Claude Code will interpret this and run the appropriate
🚀 CodeRabbit Agent for Slack - From idea to pull request without leaving Slack. Get started!
Claude Code integration
AI-powered code review in Claude Code through the CodeRabbit plugin. Let AI code, review, and fix issues autonomously without human intervention.
Autonomous AI development workflows
The CodeRabbit plugin for Claude Code creates autonomous AI development workflows. Claude Code can trigger CodeRabbit reviews directly through simple commands, enabling you to build features, run code reviews, and fix issues without manual intervention. This integration makes AI coding more independent, with built-in quality gates that catch issues before they reach production.This guide covers integrating CodeRabbit CLI with Claude Code. For standalone
CLI usage, see CLI overview.
Windows users: Claude Code requires WSL (Windows Subsystem for Linux) to
run on Windows. See our WSL on Windows guide for setup
instructions before proceeding with this integration.
Why integrate these tools
Expert issue detection
CodeRabbit spots race conditions, memory leaks, and logic errors that generic linters miss. Same pattern recognition that powers our PR reviews.
AI-powered fixes
Claude Code implements fixes with full context from CodeRabbit’s analysis.
Complex architectural changes handled intelligently.
Context preservation
CodeRabbit provides Claude Code with succinct context about issues,
including location, severity, and suggested approaches.
Continuous workflow
Stay in development flow - run reviews, apply fixes, and iterate without switching tools or losing mental context.
Video demo
See CodeRabbit CLI in action with Claude Code:Installation
Install Claude Code
Install Claude Code following the platform-specific instructions. Ensure you can launch Claude Code from your terminal.
Install and authenticate CodeRabbit CLI
Install and authenticate the CodeRabbit CLI:A browser window opens automatically. Sign in to CodeRabbit and the authentication completes in the browser.If you belong to multiple CodeRabbit organizations, the sign-in choice sets your default org only. Review attribution still depends on the current repository. See Organization selection.
curl -fsSL https://cli.coderabbit.ai/install.sh | sh
Authenticate
coderabbit auth login
Install CodeRabbit plugin
In Claude Code, install the plugin using one of these methods:
/plugin install coderabbit
Usage
Running code reviews
Use the/coderabbit:review command to trigger a review:
/coderabbit:review
- Verify CLI installation and authentication
- Run the code review
- Present findings grouped by severity
Review options
Customize your review with these options:/coderabbit:review # Review all changes
/coderabbit:review committed # Only committed changes
/coderabbit:review uncommitted # Only uncommitted changes
/coderabbit:review --base main # Compare against main branch
Natural language interface
You can also trigger reviews using natural language:- “Review my code”
- “Check for security issues”
- “What’s wrong with my changes?”
Integration workflow
Use CodeRabbit as part of building new features
Request implementation + review
Ask Claude Code to implement a feature and run a CodeRabbit review:Key components:
Sample prompt
Please implement phase 7.3 of the planning doc and then review it with CodeRabbit. Fix any issues that are found.
- Implement the feature: Claude codes the requested functionality
- Run CodeRabbit review: Uses the plugin to analyze code
- Fix issues: Claude addresses all problems CodeRabbit identifies
Claude implements and triggers review
Claude Code:
- Implements the requested feature
- Runs
/coderabbit:reviewthrough the plugin - Waits for the analysis to complete
CodeRabbit analysis and task creation
When CodeRabbit completes, Claude Code:
- Receives the review findings with file locations and severity
- Creates a task list addressing each issue
- Shows you the planned fixes before implementing them
Example: API integration implementation
This example shows the workflow implementing a webhook handler for payment processing:Run integrated workflow
Tell Claude Code to implement and review:
Implement the payment webhook handler from the spec document.
Then review it with CodeRabbit and fix any issues.
CodeRabbit analysis
CodeRabbit analyzes the webhook code and identifies issues:
- Missing signature verification
- Race conditions in payment state updates
- Insufficient error handling for network failures
- Webhook replay attack vulnerabilities
Claude Code fixes
Claude Code automatically applies fixes:
- Adds HMAC signature verification
- Implements database transactions for state consistency
- Adds retry logic with exponential backoff
- Includes idempotency key handling
Advanced usage
CLI review commands
When running the CodeRabbit CLI directly outside the plugin, use the review command that best fits your workflow:# Agent mode - structured JSON output for agent workflows
coderabbit --agent
# Plain mode - detailed terminal output
coderabbit --plain
# Lighter local review policy
coderabbit --light
| Command | Best for |
|---|---|
--agent | Claude Code and other agent integrations that consume structured data |
--plain | Human-readable terminal output during manual workflows |
--light | Lighter local review for active development work |
/coderabbit:review plugin command uses the appropriate mode automatically.
Reviewing specific changes
Review only uncommitted changes:/coderabbit:review uncommitted
/coderabbit:review committed
Comparing against different branches
Compare your changes against a specific branch:/coderabbit:review --base develop
/coderabbit:review --base master
Combining with natural language
You can combine natural language requests with specific review options:Review my uncommitted changes for security issues
/coderabbit:review command with the correct options.
Configuration
Configure CodeRabbit for Claude Code
CodeRabbit automatically reads yourclaude.md file, so you can add context there on how code reviews should run, your coding standards, and architectural preferences.
This is a Pro paid plan feature.
Troubleshooting
Plugin not found
If the plugin isn’t available:- Verify marketplace access: Ensure you’ve added the marketplace:
/plugin marketplace add coderabbitai/claude-plugin - Check plugin installation: Verify the plugin is installed:
/plugin list - Reinstall if needed: Remove and reinstall the plugin:
/plugin uninstall coderabbit /plugin install coderabbit
CLI not authenticated
If you see authentication errors:- Check CLI authentication: Run
coderabbit auth statusin your terminal - Re-authenticate: Run
coderabbit auth loginto refresh your credentials - Verify CLI installation: Ensure the CLI is in your PATH and accessible from Claude Code’s environment
CodeRabbit not finding issues
If CodeRabbit isn’t detecting expected issues:- Check git status: CodeRabbit analyzes tracked changes - run
git statusto verify - Specify review scope: Use options to target specific changes:
/coderabbit:review uncommitted- only uncommitted changes/coderabbit:review committed- only committed changes
- Specify base branch: If your main branch isn’t
main, use: - Review file types: CodeRabbit focuses on code files, not docs or configuration
Claude Code not applying fixes
If Claude Code isn’t implementing CodeRabbit’s suggestions:- Provide explicit context: Tell Claude Code to “fix the issues found by CodeRabbit” explicitly
- Check review completion: Ensure the review has finished before asking for fixes
- Review findings manually: Ask Claude to “show me the CodeRabbit findings” to verify they were received
- Iterate on specific issues: Ask Claude to focus on fixing specific issues one at a time
Review taking too long
CodeRabbit reviews may take 7 to 30+ minutes depending on the scope of changes:- Review smaller changesets: Adjust what you’re reviewing to reduce analysis time:
- Use
/coderabbit:review uncommittedto review only uncommitted changes - Work on smaller feature branches compared to main
- Break large features into smaller, reviewable chunks
- Use
- Configure the diff scope: Control what changes are analyzed:
- Review uncommitted changes only: Use
uncommittedoption to analyze just working directory changes - Configure base branch: Use
--baseto set the comparison point - Use feature branches: Work on focused feature branches instead of large staging branches
- Review uncommitted changes only: Use
The integration creates a more thorough review process than either tool alone.
Expect comprehensive analysis that catches issues that would otherwise reach
production.
Was this page helpful?
⌘I
