# Getting Cursor AI to Review Its Own Code <!-- ref: @content/youtube/yifan-bth/getting-cursor-ai-to-review-its-own-code tags: [Cursor, AI code review, code quality, git workflow, AI-generated code, maintainability] version: 2 updated_at: 2026-11-24T07:22:28.061Z --> **[Watch on YouTube](https://www.youtube.com/watch?v=vOlAniUTlCY)** # Getting Cursor AI to Review Its Own Code *Synthesized from Yifan on Beyond the Hype, 2024-10-22.* Yifan, presenting on the Beyond the Hype channel, demonstrates three ways to use Cursor to review AI-generated code on a podcast transcript editing tool he has been building. ## Core Thesis Yifan argues that code generated by AI in many small increments becomes tangled, and that AI can be used to review and clean up that code alongside hand-written code. He shows three Cursor workflows (built-in review, Composer, and chat with a review prompt) and recommends the chat-based route for controlled, one-change-at-a-time fixes. ## Key Insights - **Built-in AI Review.** Enabled in the Cursor beta settings, it adds a Reviews tab with custom instructions and three scopes: working state, diff from main branch, and last commit. It reports issues at critical, high, low and trivial severities, and each issue opens an inline chat to fix it. It does not let you pick a model or use @-mentions. - **Diff against main.** Yifan prefers the diff from the main branch, since working-state and last-commit reviews give too little context. He makes many micro-commits, so the larger diff gives a more meaningful review. - **Composer.** Adding the diff with main and a review instruction set produced many edits in about a minute. Yifan finds it hard to verify so many changes at once and says its changes apply by default. - **Chat with a review prompt.** He wrote a detailed review prompt covering code structure, performance, security and output format, stored it in a notepad file, and @-mentioned it with the main-branch diff. Chat applies changes default-off, so each change can be applied separately. It caught a rendering performance issue the built-in review missed, a missing ownership check before deletion, and a type-safety concern. - **Instructions do not persist.** Review instructions entered in the built-in panel are cleared when Cursor restarts, so keep the prompt in a text file. ## Actionable Takeaways 1. Commit in small pieces as AI implements features, then review the full branch against main for context. 2. Keep a long-form review prompt in a file (structure, performance, security, severity output) and reuse it. 3. Use chat rather than Composer when you want to apply each suggested change deliberately. 4. After fixes, commit, then merge directly or request a human review if you work in a team. ## Notable Quotes > "review the code as if you're a senior engineer" — Yifan > "I like to make a lot of micr commits as AI implements features for me" — Yifan --- *Related: `@content/youtube/yifan-bth/unlocking-cursor-ai-top-8-hidden-features` · `@content/youtube/yifan-bth/how-i-use-ai-git-to-code-3x-faster-real-dev-workflow-with-cursor` · `@content/youtube/yifan-bth/5x-your-cursor-ai-coding-quality-with-these-pro-tips` · `@content/youtube/yifan-bth/the-ultimate-prototyping-workflow-cursor-ai-replit` · `@content/youtube/yifan-bth/cursor-windsurf-settings-to-5x-ais-output-quality-works-with-vs-code-too`* --- *You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).* *Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*