The Navigator · 11 min mission

Claude Code on GitHub and CI

Stop conflating the four ways Claude reaches GitHub, and wire up the right one.

githubcigithub-actionscode-reviewautomationclaude-codeFact-checked 2026-06-15
On this page

Four separate products let Claude reach GitHub. They differ on where the compute runs: two run on your GitHub Actions runner with your key, two run on Anthropic-managed cloud. Each section below gives the exact command, flag, and config key.

IntegrationComputePlanTrigger / setup
claude-code-action@v1Your GitHub runnerAny with API access@claude mention or a prompt; install via /install-github-app
Code Review (managed)Anthropic's cloudTeam / EnterpriseAdmin settings; @claude review or per-repo behavior dropdown
Web + Auto-fixAnthropic's cloudPro / Max / Teamclaude.ai/code; Auto-fix toggle or /autofix-pr (needs the App)
/code-review (local)Your machineAnyRun in a Claude session; --comment / --fix
The four GitHub integrations. Match the row to your plan and where you want compute to run.

1. GitHub Action — claude-code-action@v1

anthropics/claude-code-action@v1 runs Claude Code on GitHub's runners as a CI step. v1 is GA (latest tag v1.0.148, published 2026-06-13; the floating v1 points at it). The old @beta reference is deprecated. v1 auto-detects mode: it runs interactive (responds to @claude mentions) or automation (runs a prompt immediately) based on configuration — there is no mode: input. You shape behavior with two inputs: prompt (plain instructions or a skill name) and claude_args (any Claude Code CLI flag, passed straight through).

.github/workflows/claude.yml — minimal @claude responder
yaml
name: Claude Code
on:
  issue_comment:
    types: [created]
  pull_request_review_comment:
    types: [created]
jobs:
  claude:
    runs-on: ubuntu-latest
    steps:
      - uses: anthropics/claude-code-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
Input / flagDefaultPurpose
prompt— (optional)Instructions or a skill name; passing it forces automation mode
claude_args""Passthrough Claude Code CLI flags
anthropic_api_key— (required for direct API)Claude API key secret
trigger_phrase@claudeMention that wakes interactive mode
branch_prefixclaude/Prefix for branches Claude pushes
use_bedrock / use_vertexfalseSwitch auth to Bedrock / Vertex over OIDC
settings""Claude Code settings as JSON string or file path (replaces claude_env)
claude_args: --modelunsetModel id, e.g. claude-sonnet-4-6
claude_args: --max-turns10Agent-loop turn cap
claude_args: --allowedToolsunsetAllowed tool list (--allowed-tools also accepted)
claude_args: --mcp-configunsetMCP server config
Core v1 inputs and `claude_args` CLI flags, with defaults (from the action `usage.md`).

Beyond comment triggers, the Action fires on issues (opened, assigned, labeled) and pull_request_review (submitted), and on any event once you pass a prompt (e.g. pull_request, schedule). These phrasings work verbatim in issue/PR comments: @claude implement this feature based on the issue description, @claude fix the TypeError in the user dashboard component, @claude how should I implement user authentication for this endpoint?

Install with /install-github-app

  1. Run the installer

    Open claude inside the repo and run /install-github-app. It installs the Claude GitHub App, adds the required secret, and drops in a starter workflow. You must be a repository admin, and this path is for direct Claude API users only (Bedrock/Vertex/Foundry follow the cloud-provider section).

  2. Or set it up manually

    Install the App at https://github.com/apps/claude with read & write on Contents, Issues, and Pull requests; add ANTHROPIC_API_KEY to repository secrets; copy examples/claude.yml into .github/workflows/.

  3. Test it

    Comment @claude on any issue or PR. The Action should respond within a few seconds. If nothing happens, use the troubleshooting tool below.

Old (beta) inputv1 replacement
anthropics/claude-code-action@betaanthropics/claude-code-action@v1
mode: "tag" / mode: "agent"Deleted — mode is auto-detected
direct_prompt:prompt:
custom_instructions:claude_args: --append-system-prompt
max_turns:claude_args: --max-turns
model:claude_args: --model
allowed_tools:claude_args: --allowedTools
claude_env:settings (JSON string or file path)
Beta → v1 migration. Anything in the left column is pre-v1; rewrite it to the right.

2. Managed Code Review

Code Review has no workflow file. A fleet of agents analyzes each PR's diff against the full codebase in parallel on Anthropic's infrastructure, a verification step filters false positives, and findings post as inline comments ranked by severity. It is a research preview, Team and Enterprise only, and not available under Zero Data Retention. Pricing is usage-based at ~$15–25 per review (~20 min average), charged via usage credits, billed separately, and it does not count against plan usage.

Enable managed Code Review (admin, once)

  1. Open admin settings

    Go to claude.ai/admin-settings/claude-code → the Code Review section → Setup.

  2. Install the App and pick repos

    Install the Claude GitHub App (Contents/Issues/PRs read+write) and select repositories.

  3. Set per-repo behavior

    Each repo gets a Review Behavior dropdown: Once after PR creation, After every push, or Manual. Set a monthly spend cap at claude.ai/admin-settings/usage; view analytics at claude.ai/analytics/code-review.

Steer Code Review with two files. CLAUDE.md supplies project context (read at every directory level; new violations flagged as nits). REVIEW.md lives at the repo root, is review-only, and is injected as the highest-priority instruction into every review agent — passed verbatim, so @import syntax is not expanded there. Use REVIEW.md to tune severity, cap nits, skip rules, add repo-specific checks, or reshape the summary.

On Pro or Max, or with no GitHub App, the /code-review slash command runs the same engine in any Claude Code session against the current diff. --comment posts inline PR comments, --fix applies fixes, and /code-review ultra --fix runs the heavier cloud ultrareview.

3 & 4. Claude Code on the web and Auto-fix

Claude Code on the web runs tasks on Anthropic-managed cloud VMs at claude.ai/code, monitorable from the Claude mobile app. It launched 2025-10-20 as a research preview and expanded to Team/Enterprise on 2025-11-12; it is available to Pro, Max, and Team (plus Enterprise with the right seats). A session clones the repo to a fresh VM, runs a setup script, lets Claude work, then pushes a claude/-prefixed branch you review (with a +42 -18 diff indicator) before clicking Create PR.

Its GitHub feature is Auto-fix pull requests: Claude watches a PR and responds automatically to CI failures and review comments, pushing fixes when the path is clear. Auto-fix requires the Claude GitHub App (for PR webhooks). Enable it per-PR from the web CI status bar's Auto-fix toggle, from the terminal with /autofix-pr on the PR branch, or from the mobile app.

Routines are saved Claude Code configs (prompt + repos + connectors) that run autonomously on the cloud, triggered by a schedule, an API call, or GitHub events like pull_request.opened. GitHub triggers also require the Claude GitHub App. Manage routines at claude.ai/code/routines or with /schedule (list/update/run). The API trigger is POST https://api.anthropic.com/v1/claude_code/routines/<trig_id>/fire with Authorization: Bearer and header anthropic-beta: experimental-cc-routine-2026-04-01.

PropertyValue
OSUbuntu 24.04
Resources~4 vCPU / 16 GB RAM / 30 GB disk
RuntimesPython, Node 20/21/22, Ruby, PHP 8.4, Java 21, Go, Rust, C/C++, Docker, PostgreSQL 16, Redis 7.0
Carried overCLAUDE.md, .claude/settings.json hooks, .mcp.json, .claude/skills|agents|commands
NOT carried over~/.claude/*, claude mcp add servers, static secrets (use env vars)
Network defaultTrusted (large allowlist; blocked hosts return 403 + x-deny-reason: host_not_allowed)
Move web↔terminalclaude --remote "<task>", claude --teleport [<id>], in-session /teleport (/tp)
Cloud VM environment for Claude Code on the web (fresh per session). `gh` is NOT pre-installed.

Self-run vs. Anthropic-managed

Runs on your runner

claude-code-action — compute is your GitHub Actions runner, billed to your API key. You own the workflow file, the triggers, the tools, and the model. Works on any plan with API access. Use it to run Claude as a CI step.

Runs on Anthropic's cloud

Code Review (Team/Enterprise, ~$15–25/review, no workflow file) and Web + Auto-fix (Pro/Max/Team, your normal rate limits, no extra compute charge). You own only the trigger; Anthropic owns the machine.

Three review triggers, three prerequisites
… scroll to run this session
Near-identical commands with different prerequisites: managed service vs. self-run Action vs. local slash command.

Diagnose a silent @claude or the wrong review firing

Symptom → fix

Pick what you're seeing. A question or two later you land on the exact command to run — every step pulled straight from the Claude Code troubleshooting docs.

Where does it hurt?

Walk the common GitHub-integration failures — silent @claude, missing webhooks, the wrong review firing — to the fix.

Knowledge check

You are on the Pro plan and want Claude to automatically review every pull request in your repo. Managed Code Review is greyed out for you. What is the right move?

Reach the end and this star joins your charted sky.