Claude Code GitHub Actions

Claude Code GitHub Actions (anthropics/claude-code-action@v1) lets you mention @claude in an issue or pull request to have Claude answer, change code and open pull requests; run /install-github-app in Claude Code to set it up.

Claude Code GitHub Actions is Anthropic's GitHub Action, anthropics/claude-code-action@v1, which runs Claude Code inside a repository's workflows: mention @claude in an issue or pull request comment and Claude reads the code, makes changes and pushes commits, or give it a prompt to run on any event such as a schedule (Claude Code GitHub Actions, read Nov 6, 2026). The quickest setup is /install-github-app inside Claude Code. It is separate from Code Review, Anthropic's managed pull request reviewer for Team and Enterprise, and from the GitLab integration, all covered below.

Quick facts

Action anthropics/claude-code-action@v1
Setup /install-github-app (github.com only; needs gh and repo admin)
Secret ANTHROPIC_API_KEY (API billing) or CLAUDE_CODE_OAUTH_TOKEN (your subscription)
Trigger phrase @claude by default
Costs GitHub Actions minutes plus Claude usage
Code Review (managed) Team and Enterprise; generally available Oct 15, 2026
GitLab Beta, maintained by GitLab

Sources for the table: Claude Code GitHub Actions, Code Review, Claude Code GitLab CI/CD and the Claude Code product page, Anthropic, read Nov 6, 2026.

How do you set it up?

Quick setup:

  1. Install the GitHub CLI and sign in with gh auth login.
  2. Open claude in the repository and run /install-github-app.
  3. Claude Code installs the Claude GitHub App, then saves a credential as a repository secret: an API key as ANTHROPIC_API_KEY, or a long-lived subscription token as CLAUDE_CODE_OAUTH_TOKEN.
  4. It pushes a branch with the workflow files you picked and opens a pull request; merge it and @claude works.

You need admin access to the repository, and the command works only with github.com remotes (Claude Code GitHub Actions, read Nov 6, 2026).

Manual setup: install the Claude GitHub App from github.com/apps/claude, add ANTHROPIC_API_KEY from the Claude Console (or a token from claude setup-token, available on Pro, Max, Ultra, Team and Enterprise) as a secret, and copy examples/claude.yml from the action's repository into .github/workflows/. For an organization, install the app once at the organization level and store the key as an organization secret; an API key suits shared use better than an OAuth token, which is tied to one person's subscription.

The basic workflow

This is Anthropic's workflow for answering @claude mentions:

name: Claude Code
on:
  issue_comment:
    types: [created]
  pull_request_review_comment:
    types: [created]
jobs:
  claude:
    if: contains(github.event.comment.body, '@claude')
    runs-on: ubuntu-latest
    permissions:
      contents: write
      pull-requests: write
      issues: write
      id-token: write
      actions: read
    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 1
      - uses: anthropics/claude-code-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}

Then comment on an issue or pull request, for example @claude fix the TypeError in the user dashboard component, and Claude replies in the same thread, updating its comment as it works (Claude Code GitHub Actions, read Nov 6, 2026).

Interactive and automation modes

With no prompt input, the action waits for the trigger phrase in a comment, review or new issue (interactive mode). With a prompt, it runs on whatever event starts the workflow (automation mode), and results go to the workflow log unless the prompt and tools let Claude post. prompt can be plain text or a skill such as /code-review:code-review, and claude_args passes any CLI flag: --model, --max-turns, --allowedTools, --mcp-config. Other inputs include settings, plugins, plugin_marketplaces, trigger_phrase, and use_bedrock, use_vertex or use_foundry to route through a cloud provider (Claude Code GitHub Actions, read Nov 6, 2026).

Only users with write access can trigger runs on issue and pull request events, and bot accounts are rejected unless listed in allowed_bots, so bots cannot set Claude off in a loop. Workflows still on @beta move to @v1 by renaming the tag, dropping mode, renaming direct_prompt to prompt and moving options into claude_args.

Pull request reviews

There are three ways to have Claude review pull requests, and they are easy to confuse.

  • A review workflow with the action: /install-github-app can add one that runs the code-review plugin on each pull request and posts inline comments. You control its prompt, model and triggers, and it bills to your key or subscription.
  • Code Review, Anthropic's managed service: several agents read each change with the surrounding code for logic errors, security holes and broken edge cases, a verification step checks their findings, and results arrive as inline comments ranked by severity plus a check run. A review never approves or blocks a pull request. It is for Team and Enterprise plans, has no flat per-review price (it bills token usage through the organization's usage credits), and is not offered with Zero Data Retention (Code Review, Code Review costs and usage, read Nov 6, 2026). It became generally available on Oct 15, 2026. @claude review asks for one by hand.
  • Locally, /code-review in a session reviews your diff before you push, and /ultrareview sends a fleet of reviewer agents to a cloud sandbox (3 free runs on Pro, Max and Ultra, then typically $5 to $25 in usage credits per run, as of Nov 6, 2026).

What does it cost?

Each run uses GitHub Actions minutes on GitHub-hosted runners and Claude tokens, billed to the API key or, with an OAuth token, to your Claude subscription's usage. Anthropic suggests specific @claude requests, a short CLAUDE.md, --max-turns in claude_args, workflow timeouts and GitHub's concurrency limits to keep both down (Claude Code GitHub Actions, read Nov 6, 2026). See Claude Code Pricing and Claude API Pricing.

Security notes

The Claude GitHub App asks for a broad permission set shared by every Claude feature on GitHub (contents, issues, pull requests, workflows, actions and more), and GitHub does not allow accepting only part of it; organizations that want less can make a custom app with contents, issues and pull requests only, which covers the action but not Code Review. Never commit keys; use secrets, grant the workflow only the permissions it needs, and review Claude's changes before merging (Claude Code GitHub Actions, read Nov 6, 2026). Commits pushed with the default GITHUB_TOKEN do not trigger other workflows, which is why the action authenticates as the Claude app by default.

GitLab

Claude Code also runs in GitLab CI/CD, in beta and maintained by GitLab rather than Anthropic: one job in .gitlab-ci.yml plus a masked API key variable, triggered for example by @claude in issues and merge requests, using the Claude API, Amazon Bedrock or Google Cloud's Agent Platform (Claude Code GitLab CI/CD, read Nov 6, 2026). For other CI systems, see Claude Code Headless and CI.

Frequently asked questions

How do I set up Claude Code GitHub Actions? Run /install-github-app in Claude Code inside the repository, with the GitHub CLI signed in and admin rights. It installs the Claude GitHub App, saves your key or subscription token as a secret and opens a pull request with the workflow.

Can Claude Code review pull requests on GitHub? Yes, three ways: a review workflow with claude-code-action, Anthropic's managed Code Review on Team and Enterprise plans, or /code-review locally before pushing. None of them approves or blocks a pull request on its own.

Does the Claude GitHub Action need an API key? It needs either ANTHROPIC_API_KEY from the Claude Console or CLAUDE_CODE_OAUTH_TOKEN, a token made with claude setup-token that bills to a Pro, Max, Ultra, Team or Enterprise subscription. Cloud providers authenticate through OIDC instead.

Why does Claude not respond to @claude? Check that the GitHub App is installed, workflows are enabled, the secret is set, the comment contains @claude as a whole word, and the commenter has write access to the repository.

Does Claude Code work with GitLab? Yes, through a GitLab CI/CD integration that is in beta and maintained by GitLab. It runs on @claude mentions in issues and merge requests.

Sources

Moments

Claude Code + GitHub Actions

Anthropic

  1. Then comment on an issue or pull request, for example @claude fix the TypeError in the user dashboard component, and…

See also

About this page

Last updated Nov 6, 2026 by the Vi.ki team. Page text CC BY-SA 4.0.

Edit History

Hotkeys

/
Jump to the search box
? or Ctrl + /
Open this list
Esc
Close this list, the photo viewer, or the account menu

Video

Space or K
Play or pause
← →
Back or forward 5 seconds
J L
Back or forward 10 seconds
0 to 9
Go to 0% to 90% of the video
, .
Previous or next frame, while paused
M
Mute or unmute
C
Captions on or off
F
Full screen on or off
A D
Previous or next moment

Photo viewer

← → or A D
Previous or next photo
↑ ↓ or W S
Previous or next photo
Home End
First or last photo
I
Show or hide the photo's info
Z
Clickless on or off: a pointer over a thumbnail shows it
N
Compare with the last photo: back to the one shown before this, and N again comes back
Q
Move the thumbnails to the next edge: top, bottom, left and round
, or Ctrl + ,
Open or close the viewer's settings
V
Clickless pan: a zoomed photo follows the pointer, rather than being dragged
Shift
Browse on or off
B
Show or hide the button bar
T
Show or hide the thumbnails
1
100% zoom on or off
0
Rate the photo as no opinion; again takes the answer back
+ -
Rate the photo a step higher or lower
F
Full screen: the photo alone. F again puts everything back.
Back to top