YouTube Deep SummaryYouTube Deep Summary

Star Extract content that makes a tangible impact on your life

Video thumbnail

How to Use Cursor in the Smartest Way Possible

AI LABS • 2025-05-18 • 10:16 minutes • YouTube

🤖 AI-Generated Summary:

Boost Your AI-Powered Coding Workflow with Code Rabbit and Cursor Integration

In recent times, AI agents like Cursor have revolutionized how developers write code. Cursor’s AI agent takes your prompts, understands the context, and automatically creates files and implements features—dramatically speeding up development. However, with extensive autogenerated code, errors and vulnerabilities are almost inevitable. Cursor itself may throw random errors or produce insecure code that needs prompt rework. So, how can developers catch these issues early and ensure robust, secure applications?

Enter Code Rabbit, a powerful code review tool designed to work seamlessly with Cursor and VS Code, enhancing your AI-driven development workflow by providing automated reviews after each coding segment.


What Is Code Rabbit and Why You Need It

Originally built to review pull requests and GitHub commits, Code Rabbit now offers an extension for VS Code, Cursor, and Windsurf. It analyzes your committed code changes, identifies critical refactors, flags security vulnerabilities, and suggests improvements—all in real-time after every implementation step.

This integration is crucial because AI-generated code often leaves behind security flaws or poor integrations that are tough to detect manually. Running Code Rabbit reviews continuously tightens your workflow, improves application security, and helps you ship a stable final product with fewer bugs.


Getting Started: Installation and Setup

  1. Install Code Rabbit Extension:
  2. Open Cursor’s side panel and navigate to Extensions.
  3. Search for “Code Rabbit” and install the extension.

  4. Sign In:

  5. Launch the extension and sign in using GitHub authentication.
  6. The process is straightforward and quick.

  7. Initialize Git Repository:

  8. In your project directory, initialize Git with git init.
  9. Stage changes using git add . and commit with a meaningful message, e.g., git commit -m "initial commit".

Once you commit changes, Code Rabbit automatically detects them and prompts you to run a review.


How the Workflow Looks in Action

Let’s say you’re building a full e-commerce store with an admin panel using Cursor. After each development phase or code chunk:

  • Commit your changes to Git.
  • Code Rabbit reviews the commit, scanning for errors, security issues, and opportunities to refactor.
  • Review the suggestions and feed them back into Cursor by copying the provided AI-generated instructions.
  • Let Cursor apply fixes and continue to the next phase.

This loop ensures every step is vetted and improved before moving forward, creating a highly iterative and reliable development process.


Handling Common Issues and Tips

During setup, you might encounter a known bug where your Git branch isn’t visible to Code Rabbit. The fix is simple:

  • Create a new branch via VS Code’s branch menu.
  • Switch to the new branch before committing changes.
  • Code Rabbit will focus on this branch and review commits accordingly.

Also, when applying multiple suggestions, it’s best to use the Gemini 2.5 Pro model in Cursor, as it can handle multiple instructions simultaneously, saving you from feeding comments one by one.


Real-World Benefits Observed

Using Code Rabbit alongside Cursor helped identify and fix critical issues such as:

  • Client-side rendering problems.
  • Security flaws in password storage.
  • Stray or unnecessary test comments.

The e-commerce site became fully functional with smooth animations and solid security after several review cycles, proving the efficiency of this integrated approach.


Implementing a Structured Development Plan

To maximize productivity, break your project into manageable chunks:

  1. Define your project specs and tech stack—e.g., Next.js front-end with FastAPI backend.
  2. Create a structured implementation plan with phases and modules.
  3. Configure Cursor to keep the AI agent attached persistently.
  4. Progress phase by phase, committing code after each.
  5. Run Code Rabbit reviews, apply fixes, and repeat.

This phased, review-driven workflow keeps development organized, reduces errors, and accelerates delivery.


What Could Be Improved?

Currently, you manually copy review comments from Code Rabbit into Cursor. Automating this feedback loop—so comments are directly injected as prompts—would streamline the process further and save valuable time.


Conclusion

Integrating Code Rabbit with Cursor and VS Code creates a powerful AI-assisted coding ecosystem that not only accelerates development but also maintains code quality and security. By embedding review cycles at every step, developers can build faster, safer, and with greater confidence.

If you’re an AI-driven developer looking to enhance your workflow, give this combo a try and see how it transforms your coding process.


Enjoyed this guide? Subscribe to our channel for more tutorials and tips on AI-powered development. Your support helps us reach new milestones and bring you even better content!

Happy coding! 🚀


📝 Transcript (309 entries):

Cursor has become incredibly popular for its AI agent, which lets you use powerful models to write code. The agent takes your prompt, understands the context, and starts building by creating files and implementing features automatically. However, with that much autogenerated code, errors are inevitable. Cursor often throws random errors, and you either have to prompt it again or wait for it to recover and fix them. Now, imagine if after each segment of code it generates, you could run a review that checks for issues such as security leaks or flawed integrations. This is especially important because AI agents often leave major vulnerabilities behind and catching them early is absolutely critical. That is exactly where Code Rabbit comes in. Code Rabbit was originally built to review pull requests and GitHub commits by offering suggestions based on what you pushed. But now they have launched a powerful extension for VS Code, Cursor, and Windsurf. You simply plug it in and after every implementation step from cursor you run the extension. It analyzes the changes, identifies important refactors, highlights security concerns and suggests improvements. Then you feed those suggestions back to the agent and it handles the fixes. This significantly tightens up your workflow, improves your application security and helps you reach a stable final product with fewer bugs. Stick around because I am going to walk you through how I use Code Rabbit in my own workflow, starting from an implementation plan, breaking it into manageable chunks, reviewing after each one and repeating the process to build better and build faster. Installation is simple. In cursor, open your side panel and then go to extensions. Search for Code Rabbit. Locate the extension and install it. When you launch it, you will be prompted to sign in. Click to sign in. Complete the GitHub authentication in your browser and you are all set. The entire process is straightforward and has no complications. Okay, so just to show you a live demo of how this actually works. I am currently building an e-commerce store, a full e-commerce store with the admin panel and everything included. I am not exactly sure how much of it I have built in this video, but you will get a pretty clear idea of the workflow we are trying to achieve with this tool and how it is going to assist us throughout the process. Now what actually happens with this tool is that it reads the changes you have made through GitHub. So first of all you need to initialize git in the directory you are working in. As you commit those changes which means saving them. Whenever you save anything code rabbit will step in and say that it has detected changes and ask if you want those to be reviewed. You simply click on yes and it will begin reviewing them and providing suggestions. If you want you can copy those suggestions back into cursor and both tools continue working together seamlessly. This is essentially what the entire workflow is evolving towards. You can see right here that these are the changes I have made that have not yet been committed. But before we go into that, let me show you how to initialize this setup. So first of all, in a new directory, for instance, the project directory where you have not started anything yet. You simply type git in it. This initializes the git repository. After that, you add your changes using the git add command and the dot signifies that you are adding the entire repository. Once that is done, you use git commit and make sure to include a message with the commit describing what it is about. This is the standard format. You do not need to worry because there are also ways to automate this which I will be showing you. But it is important that you go through these initial steps. For example, you can simply write a message like initial commit and this will commit everything in the repository. Once you do this, code rabbit will activate and do its part. Every time you make a change, you will need to use git add followed by git commit. And this process will save the changes. Each saved change will be detected by code rabbit. It will run a review and you can then pass those results over to cursor to continue your development process smoothly. So while testing it out, I did encounter a big issue. I spent a lot of time trying to fix it and in the end I went into their discord server. Someone had actually posted a solution there because many people were facing the same issue and it seems that this is currently a known bug. Apparently, you are supposed to have your branch visible right here where all your branches are listed. Once that is done, you can commit locally and continue working as needed. The tool will focus on the selected branch and every time you commit to that branch, it will be able to review those changes. This is the solution I ended up using. You go to this area and you will see the top menu appear. You simply select the option to create a new branch. Since I have already made a lot of progress, I want to create a copy of the main branch. So I create a new one and name it the test branch. Now you can see that the menu appears and any changes I make will be shown right here. For example, in this file, I just add a comment that says this is a test. I add the comment and save the file. Next, I open the terminal and I am going to add this file to the branch and commit it with the message test. That is done. We now have a commit message labeled test and we want to test how this behaves. So we proceed and now you can see that the review has started. This is the file we committed. The review has been completed and I believe it has generated a few comments. Yes, it added a comment that says remove stray test comment. It recognizes that this is just a test comment and not something important. I just wanted to walk you through this fix so you can understand it clearly. Now let us go back to the project and I will show you how the rest of the workflow plays out. Okay. So I just implemented several other features from my implementation plan. First of all, let me try to open the project to see if it actually runs properly. You can see that there are some errors. And now I want to check whether the tool can actually detect and address these errors during its review process. I believe this part of the work falls under phase 4 of the implementation plan. We can now see the recent changes that were made. So let us proceed with the review. You can observe that I am now setting everything up, analyzing all the changes and reviewing the modified files. The files that were changed are listed here at the bottom. Let us take a look at what it finds and whether its review can help resolve the existing errors. We are now ready to run the review. You can now see the list of files that were reviewed. When we open any of these, we can see that it has provided suggestions for each one. Clicking on a suggestion opens it in detail and shows us exactly what the tool recommends. The next step in this workflow is to hand these suggestions over to the cursor AI agent. If you're enjoying the video, I'd really appreciate it if you could subscribe to the channel. We're aiming to reach 25,000 subscribers by the end of this month, and your support genuinely helps. We share videos like this three times a week, so there is always something new and useful for you to explore. Now, the next step to getting those comments applied is that after you have opened them up, you are going to click on the fix with AI button. What this does is copy a set of instructions, and if you look at the bottom, you will see them labeled as code gen instructions, which are then copied to your clipboard. After that, you simply paste those instructions into the cursor agent. The tedious part of this process is that you have to do it one by one for each individual comment. You need to provide each comment separately. And as you already know, these AI models generally do not perform well when they are asked to handle multiple tasks at the same time. One thing I highly recommend is switching to the Gemini 2.5 Pro model because in my experience, that is the only model that can reliably handle multiple instructions at once. This allows you to go ahead and give it as many comments as you like. I have now given it three comments from the address form. And at this point, I am just going to paste the codegen instructions into cursor and see what it generates and how it fixes the issues. Okay, so this is the store that was finally built. There was an issue with components not rendering properly on the client side, but that has been resolved. The review process also played a key role in tightening up the site's security, especially in the area of password storage, which was being handled incorrectly earlier. Overall, the site is now fully functional. All the animations are working exactly as expected. One thing I do regret is not using Shaden components. I had instructed the agent to manually create all the components, which in hindsight was not the best decision. That aside, everything looks good and is functioning well. There are still a few features left to implement. As I mentioned earlier, I am currently at phase four of the implementation plan. So, the final styling and polish will likely be completed in the upcoming phases. So, at the start of the video, I mentioned that I would show you how to apply my implementation plan approach to your own projects by breaking them into small and manageable chunks. This is exactly what I meant. You begin by briefly describing your project and defining its specifications. In my case, I was building a Nex.js JS front-end application that would eventually be integrated with a fast API backend. Your project might be different, but the core idea remains the same. You describe what you are building and which text stack you are using. Since I was focused on building just the nextJS front end, I instructed the agent to list all the required pages and modules inside a structure.md file that I had already prepared. After that, I asked it to generate a 10-phase implementation plan based on that structure. To make the workflow more autonomous and avoid repeating instructions every time, you add a rule inside your project's cursor settings and configure it to always keep the agent attached. From there, the agent follows the implementation plan step by step. If it needs any clarification, it is expected to ask before proceeding. Once a phase begins, it marks that phase as in progress, completes the implementation, and then commits the changes to git locally. At that point, you receive a prompt from code rabbit indicating that it is time to start the review process. You run the review, collect the suggestions, and paste those suggestions back as feedback. These suggestions now act as the user's input. After that, you instruct cursor to continue, and it returns to the implementation plan, marks the current phase as complete, and proceeds to the next one. This creates a smooth and structured workflow that progresses phase by phase with integrated review cycles at every step. One improvement that could really enhance this process in my opinion is better retrieval of the review comments. At the moment, there is a comments tab that displays everything, but if there were a way to automatically extract and paste those comments directly into cursor, the entire process would become much more efficient. That brings us to the end of this video. If you'd like to support the channel and help us keep making tutorials like this, you can do so by using the super thanks button below. As always, thank you for watching and I'll see you in the next one.