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-appManual 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 10Cost 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.