3 Steps to Automate Code Reviews with Zed AI [2026 Edition · Beginner-Friendly]
機械翻訳 / Machine-translated

機械翻訳 / Machine-translated
@aifriends
AI Friends(https://aifriends.jp)のクロスポスト公式アカウント。AIツールの紹介・使い方・できることを、中学生でもわかるやさしい日本語で届けます。
For those who are just starting to learn programming or who write code as part of a team, code review (checking code written by others) is an essential task. But manually checking code every single time takes a lot of time, doesn't it?
In this article, we'll walk you through how to automate code reviews using "Zed AI," the blazing-fast AI code editor — explained in 3 easy steps that even beginners can follow.
Code review is indispensable for finding bugs (mistakes in a program) and learning better ways to write code. However, doing it entirely by hand means it's not uncommon to spend more than 30 minutes checking a single file.
Zed AI is an editor built with Rust, a high-performance programming language, and it leverages the GPU (a component that accelerates graphics processing) to run at 120fps (a smoothness of 120 screen refreshes per second). It also comes with state-of-the-art AI — such as Claude and GPT (AI that understands and responds to text much like a human would) — built right in, capable of pointing out problems in your code within seconds.
Even on the free plan, you can use the AI prediction feature (Edit Predictions) up to 2,000 times per month, which is more than enough for personal projects or learning purposes. The paid plan (Zed Pro) is $10 per month for unlimited use, and if you bring your own API key (something like a password for using AI services), you can use it at no additional cost.
First, let's get Zed AI up and running. Go to the official website (zed.dev) and download the version that matches your computer's OS (Windows, Mac, Linux, etc.).
Installation steps:
Next, enable the AI features. Click the settings icon (the ⚙ symbol) in the upper right of the screen and open the "Assistant" tab. Here you can choose your "Provider" (the source of the AI service). You can pick from Claude, OpenAI, Gemini, locally running Ollama, and more. For beginners, Claude — which has a free tier — is recommended.
If you need to set up an API key, create a free account on the official website of your chosen AI service, then paste the key you receive into Zed's settings screen. You're all set.
Now let's configure the actual automation of code reviews. Zed AI has three main AI features.
1. Agent Panel
This is a panel on the right side of the screen where you can interact with AI in a chat-style format. Open it with "Cmd+Shift+A" (on Mac) or "Ctrl+Shift+A" (on Windows). Drag and drop the file you want reviewed here, or open the file and type "Please review this code," and the AI will tell you about any issues and suggestions for improvement in English (or your preferred language).
2. Inline Assistant
This is handy when you want to check only a specific part of your code. Select the lines you want reviewed, right-click and choose "Inline Assistant," or press "Cmd+I" (Mac) or "Ctrl+I" (Windows). Give specific instructions like "Add error handling" or "Tell me what's wrong with this function," and it will show you suggested fixes right then and there.
3. Edit Predictions
While you're writing code, the AI predicts what you should write next and suggests it in gray text. Press the Tab key to accept the suggestion. This helps you prevent typos and syntax errors (mistakes in how code is written) before they happen.
To automate code reviews efficiently, open the Agent Panel, load your entire project folder into it, and instruct it: "Review all files and list any bugs or security issues." This is the most efficient approach.
Let's actually run a code review. As an example, prepare a sample JavaScript file (a file containing a simple function).
Type the following into the Agent Panel:
"Please review this code and check the following points: 1. Is the error handling appropriate? 2. Are the variable names easy to understand? 3. Are there any security risks?"
After waiting a few seconds, the AI will return the results in a bulleted list. For example, it might display specific feedback like: "Line 14: You are catching errors with try-catch, but you are not logging the error message." or "Line 23: The variable name 'x' is unclear. We recommend changing it to something like 'userId'."
Clicking on a flagged item will jump you to the relevant line of code. Using Inline Assistant, simply instructing it to "Apply the recommended fix" is enough for the AI to automatically rewrite the code for you. The changes are displayed as a diff (showing the differences before and after), and if everything looks good, press the "Accept" button to confirm.
When reviewing multiple files at once, use the parallel agents feature (added in the June 2026 update). In the Agent Panel, select "Open a new thread" to have separate files reviewed simultaneously, dramatically reducing the time needed.
Problem 1: The AI doesn't respond in Japanese
By default, responses may come back in English. You can fix this by telling the Agent Panel "Please respond in Japanese" at the start, or by writing "Always respond in Japanese" in the "Custom Instructions" field under the "Assistant" tab in the settings.
Problem 2: An API key error appears
If you see an "API key invalid" error, the key may have expired or a space may have been accidentally included when you copied it. Issue a new key from your AI service's management dashboard and paste it in again.
Problem 3: Review results are off-target
If the AI isn't given enough information, it can't provide accurate reviews. Sharing context — such as "This project is a web app written in Node.js" or "This is tutorial code for beginners" — will improve the accuracy.
Problem 4: Performance is slow
Loading a large number of files at once can slow processing down. Instead of loading the entire folder, select only the files that have changed for review. Also, if you're using a local model (Ollama) and your computer's specs (performance) are low, it will run slowly — in that case, we recommend switching to a cloud-based model like Claude or GPT.
Creating Custom Review Templates
Typing the same instructions every time is tedious. Save your frequently used review criteria (e.g., "Check naming conventions," "Flag performance issues") in a text file and copy-paste them into the Agent Panel for greater efficiency.
Integration with Other Tools
Zed AI integrates with Git (a version control tool), so you can have the AI review your "git diff" (the diff of changes) before committing. It can also automatically generate commit messages (descriptions of what was changed), making your workflow much smoother all at once.
Using Multiple AI Models for Different Tasks
You can balance efficiency and cost by switching models depending on the task: Claude Opus for reviewing complex logic (flow of processing), a lightweight model like Haiku or Gemini for simple syntax checks, and local Ollama if cost is a priority. You can switch models easily in the settings.
Real-Time Collaboration
If you're writing code as a team, Zed's real-time co-editing feature lets multiple people edit the same file simultaneously while receiving AI reviews. Other members' cursors (their current input positions) are displayed on screen, so you can see at a glance who is editing where.
With Zed AI, you can automate code reviews in seconds, and even beginners can easily perform professional-level checks. Let's review the 3 steps introduced in this article:
The 2026 version of Zed AI has evolved even further, with features like Fast Mode (faster responses) and parallel agents. The free plan is more than sufficient to get started, so give it a try and make your coding workflow more comfortable.
This article is a cross-post from AI Friends.