Tool Combos

Claude Code + GitHub Actions: ask @claude to fix issues and review pull requests

Mention @claude in a GitHub issue or pull request and Claude reads the code, replies in a comment and can push commits or open a pull request. This page explains what you get, what it costs and how to set it up from the official documentation.

By AI RightFitChecked Official sources listed below

At a glance

What you getReplies, code changes and pull request reviews posted inside GitHub
Typical costFree Actions on public repos + your Claude plan or API usage
Skill levelIntermediate
Runs onGitHub-hosted runners

What you get

Claude Code GitHub Actions is an official GitHub Action from Anthropic, anthropics/claude-code-action, that runs Claude Code inside your repository's workflows. It works in two modes:

  • Interactive: someone with write access comments @claude on an issue or pull request, for example "@claude fix the TypeError in the user dashboard component". Claude replies in a comment, updates it as it works and can push commits or open a pull request.
  • Automation: you give the workflow a prompt, and Claude runs on a GitHub event without a mention, such as reviewing every new pull request or writing a daily summary of commits and open issues on a schedule.

The useful output is work that lands where your team already looks: a review comment on the line with the problem, a branch with the fix, or a report in the workflow log.

What it costs

The official docs say each run uses two kinds of resources.

Cost components (checked 24 November 2026)
ComponentWhat the docs say
GitHub Actions minutesStandard GitHub-hosted runners are free in public repositories. GitHub Free includes $12 of compute usage a month for private repositories, expressed as money rather than minutes. At the $0.006 a minute standard Linux 2-core rate, that is about 2,000 minutes (our calculation).
Claude usageWith an API key, tokens are billed per use; the Claude API price list shows Claude Sonnet 5.5 at $2 input and $10 output per million tokens. With an OAuth token from a Pro, Max, Team or Enterprise subscription, runs use your subscription instead of API billing.

Our Claude record lists Pro at $20 a month and Max from $100. A solo developer with a public repository and a Pro plan therefore pays no extra platform fee, but heavy use counts against the subscription's usage limits.

Set it up

You need admin access to the repository. The quick path from the docs:

  1. Install the GitHub CLI and sign in with gh auth login.
  2. Open Claude Code in your repository and run /install-github-app.
  3. Follow the prompts. Claude Code installs the Claude GitHub App and saves your credential as a repository secret, either ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN (created with claude setup-token).
  4. Merge the pull request it opens with the workflow files.
  5. Test it by commenting @claude on an issue.

The manual path is the same idea: install the Claude GitHub App, add the secret, and copy the example workflow into .github/workflows/. The core of that workflow is:

on:
  issue_comment:
    types: [created]
jobs:
  claude:
    if: contains(github.event.comment.body, '@claude')
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 1
      - uses: anthropics/claude-code-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}

The full example in the docs also sets the job permissions the action needs, including id-token: write. Copy it from the official page rather than this shortened version.

Keep runs cheap

  • Write specific requests so Claude needs fewer turns.
  • Add --max-turns in claude_args, for example claude_args: "--max-turns 5".
  • Set a workflow timeout and use GitHub's concurrency controls so runs cannot pile up.
  • Keep CLAUDE.md short: Claude reads it on every run.
  • Use issue templates so the context is in the issue from the start.

A first job to try

Pick a small, boring issue you already understand, such as a typo in an error message or a missing input check. Write it up the way you would for a new teammate: which file, what is wrong, what "done" looks like. Then comment:

@claude Fix the typo in the error message in src/login.js ("pasword" -> "password").
Keep the change to that one line and open a pull request.

Watch the Actions tab for the run, then read the pull request like any other: does the diff touch only what you asked? Did your tests run? Starting with a job you could do yourself in two minutes is the fastest way to learn how specific your requests need to be, and it costs very little if the run goes wrong.

Safety checks

  • Never commit an API key or token. Store it as a GitHub secret.
  • The Claude GitHub App asks for a broad permission set because it is shared by several Claude features. If your organisation only allows contents, issues and pull requests, the docs explain how to create a custom app with just those.
  • By default only users with write access can trigger runs, and bots are rejected unless listed, which stops loops.
  • Review Claude's changes before merging, the same as any other contributor's.

Sources

Related records: Claude pricing record · Github Copilot pricing record

Setup steps and facts come from the official documentation linked on each page, checked on the date shown. We have not tested every combination on every computer; cost examples are illustrative.

Editorial policy · Report a mistake