How I Review my Code with AI

Date: 2025-10-29 | artificial-intelligence | create | software-engineer | tech | vibe-engineer |

DISCLOSURE: If you buy through affiliate links, I may earn a small commission. (disclosures)

In my recent post How I Actually use AI to Code, I mentioned that I've started using AI for code reviews. In this post I wanted to give a bit more color on how I actually do that.

AI for Code Reviews

AI is good, not great, at reviewing code. But it's also available 24/7 to do a code review and doesn't get mad when you ping it multiple times for the same general code logic which makes it far more accessible than the human equivalent.

I find AI is most useful as another set of eyes. It typically has a good grasp of standard practices in a language but is less useful if you go off that paved road - in my experience most codebases of sufficient size have left the paved road for some portion of the codebase, be it business logic or stylistic choices.

Still, having another pair of eyes is useful for catching things you might have missed or offering suggestions for improvements in areas you weren't sure were worthwhile. I've found it useful enough that I now do a pass of AI review before shipping it off to human review.

Simple AI Code Review

I most commonly ask AI for a review with a simple prompt:

Review the code in this commit and give me 3 things I could do to improve it

I run this via Claude Code CLI and use atomic commits which is why it's phrased this way but you can rephrase it to fit your usecase - e.g. if you paste it into a chat window, use feature branches, or have a specific piece of the logic you want reviewed.

A few tips I've found push AI towards useful reviews:

  • Limit scope to just the code you're changing so it doesn't try to boil the ocean - AI's have limited context windows so this would not be very useful.
  • Push it to actionable feedback by framing it as suggestions for improvement vs code feedback. Some AI's are heavily sycophantic and so will bias towards saying nice things vs useful things.
  • Cut down to just the top ideas by limiting to 3. Typically only 1-2 are ideas that I actually end up implementing.

This isn't fancy but it gives me a quick sanity check so I can move on with my day.

A More Extensible AI Code Review

I have another command I use for AI code reviews that I've found useful at work. It's not that much better at the reviews but it is more extensible so you can check additional things.

My command asks the AI to:

  • Do code review
  • Run linter
  • Run tests

It does each of these in a subagent to help save the context window then it summarizes the changes I could make to improve it.

The downside of this is it takes longer, largely because the linting takes awhile in our codebase.

Command:

Run the following steps in parallel with a generic subagent for each one.
				
1. Run tests on the files in my current commit. Summarize the broken tests in an easy to read format so I can go and debug.
2. Run lint on the files in my current commit. Summarize the failed lints in an easy to read format so I can go and debug.
3. Review the code in the commit and give me the top 3 things I should do to improve it.

I previously had this as a Claude Code slash command (glorified Markdown file) which worked well but we use VMs for coding so my local files kept getting wiped which was annoying so now I just copy/paste it.

Next

As you can see my code review process is SUPER simple. The base AI configurations are pretty good at this stuff so I haven't felt the need to build much more on top of them.

But there's a lot more you can do like creating expert agents for areas like architecture, security, performance, hooking in additional tools, and building more detailed skills for the agents to use.

I want to play with some of these to see how much better it can get but for now I'm happy with the fast feedback and simple system.

If you liked this post you might also like:

Want more like this?

The best way to support my work is to like / comment / share for the algorithm and subscribe for future updates.