💻

Claude Codeで書いたコードをGemini CLIにコードレビューさせる

に公開

最近はClaude Codeを使ってコードを書いてるけど、やはりバグとかそういうのはあるわけです。
そこでGemini CLIを使っていい感じにClaude Codeで書いたコードをレビューできればいいなと思いました。

カスタムスラッシュコマンドで連携させればいい

gemini-cli の google_web_search が最高

mizchiさんのこの記事をみて、できるじゃんと思って早速自分も Custom slash commandsを使って /gemini-review というものを用意してみました。

## Gemini Review

`gemini` is the Google Gemini CLI.

Before implementing, follow these steps:
1. First, you (Claude Code) create a plan for the work.
2. Use `gemini` to discuss the plan.
3. Share your discussion with Gemini and the results.

### How to use the command

After the implementation is complete, you can request a review with the following command:
```bash
gemini -p "Review: ..."
```

あとはclaude codeにコードを書かせたあとに /gemini-review すればいい感じにレビューしてもらえます。

緊急度・重要度の高い指摘をもらった場合は修正させて、低い場合はGithub Issuesに登録するように指示している運用をしていますが、結構良いです。

パーティーハード株式会社

Discussion