A VS Code extension that leverages GitHub Copilot to review your changes and suggest improvements. This extension helps you improve code quality by providing AI-powered code reviews directly in your editor.
- Instant Code Reviews: Get immediate feedback on your code without waiting for team reviews
- Git-Based Analysis: Automatically compares your local changes to the main branch of your repository
- Language Agnostic: Works with any programming language supported by GitHub Copilot
- Customizable: Tailor the review focus with custom prompts
- Precise Navigation: Jump directly to the specific code locations mentioned in reviews
- Markdown Formatting: Well-structured reviews with file sections and line references
- Command Palette Integration: Run commands directly from the VS Code Command Palette
- Auto-Completion: Get command suggestions as you type in the chat
- Visual Studio Code 1.95.0 or higher
- GitHub Copilot extension must be installed and properly configured
- Git repository with a main branch (main or master)
- Open VS Code
- Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
- Search for "Copilot Code Review"
- Click Install
This extension works by comparing your local changes to the main branch of your Git repository:
- Open a Git repository in VS Code
- Make changes to your code
- Use one of the following methods to run commands:
-
Open a Copilot Chat
-
Type
@prfollowed by a command:@pr /self-review- to review your code changes--include-filesor-i- include changed files content to the prompt's context
@pr /write-description- to generate a description for your changes
Auto-completion will suggest available commands as you type.
- Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
- Type "Copilot Code Review" to see available commands:
- "Copilot Code Review: Show Debug Logs" - to view the extension logs
This extension contributes the following settings:
copilotCodeReview.customPrompt: Customize the prompt sent to Copilot for code reviewcopilotCodeReview.enableDebugLogging: Enable debug logging for the extension (default: true)
- This extension requires the official GitHub Copilot extension to be installed
- Performance may vary depending on the size and complexity of the code being reviewed
- Very large files or diffs may be truncated due to token limits
- The extension requires a Git repository with a main branch (main or master)
This extension sends code to GitHub Copilot for analysis. Please review our Security Policy for more information about data handling and best practices.
Contributions are welcome! Please see our Contributing Guidelines for more information.
This project is licensed under the MIT License - see the LICENSE file for details.
Example of a code review performed by the extension
Example of a generated PR description
See the CHANGELOG.md for details about each release.