Watch on YouTubePlayPlays from YouTube. Google's privacy policy (opens in a new tab) applies.
Adam explains what code review is and why it's worth doing even on a solo project, then installs Anthropic's code-review plugin and runs it on his pull request in a fresh sub-session.
What you'll learn
- Code review: someone with a fresh perspective checks the changes before merging; fixes and reviews repeat until everyone's happy.
- Solo hobby projects often skip PRs; for a project you care about, an occasional PR and review keeps it future-proof, and with engineers it's standard.
/simplifyis for daily clean-up while you work; code review is made for PRs.- Anthropic's code-review plugin shares the built-in's name; it spawns four sub-agents, validates each issue, and can comment on the GitHub PR.
- AI reviews produce false positives, so findings need validating before acting on them.
- Run the review in a separate sub-session for fresh eyes; tell the main session not to brief it, so you choose the skill.
- Restart the app right after installing a plugin.
- With findings: post a summary on the PR, have the main session re-validate them, fix, commit and push.
Chapters
- 00:00What code review is
- 01:25Pull requests on solo projects
- 02:39Installing Anthropic's code-review plugin
- 04:26A fresh sub-session for review
- 06:24How the review checks findings
- 07:39What to do with findings
- 00:00Okay, well, congratulations. Our first PR is raised, but it is not merged yet, meaning nobody visiting our live deployment on Vercel is going to be able to access that
- 00:13my bookings view. Before we can merge this PR, it is actually a good idea to make sure that the code we are trying to merge with the main branch
- 00:23is not like is as clean as possible.
- 00:26It has no bugs, it has nothing that would later surprise us.
- 00:30Now, a process that takes care of this is called code review.
- 00:35So typically in the past, what would happen after a PR has been merged, you would like ask for a fellow engineer on your team to review this PR, and
- 00:45that fellow engineer would open this up with a fresh perspective and a fresh pair of eyes.
- 00:50It would look through the changes, it would look through the code, it would make comments on the lines that look suspicious or things that this engineer has found, you
- 00:59know, for some reason something to reconsider.
- 01:03It would finish the code review, and then you as a engineer raising this PR, you would have to go and make the fixes, and then you know, the process
- 01:10repeats until everyone is happy.
- 01:11Only then the PR can be merged.
- 01:14Nowadays, however, in the age of of AI, yes, we do have many AI agents automating this process.
- 01:22And we [snorts] are going to see in this video how this can look like with Glot.
- 01:27Before I get any further, one important thing to clarify.
- 01:31This whole process of raising PRs and then doing a code review is not necessarily something you would see most solo developers or engineers doing on their own like solo
- 01:41hobby projects. It's much more typical to just keep using commits, eventually like moving on to using branches, but raising PRs is really a thing that is typically associated with
- 01:55you know, bigger code bases.
- 01:58However, if you work on and you really intend on, you know, developing it for the next weeks or months and you really have high hopes about it, you know,
- 02:09raising a PR occasionally and then going through the code review is a really nice way to make sure your codebase is as, you know, as future-proof as possible, really.
- 02:21And also the purpose of this entire video course is to not just work like engineer, but also sometimes to work with engineers.
- 02:29And when we work with engineers, we're definitely going to be well, handling code reviews.
- 02:35So with that, let me switch back to Claude.
- 02:39There is actually a built-in tool within Claude Code that we could use.
- 02:44It's just called code review, similarly to how Simplify works, but this one is really created more with PRs in mind, whereas the Simplify skill which we used a couple
- 02:55of videos ago is more about like doing that you know, daily cleanup when you are still sort of in the trenches.
- 03:04But there is actually something else that I would like to use.
- 03:07It's a plugin also from Anthropic and confusingly it has the exact same name.
- 03:12It's called code review.
- 03:14The reason I like this plugin a little bit more because it like this process is just a little bit more elaborate.
- 03:21It will also involve spawning sub-agents.
- 03:24It's going to then, you know, re-review all of the findings and all of all of the claims.
- 03:30It's going to validate whether these are true or perhaps these are false positives and then it's going to post a comment on your behalf on on a GitHub PR,
- 03:40which is pretty nice.
- 03:42Let's go ahead and add this PR here.
- 03:44I'm sorry, add this plugin.
- 03:47And let's give it a second.
- 03:50Perfect. Now learning from my past mistakes, I'm just going to go ahead and restart the Claude Code application right away just to make sure everything works okay.
- 04:03Okay, and now uh going back to this session, if I now type in the slash command and go code review, code review, we can see again I I I
- 04:12mentioned it's a little bit uh it's it's a bit complicated thanks to Anthropic, but we now have this new entry here which is code review code review and this
- 04:21is the plugin that we want to use here, okay?
- 04:24Uh now I'm not going to run this command here in this chat.
- 04:28Why? Because the whole purpose of doing a code review is to get a fresh pair of eyes.
- 04:33If I now were to ask the exact same agent to follow the process, even though there are sub agents involved, I don't think that would be really the most
- 04:41optimal way to do this.
- 04:43So but I would still like to for this agent to be kept in the loop, so I'm going to do the exact same trick as we did a couple
- 04:49of videos ago. I'm going to ask it to create a sub session for me uh so that I can handle the code review, okay?
- 04:56[snorts] So I'm going to head over here.
- 04:59Uh Claude, thank you.
- 05:00Can you uh set up a new sub session for me so that I can handle code review uh for this PR which we just raised?
- 05:08Um don't give it any comments.
- 05:10Let me handle the rest.
- 05:14Okay, the last part is important because knowing Claude, it would probably, you know, uh set up the entire prompt and you know let the sub agent or sub session
- 05:24running uh and we want to be the ones making sure that we use the right skill.
- 05:30Um so let's hit send and um let's wait around and see for that sub session to appear in our left hand sidebar.
- 05:38Okay, perfect. We have that sub session.
- 05:42Seems like it's been already briefed on which PR this is uh about, of course.
- 05:48Not that there are any other PRs it could be possibly about in this repo.
- 05:53Uh and uh this is the place in which I'm going to You know what?
- 05:57I'm going to actually increase the effort here to high and uh I'm going to run the code review code review.
- 06:05Code review. Okay, let's see.
- 06:07Code review. Code review.
- 06:10It seems like it's still going to show up as a single code review, but I I'm going to trust it's the the plugin version.
- 06:16Yeah, it is a plugin version.
- 06:17Again, um a bit complicated on the anthropic part.
- 06:21I hope they are going to um fix it eventually.
- 06:25And um yeah, this is basically this is loaded a skill uh which comes with very elaborate instructions on how to proceed.
- 06:32Um the first step is to confirm that the PR this is about is still open and if whether it still needs a review, then it's going to look for
- 06:40the CLAUDE.md files, which is exactly why we wanted to keep that CLAUDE.md file up to date with the one of the previous videos.
- 06:48Um it's going to summarize PR changes and then it's going to spawn um um like sub agents four to be exact.
- 06:55So it's similar as with the simplify.
- 06:58And then, you know, this is the important part.
- 07:00It's going to validate each flagged issue.
- 07:02And this is exactly why we are using this plugin version of the code review over the one that come that Claude Code comes pre-installed with uh because what the
- 07:10pre-installed version would do is it would just, you know, spit out the box without really validating them.
- 07:18Um and this is not really something that we want.
- 07:20With AI, there are plenty of false positives, so you would really need to be careful about executing or like acting on claims which are sometimes just straight up false.
- 07:32Um okay, we have four sub agents working here.
- 07:36Let uh let's give them some time and let's see what kind of findings we are going to get.
- 07:44Okay, and we're finished.
- 07:45Um and guess what?
- 07:47Seems like I'm uh lucky today.
- 07:50So no issues have been found.
- 07:52Um well, according to these cloud uh sub agents, uh all four reviewers each went through the PR on their own and none of them flagged anything, so there was
- 08:03nothing to double check.
- 08:05Okay, yeah, that honestly, I don't think that has ever happened to me.
- 08:09So here's how you can proceed in case your PR turns out with some findings.
- 08:17So what I would do later is I would I would first of all ask Claude to post a summary on the GitHub PR page.
- 08:26And what this is going to do is going to create or add a new comment here on your behalf with your comments.
- 08:32And then I would go back to the main reviewer and I would ask it to basically revalidate these claims.
- 08:40And if that reviewer or if that sub agent thinks or if that agent thinks this is something we should we should fix, then I would ask it to do
- 08:48the fixes and then commit and push this work.
- 08:53And once the work is committed and pushed, we are ready for the final step, which is merging the PR.
- 09:02And this is actually something we are going to tackle in the next video.
- 09:06So with that, I'm going to see you in the next one.
- 09:08Thank you.