Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Cursor Code Review AssistantNew to Visual Studio Code? Get it now.
Cursor Code Review Assistant

Cursor Code Review Assistant

afshmini

|
1 install
| (0) | Free
AI-powered code review plugin for comparing branches and generating detailed reviews
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Cursor Code Review Assistant

Version License VS Code

A powerful GUI plugin for Cursor that enables AI-powered code reviews by comparing source and destination branches. The plugin analyzes code changes, identifies bugs, issues, and suggestions, and provides actionable recommendations with one-click fixes.

Features • Installation • Usage • Development • Contributing


🎯 Overview

Cursor Code Review Assistant is an intelligent code review tool that helps developers maintain code quality by automatically analyzing changes between Git branches. It provides comprehensive reviews across 14 evaluation criteria, prioritized issues, and actionable fixes that can be applied directly from the interface.

✨ Features

🔍 Comprehensive Code Analysis

  • 14 Evaluation Criteria: Deep analysis across Design & Architecture, Complexity & Maintainability, Functionality & Correctness, Readability & Naming, Best Practices & Patterns, Test Coverage & Quality, Standardization & Style, Documentation & Comments, Security & Compliance, Performance & Scalability, Observability & Logging, Accessibility & Internationalization, CI/CD & DevOps, and AI-Assisted Code Review
  • Prioritized Issues: Issues categorized by severity (Critical, Major, Minor, Enhancement)
  • High-Level Summary: Automatically generates product impact and engineering approach summaries

🎨 Modern User Interface

  • Beautiful GUI: Clean, modern interface with intuitive navigation
  • Branch Search: Inline search functionality for quick branch selection
  • Responsive Design: Optimized for different screen sizes
  • Color-Coded Severity: Visual indicators for issue priority

💡 Actionable Fixes

  • Before/After Code Comparison: See exactly what needs to change with highlighted code sections
  • One-Click Apply: Apply suggested fixes directly to your codebase
  • Full Line Context: View complete code lines with highlighted problematic sections
  • Smart Line Detection: Intelligent line matching ensures accurate code changes

🔧 Git Integration

  • Comprehensive Branch Comparison: Uses proper git commands (git fetch origin, git diff origin/branch1...origin/branch2) to compare branches
  • Remote Branch Support: Automatically fetches and compares remote branches
  • Diff Analysis: Analyzes only modified files with actual code changes
  • Branch Switching: Seamless branch switching with confirmation dialogs

📊 Detailed Reporting

  • File-by-File Analysis: Expandable sections for each modified file
  • Issue Tracking: Track issues by category and severity
  • Highlights Section: Positive findings and well-implemented patterns
  • Statistics Dashboard: Overview of review results

📦 Installation

From VS Code Marketplace (Coming Soon)

Once published, you can install the extension directly from the VS Code Marketplace:

  1. Open Cursor
  2. Press Ctrl+Shift+X (or Cmd+Shift+X on Mac) to open Extensions
  3. Search for "Cursor Code Review Assistant"
  4. Click Install

Or via command line:

cursor --install-extension afshmini.cursor-code-review

From Source

Prerequisites

  • Cursor editor (version 1.80.0 or higher)
  • Node.js (v20 or higher)
  • Git repository initialized in your workspace

Setup Steps

  1. Clone the repository:

    git clone https://github.com/afshmini/cursor-code-review.git
    cd cursor-code-review
    
  2. Install dependencies:

    npm install
    
  3. Compile TypeScript:

    npm run compile
    
  4. Launch Extension Development Host:

    • Press F5 in Cursor
    • A new Extension Development Host window will open
  5. Test the extension:

    • In the new window, open a Git repository workspace
    • Use the command palette (Ctrl+Shift+P / Cmd+Shift+P) and run "Start Code Review"

🚀 Usage

Starting a Code Review

Method 1: Command Palette

  1. Press Ctrl+Shift+P (or Cmd+Shift+P on Mac)
  2. Type "Start Code Review" and select it

Method 2: Source Control Panel

  1. Open the Source Control panel
  2. Click on the "Start Code Review" button in the navigation bar

Review Process

  1. Select Branches:

    • Choose the Source Branch (the branch you want to review)
    • Choose the Destination Branch (the branch to compare against, typically main or develop)
    • Use the inline search to quickly find branches
  2. Start Review:

    • Click the "Start Review" button
    • The plugin will:
      • Fetch all remote changes
      • Calculate differences between branches
      • Analyze code changes automatically
  3. Review Results:

    • High-Level Summary: Product impact and engineering approach
    • Prioritized Issues: Grouped by severity (Critical, Major, Minor, Enhancement)
    • Highlights: Positive findings and best practices
    • File-by-File Analysis: Detailed issues for each modified file

Applying Fixes

For Critical and Major issues, you can apply fixes directly:

  1. Review the Before and After code sections
  2. The problematic code is highlighted in the Before section
  3. The suggested fix is highlighted in the After section
  4. Click the Apply button at the bottom of the code section
  5. The changes will be applied directly to your workspace

Note: The plugin uses intelligent line matching to ensure changes are applied to the correct location, even if the file has been modified since the review.

📋 Review Format

The plugin follows a comprehensive review format:

1. High-Level Summary

  • Product Impact: What the change delivers for users/customers
  • Engineering Approach: Key patterns, frameworks, and best practices used

2. Prioritized Issues

Issues are grouped by severity:

  • 🔴 Critical: Security vulnerabilities, hardcoded credentials, SQL injection risks, XSS vulnerabilities
  • 🟠 Major: Missing error handling, null/undefined access, N+1 query patterns, test quality issues
  • 🟡 Minor: Code complexity, code smells, missing documentation, style inconsistencies
  • 🔵 Enhancement: Naming improvements, magic numbers, accessibility improvements, i18n support

Each issue includes:

  • File path and line range
  • One-line summary
  • Detailed description
  • Specific fix recommendation
  • Category classification
  • Before/After code (for Critical and Major issues)

3. Highlights

  • Positive findings and well-implemented patterns
  • Good practices observed in the code
  • Commendable architectural decisions

🔧 Configuration

The plugin uses Cursor's built-in settings and doesn't require additional configuration. However, you can customize the review process by modifying the analysis rules in src/codeReviewService.ts.

🛠️ Development

Project Structure

cursor-code-review/
├── src/
│   ├── extension.ts          # Main extension entry point
│   ├── codeReviewPanel.ts    # Webview panel and GUI
│   ├── gitService.ts         # Git operations
│   └── codeReviewService.ts  # Code analysis and review logic
├── out/                      # Compiled JavaScript files
├── package.json              # Extension manifest
├── tsconfig.json            # TypeScript configuration
├── README.md                # This file
├── PUBLISHING.md            # Publishing guide
└── QUICK_PUBLISH.md         # Quick publishing reference

Building

# Compile TypeScript
npm run compile

# Watch mode for development
npm run watch

# Package extension (creates .vsix file)
npm run package

Testing

  1. Open the project in Cursor
  2. Press F5 to launch Extension Development Host
  3. Test the plugin in the new window
  4. Check the Debug Console for any errors

Publishing

See PUBLISHING.md or QUICK_PUBLISH.md for detailed publishing instructions.

🐛 Troubleshooting

"No workspace folder found"

  • Ensure you have a workspace folder open in Cursor
  • The plugin requires an active workspace with a Git repository

"Failed to get branches"

  • Verify that Git is initialized in your workspace
  • Check that you have at least one branch
  • Ensure Git is installed and accessible from the command line

"No differences found"

  • The selected branches might be identical
  • Try selecting different branches
  • Ensure both branches exist and have commits
  • Verify that remote branches are fetched

Review not starting

  • Check the Output panel for error messages
  • Verify that both branches are selected
  • Ensure you have network access (for fetching remote branches)
  • Check that Node.js version is 20 or higher

Apply button not working

  • Ensure you're on the correct branch
  • Check that the file hasn't been significantly modified
  • Verify the file path is correct
  • Check the Debug Console for error messages

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

How to Contribute

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow TypeScript best practices
  • Maintain code style consistency
  • Add comments for complex logic
  • Test your changes thoroughly
  • Update documentation as needed

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

👤 Author

Afshmini

  • Email: afshmini@gmail.com
  • GitHub: @afshmini
  • Repository: cursor-code-review

🔮 Future Enhancements

  • [ ] Integration with Cursor's native AI API for more advanced analysis
  • [ ] Export review results to markdown/JSON
  • [ ] Custom review rules configuration
  • [ ] Integration with CI/CD pipelines
  • [ ] Support for pull request reviews
  • [ ] Historical review tracking
  • [ ] Team collaboration features
  • [ ] Review templates and presets
  • [ ] Integration with issue trackers (Jira, GitHub Issues, etc.)

📚 Resources

  • VS Code Extension API
  • VS Code Marketplace
  • TypeScript Documentation
  • Git Documentation

💬 Support

For issues, questions, or feature requests, please:

  • Open an issue on GitHub
  • Contact the author at afshmini@gmail.com

Made with ❤️ by Afshmini

Happy Code Reviewing! 🚀

⭐ Star this repo if you find it helpful!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft