Set up Claude Code GitHub Actions: automate PRs with @claude (Aug 2026)

From /install-github-app to the v1.0 migration and cost breakdown — sourced from the official docs and repo.

Source for this article

Based on `code.claude.com/docs/en/github-actions` and the `anthropics/claude-code-action` repo, fetched 2026-08-05.

What it does

Mention `@claude` in any issue or PR comment and Claude analyzes code, opens PRs, implements features, and fixes bugs, following your `CLAUDE.md`.

Fastest setup

Run `/install-github-app` in the Claude Code terminal — it installs the GitHub App and walks you through workflow and secret setup. Requires repo admin.

$ claude
> /install-github-app

Manual setup

Install the Claude GitHub App, add `ANTHROPIC_API_KEY` as a repo secret, and copy `examples/claude.yml` into `.github/workflows/`.

v1.0 migration from beta

`mode` is removed (auto-detected), `direct_prompt` → `prompt`, and CLI options like `max_turns`/`model` now go through `claude_args`.

- uses: anthropics/claude-code-action@v1
  with:
    prompt: "Review this PR for security issues"
    claude_args: |
      --max-turns 10

Cost breakdown

Two cost sources: GitHub Actions runner minutes, and API token usage. Reduce cost with tighter `@claude` triggers, `--max-turns` limits, workflow timeouts, and concurrency controls.

Security

Never hardcode API keys — always use GitHub Secrets, keep Action permissions minimal, and have a human review PRs before merging.

FAQ

What's the fastest way to set this up?
Run `/install-github-app` in the Claude Code terminal.
Can I keep using my beta workflow file?
No — v1.0 has breaking changes (mode removed, direct_prompt→prompt, claude_args).
What does it cost?
GitHub Actions runner minutes plus API token usage; limit with --max-turns and timeouts.
Should I hardcode the API key?
No, always use GitHub Secrets.