5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Gemini CLI GitHub Actionsを使った無料のAI記事レビューで開発効率を上げる

Last updated at Posted at 2025-08-08

まえがき

皆さんどうもこんにちは、ECN技術部所属、Fuseです。
本記事では、2025年8月6日にベータ版が無料で公開されたGemini CLI GitHub Actionsを使い、記事のレビューを自動化する方法を紹介します。
GitHub ActionsやLLMを活用した開発効率化に興味があるエンジニアの皆さんを対象に、具体的な設定方法から実際のレビュー結果までを解説します。この記事を読めば、皆さんのプロジェクトでも無料で使えるAI記事レビューアシスタントを導入できるようになりますよ!

やってみる

GeminiのAPIキーの発行(無料)

まずはGeminiのAPIキーを発行してみましょう。
Google AI Studioにサインインし、Get API Keyボタンを押してAPIキー管理用のページに移動。その後APIキーを作成ボタンを押し、指示に従ってAPIキーを作成します。
GetAPIKey.png
APIキーを作成.png
無料APIキーの利用制限は以下の通りです。

  • フラッシュモデルのみ
  • 1分あたり10リクエスト
  • 1日あたり250件のリクエスト

記事のレビュー用ならこれくらいで十分です。
作成したトークンはGEMINI_API_KEYという名前でSecretsに登録しておきます。

Actionsの作成

次にワークフローファイルを作成します。

curl -o .github/workflows/gemini-pr-review.yml https://raw.githubusercontent.com/google-github-actions/run-gemini-cli/main/examples/workflows/pr-review/gemini-pr-review.yml 

を実行してベースとなるgemini-pr-review.yml を取得、その後、記事レビュー用にプロンプトを改変します。変更点は以下の通りです。

  • Role部分
    • 役割を"professional writer of technical articles"(プロの技術記事ライター)に変更
    • 日本語で返信してほしい旨を追加
  • Review Criteria (Prioritized in Review)
    以下のように変更
    1. **Clarity and Searchability of Titles**
      * Does the title allow readers to understand the content of the article at a glance?
      * Does it include search keywords (SEO)?
    2. **Clear Purpose of the Introduction**
      * Why is this article being written? Who is the target audience?
      * Are the issues being addressed and the benefits clearly stated?
    3. **Logical Structure**
      * Is the flow organized as “background → problem → solution → results → summary”?
      * Are the headings (h2/h3) used appropriately?
    4. **Accuracy and reproducibility of code**
      * Does the code actually work?
      * Are the environment, version, and dependencies clearly stated?
    5. **Use of images and charts**
      * Are diagrams and screenshots used as needed?
      * Are captions or explanations provided?
    6. **Definition of Terms and Consideration for Beginners**
      * Are there explanations for technical terms and abbreviations?
      * Are there explanations for points that beginners might find difficult?
    7. **Reliability of Information and Sources**
      * Are links or sources for external information clearly indicated?
      * Is there a clear distinction between subjective and objective information?
    8. **Writing Style and Readability**  
      * Are sentences too long?  
      * Are line breaks, bullet points, and emphasis (bold text, quotes) used appropriately?
    9. **Does it align with Qiita's style?**
      * Is Qiita's Markdown syntax used correctly?
      * Are tags and categories set appropriately?
    10. **Overall reading impression and explicit learning outcomes**
      * Does the content leave readers feeling that they have learned something or want to try it out?
      * Are the key points concisely summarized at the end?
    
  • Miscellaneous Considerations
    以下のように変更
    * Are there any typos or missing characters?
    * Is there any unnatural Japanese?
    * Are there any compliance violations or risks of controversy?
    * Is there anything written that could damage the company's image?
    

実際にPRを出してみる

早速実際にPRを出してみましょう。
試しにこの記事のWIP版を提出してみます。
レビュー結果.png
いい点、悪い点ともに書いてくれました。
レビュー結果3.png
総括の後にはこのように気になる点を重要度、該当箇所、改善案とともに列挙してくれます。
これでフィードバックの反映もやりやすくなりますね。
2回目以降はPRのコメントに@gemini-cli /reviewと入力すると再レビューを行ってくれます。

あとがき

今回は無料で公開中のGemini CLI GitHub Actionsを使って記事の自動レビュー機構を作ってみました。
レビューの品質はなかなかに高く、記事のブラッシュアップがやりやすくなりました。
また、改造のためにワークフローファイルを読み解いたことでGitHubActionsにも少し詳しくなれました。
無料なので皆さんもぜひ使ってみてはいかがでしょうか?

参考記事

開発者ブログ記事のレビューの仕方をご紹介します
ChatGPT・GitLab CI・Azure OpenAI・Cursorで技術ブログのレビュー&公開を自動化してみた話


株式会社ECN
株式会社ECNはPHP、JavaScriptを中心にお客様のご要望に合わせたwebサービス、システム開発を承っております。 ビジネスの最初から最後までをサポートを行い お客様のイメージに合わせたWebサービス、システム開発、デザインを行います。

5
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?