This feature is available exclusively as part of the Pro plan and is not included in the Lite plan. Please refer to our pricing page for more information about our plans and features.
CodeRabbit can automatically generate code improvements for your pull requests, implementing review suggestions and enhancing code quality through AI-powered analysis. For a general overview of performing code reviews with CodeRabbit, see Review pull requests.

Overview

This feature is available only on GitHub.
You can request CodeRabbit to generate improvements to a branch that it is currently reviewing by writing a comment addressed to @coderabbitai.

Example requests

@coderabbitai Please implement the changes you suggested in your code review.
In addition to free-form requests, you can use keyword-based commands for common tasks. The plan keyword acts as shorthand for implementing suggested changes.

How it works

1

Analysis & planning

CodeRabbit posts comments to the pull request detailing its improvement plans.
2

Branch creation

CodeRabbit creates a new branch based on the current pull request’s branch.
3

Pull request generation

CodeRabbit opens a new pull request with the improvements and links to it from the original.
CodeRabbit creates the branch and pull request but doesn’t make further changes afterward. You take full ownership of the suggested improvements.

Best practices

Quick Commands

Common commands for code generation tasks. For complex requests, use full prompts as described above. For a complete command reference, see Code review command reference.

Generate Documentation

Generate missing documentation for functions added in the pull request:
@coderabbitai generate docstrings

Learn more about docstrings

Discover supported platforms and programming languages for inline documentation generation.

Implement Review Suggestions

Generate a new branch with code improvements addressing review comments. Hint: Use the full prompt format when you need specific implementation instructions beyond general review suggestions.
@coderabbitai plan

Next Steps