#068

Claude Code on GitHub: review PRs, fix issues, ship code without opening your terminal

What you do by asking Claude things from your terminal — reviewing PRs, fixing bugs, implementing issues — can now happen inside GitHub instead. One mention and one GitHub App in between.

From zero to professional: Claude Code tips, tutorials and deep dive guides.

Explore the hub

Claude Code on GitHub: manual flow vs @claude mention in the PR

TL;DR Run /install-github-app, the wizard installs Anthropic's GitHub App, adds ANTHROPIC_API_KEY to your repo secrets and drops in a workflow YAML. From there on, every time you mention @claude in a PR or issue, Claude reads the context, proposes changes, pushes commits to the branch and replies in-thread. Under the hood it's the Claude Agent SDK running on a GitHub Actions runner.

What you'd normally do locally — ask Claude to review a PR diff, fix a TypeError in the dashboard, implement what an issue asks for — now happens inside GitHub. No cloning, no terminal. A @claude mention in a comment fires the workflow.

Under the hood: Anthropic's GitHub App listens to events (issue_comment, pull_request_review_comment, issues) and, if the comment contains the trigger phrase, kicks off a job on ubuntu-latest that runs anthropics/claude-code-action@v1 with your API key. It's Claude Code running in the cloud with full permissions over your repo.

What you see when it works

On any PR you write:

@claude the SearchBar.spec.tsx test is failing with "Cannot read 'value' of null".
Can you look at it?

A few seconds later Claude replies with an analysis of the failure, proposes a fix to SearchBar.vue, pushes a commit to the PR's branch, and posts a summary. Without you touching a thing locally.

5-minute setup

1. Install the GitHub App. From your terminal:

claude
/install-github-app

The wizard walks you through: picking the repo, installing the App, adding ANTHROPIC_API_KEY as a secret, and copying the default workflow YAML. You need to be a repo admin. The App requests Contents, Issues, and Pull requests permissions (read & write).

The wizard only covers direct Claude API accounts. For Bedrock or Vertex AI there's extra OIDC setup — see the docs link below.

2. The basic workflow (what the wizard drops in):

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 }}

That's it: responds to @claude mentions in comments. The action auto-detects whether to run in interactive mode (responds to mentions) or automation mode (runs with a pre-set prompt).

3. Auto-review every PR without anyone mentioning Claude. Add a parallel workflow:

name: Code Review
on:
  pull_request:
    types: [opened, synchronize]
jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: anthropics/claude-code-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          prompt: "Review this PR for code quality, correctness, and security. Post findings as review comments."
          claude_args: "--max-turns 5"

claude_args accepts any Claude Code CLI flag (--model, --max-turns, --allowedTools, --mcp-config, etc.).

The 3 settings you'll want to tune

Parameter For When
claude_args: --model claude-opus-4-7 Use Opus 4.7 instead of the default Sonnet Complex PRs where you want more reasoning
claude_args: --max-turns 5 Cap agent iterations Cost control — without it Claude can keep iterating until tokens run out
trigger_phrase: "@bot-review" Change the trigger phrase Avoid colliding with human @claude mentions, or run multiple workflows

CLAUDE.md still rules

The CLAUDE.md at your repo root applies to GitHub Actions sessions too. If it has your conventions, testing standards, and review guidelines, Claude applies them in CI the same way it does locally. That's what turns the setup into "Claude who understands your codebase" instead of "a generic linter". For a refresher on configuring CLAUDE.md, there's a dedicated tip.

Cost

Two vectors. API tokens — billed to your Anthropic account — and GitHub Actions minutes (free up to your plan limit, paid above). To keep the first in check: --max-turns, specific prompts, and don't fire workflows on every synchronize if you don't need to.

Pairs well with

  • Plugins — the action can load plugins via --mcp-config.
  • Skills — invokable from the workflow prompt.
  • Subagents — work the same in cloud as locally.
  • Slash commands cheat sheet/install-github-app lives there along with the other 79.

Official docs: Claude Code GitHub Actions

Get only what matters

If I have nothing worth saying, you won't hear from me. When I do, you'll be the first to know. 7,000+ professionals already trust this.

Are you a professional Web developer?
No

Unsubscribe at any time.