$ reference
GitHub Actions
GitHub Actions 上の Claude Code で Boost を使い、エージェントのシェル出力をモデルに渡す前に圧縮します。
Claude Code ワークフロー
anthropics/claude-code-action@v1 を使う最小ワークフローです。エージェントが binary とフックを引き継げるよう、Claude の前に Boost をセットアップします。
.github/workflows/claude.yml
name: Claude Code with Boost
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned]
pull_request_review:
types: [submitted]
jobs:
claude:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write
id-token: write
actions: read
steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
fetch-depth: 1
- name: Install Boost
run: |
set -euo pipefail
curl -fsSL https://boost.jfrog.com/install.sh | bash
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
export PATH="$HOME/.local/bin:$PATH"
boost init --claude --global --accept-terms
- name: Verify Boost on PATH
run: |
set -euo pipefail
command -v boost
boost version
- name: Run Claude Code
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
各ステップの役割
- Install Boost —
install.shで CLI を取得します(jfrog/boost@v0ではありません)。 - PATH —
echo … >> "$GITHUB_PATH"で後続ステップにboostを公開します。同じステップではboost initの前にPATHも export します($GITHUB_PATHは後続にしか効かないため)。 boost init --claude— ランナーに Claude Code フックを入れます。これがないと Claude は Boost の rewrite フックを使いません。--global --accept-termsで CI を非対話にし、規約を~/.boost/config.tomlに記録します。- Verify — Claude 開始前に
command -v boostとboost versionが成功することを確認します。安定後はこのステップを省略できます。 - Run Claude Code — Boost セットアップの後に置き、エージェントが binary とフックを引き継げるようにします。
前提条件
- Linux ランナー(
ubuntu-latestなど)。 boost init … --accept-termsでプレビュー規約に同意(~/.boost/config.tomlに書き込み)。リポの.boost/config.tomlでは terms gate を満たしません。- ジョブ用の Anthropic 認証情報(通常は
secrets.ANTHROPIC_API_KEY)と、Claude Code に必要な permissions。
認証
Anthropic API キーをリポジトリシークレットとして保存し、Claude Code アクションに渡します:
workflow env
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
jfrog/boost@v0 について
公開中の jfrog/boost アクションはレガシー入力を受け付けますが、現状は no-op で CLI をインストールしません。ランナーに boost が必要な場合は install.sh を使ってください。