Claude Code GitHub Integration — Automate PRs and Reviews with @claude

The Claude Code GitHub integration — use @claude in PRs/issues to analyze code, create PRs, and auto-review — with 3-step setup, two modes, and key cautions, based on official docs.

The Claude Code GitHub integration lets you mention @claude in a PR or issue so Claude analyzes code, creates PRs, implements features, or fixes bugs — automatically. It runs on top of GitHub Actions, so once set up, AI works inside your development pipeline rather than just in chat. (As of June 2026 · Official: code.claude.com/github-actions)

Starts with one @claude mention PR/issue comment"@claude fix thisbug" GitHub Actionsworkflow triggers(claude.yml) Read codecodebase+ CLAUDE.md ResultPR·review·fix You write one comment; the rest runs in the pipeline Source: code.claude.com/github-actions · as of 2026.6

What the integration is

Per the official docs, Claude Code GitHub Actions lets a simple @claude mention in a PR or issue analyze code, create PRs, implement features, and fix bugs — all while following your project's standards. It's built on top of the Claude Agent SDK.

What it automates

  • Instant PR creation — describe what you need and it opens a PR with the changes applied.
  • Automated code review — on each PR, it analyzes the diff and adds comments/suggestions.
  • Issue → implementation — mention @claude in an issue and it reads it, implements, and opens a PR.
  • Ask in comments — ask questions in a PR/issue thread and it answers.
Setup is roughly three steps 1Install app/install-github-apprun in terminal (easiest) 2Workflow.github/workflows/claude.ymlaction@v1 added 3API keySettings > SecretsANTHROPIC_API_KEYyou add the key yourself Versions/options follow the official docs and may change. Source code.claude.com · github.com/anthropics/claude-code-action

Setting it up

The easiest way is to open Claude Code in your terminal and run /install-github-app. This command guides you through installing the GitHub app and configuring the required secrets. There are roughly three steps:

  1. Install the GitHub app — connect the app to your repo via /install-github-app (or use the official Anthropic app).
  2. Workflow file — a .github/workflows/claude.yml is created, using anthropics/claude-code-action@v1.
  3. API key as a secret — add ANTHROPIC_API_KEY under your repo's Settings > Secrets and variables > Actions. Never put the key in code or articles — keep it only as a GitHub Secret.

Two modes

Interactive mode listens for @claude mentions in PR comments, issues, and review threads, then runs the request. Automation mode gives a prompt parameter directly in the workflow YAML and runs headlessly on events like PR opened, CI failure, or issue created. Many teams use both — interactive for ad-hoc developer requests, automation for continuous gatekeeping (e.g., auto-reviewing every PR).

Things to know

  • Two cost lanes — it runs on GitHub-hosted runners (consuming GitHub Actions minutes) and each job also consumes API tokens.
  • Passing standards — Claude gets context and rules from the codebase and your CLAUDE.md. Clear rules make results consistent.
  • Testing matters — the more automated tests you have to confirm an AI-made PR didn't break anything, the faster you can move with confidence.
  • Enterprise — you can configure it with your own cloud (AWS Bedrock, Google Vertex AI) for control over data residency and billing.

Different from driving GitHub locally

Claude Code in your terminal can also read issues or open PRs via the gh CLI or an MCP server. That's "you driving it from your machine." The GitHub Actions integration in this article is different — it runs automatically inside the repo via @claude mentions and events.

Disclaimer: This article is based on Anthropic's official Claude Code docs (code.claude.com) and the official action repo (anthropics/claude-code-action). The action version (@v1 etc.), workflow options, and default model may change by policy and version. Cost varies widely by usage, plan, and runner, so no specific amount is stated. Keep secrets like API keys only in GitHub Secrets, and perform setup input yourself. Check the official docs for the latest. This site is not affiliated with Anthropic.

Keep reading

Have a question or want to share how you use Claude?

Join the community to share tips with other users, or explore more guides.