0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

claude code action をさらっと install

Last updated at Posted at 2025-05-28

claude code action (cca) の初期 setup 方法を公式の情報を元にさらっと記述します

自動設定する場合

gh command

  • gh command を install
  • cca を install する github account へアクセス出来るように設定しておきます

claude code を install

claude code を install し初期設定を完了させます

github app install

claude code から setup を開始する

  • claude code を実行し /install-github-app を投入
    https___qiita-image-store.s3.ap-northeast-1.amazonaws.com_0_118627_b09dcc7b-ef32-44c7-aed6-db5f18e38627.png

  • repository を選択し、Enter を押下
    スクリーンショット 2025-05-28 17.39.11.png

claude app を github へ install

ブラウザに claude install 画面が自動で開きます

  • install を選択
    スクリーンショット 2025-05-28 16.44.08.png
  • install 先の account を選択
    スクリーンショット 2025-05-28 16.44.16.png
  • install 先の repsitory を選択し、install ボタンを押下
    スクリーンショット 2025-05-28 16.44.21.png
  • claude code 画面に戻り Enter を押下
    • api key の設定がなければ投入を求められます
    • api key を投入し Enter
      スクリーンショット 2025-05-28 17.16.32.png
  • 問題なければ自動で各種設定がなされます
    スクリーンショット 2025-05-28 16.58.08.png

github worki flow のコミット

上述の自動設定後にブラウザに pull request 画面が自動で開きます
以下の様な cca 向けの workflow file となっているはずです.

問題なければ PR を merge します

スクリーンショット 2025-05-28 16.45.26.png

以上で使用できる状態になります

手動設定する場合

上記が失敗する場合は, 手動での設定も可能です
以下を参照ください

github へ claude app を install

以下 claude app 画面から github へ install を実行

github action secret へ api key を設定

  • 操作対象となる repository の setting を開く
  • Secrets and VariableActions を選択
  • New repository secret を選択
  • api key を ANTHROPIC_API_KEY として保存します
    スクリーンショット 2025-05-28 17.22.20.png

work flow yaml を追加

  • プロジェクトに .github/workflows/claude.yml を作成
  • 後述の URL の内容を上記へコピーし commit
  • github へ push します

以上、手動での設定は完了となります

使い方

簡単な一例

  • 適当な issue を作成し、task を記述します
    スクリーンショット 2025-05-28 17.35.47.png
  • issue の comment へ @claude と mention して指示を記述します
    • workflow が走り、claude からのコメントが記述されます
  • このコメントは workflow が進むと内容が更新されていきます
    スクリーンショット 2025-05-28 17.31.24.png
  • 以下の様に各種 link の提示と完了報告がなされます
    • view job を開くと実行過程を閲覧可能
    • Create PR を選択すると PR の画面へ移動します
      スクリーンショット 2025-05-28 17.34.49.png

以上となります

余談

上記の小さな task では $0.2 程かかりました

0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?