Skip to main content
guidesSource-backedReview first Safety Privacy

Claude Code GitHub Actions Review Workflow

Set up Claude Code GitHub Actions for pull request review: install the Claude GitHub app, store ANTHROPIC_API_KEY in secrets, use anthropics/claude-code-action@v1 with prompt-based automation, and follow documented security practices.

by kiannidev·added 2026-06-16·
HarnessClaude Code
Review first review before installing

Open the source and read safety notes before installing.

Safety notes

  • The Claude GitHub app requests Contents, Issues, and Pull requests read and write permissions—scope installation to intended repositories.
  • Never commit API keys; use GitHub encrypted secrets such as ANTHROPIC_API_KEY.
  • Review Claude suggestions before merging; automation should not bypass CODEOWNERS.
  • Workflows consume GitHub Actions minutes and Claude API tokens—set timeouts and max-turn limits.

Privacy notes

  • PR diffs and issue comments are sent to the model provider during workflow runs.
  • Logs may retain prompts—align retention with corporate data handling rules.
  • Use repository secrets rather than echoing credentials in workflow YAML.

Prerequisites

  • Repository admin access to install the Claude GitHub app and add secrets.
  • Anthropic API access or approved provider setup documented for your org.
  • A CLAUDE.md or review rubric describing project standards.
  • Branch protection requiring human review before merging automation output.

Schema details

Install type
copy
Reading time
9 min
Difficulty score
54
Troubleshooting
Yes
Breaking changes
No
Full copyable content
Run /install-github-app or follow manual setup, add ANTHROPIC_API_KEY as a GitHub secret, copy the example workflow using anthropics/claude-code-action@v1, then trigger review with @claude comments or a pull_request prompt job.

About this resource

TL;DR

Official Claude Code GitHub Actions documentation describes installing the Claude GitHub app, storing ANTHROPIC_API_KEY in repository secrets, and running anthropics/claude-code-action@v1 workflows triggered by @claude mentions or automation prompt inputs. Use CLAUDE.md for review standards and keep human merge approval.

Prerequisites & Requirements

  • {"task": "Admin access", "description": "Can install GitHub app and add Actions secrets"}
  • {"task": "API credential", "description": "ANTHROPIC_API_KEY or documented cloud provider setup"}
  • {"task": "Review rubric", "description": "CLAUDE.md or prompt text defines review criteria"}
  • {"task": "Human gate", "description": "Maintainers review automation output before merge"}

Core Concepts Explained

Interactive vs automation mode

The v1 action auto-detects mode: @claude mentions in issue or PR comments run interactively, while workflows that pass a prompt input run immediately (for example on pull_request opened/synchronize events).

GitHub app permissions

Manual setup documentation lists required app permissions: Contents, Issues, and Pull requests (read and write) so Claude can respond, edit files, and open PRs.

v1 configuration surface

GA workflows use prompt for instructions and claude_args for CLI flags such as --max-turns, --model, and --append-system-prompt (replacing beta direct_prompt, mode, and scattered inputs).

Step-by-Step Implementation Guide

  1. Quick setup. In Claude Code terminal run /install-github-app to guide app install and secret creation (direct Claude API users per docs).

  2. Manual fallback. Install https://github.com/apps/claude, add ANTHROPIC_API_KEY repository secret, and copy examples/claude.yml from the Claude Code Action repository into .github/workflows/.

  3. Add review workflow. Example automation from official docs:

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 pull request for correctness and security issues"
          claude_args: "--max-turns 10"
  1. Optional plugin skill review. Docs show installing a plugin with plugin_marketplaces and plugins, then passing a namespaced /plugin:skill prompt on pull_request events.

  2. Configure CLAUDE.md. Document code style, review criteria, and patterns Claude should follow during reviews.

  3. Set cost guards. Use claude_args --max-turns, workflow timeouts, and concurrency controls documented in the CI costs section.

  4. Require human merge. Treat workflow comments as suggestions until a maintainer approves and merges.

Troubleshooting

Action still on @beta inputs

Upgrade to @v1, replace direct_prompt with prompt, and move CLI flags into claude_args per the breaking changes table in official docs.

@claude does not respond

Confirm the GitHub app is installed on the repository and ANTHROPIC_API_KEY secret exists; verify workflow listens to issue_comment or pull_request_review_comment.

Bedrock or Vertex setup

Follow the separate "Using with Amazon Bedrock & Google Vertex AI" section for OIDC, service accounts, and optional custom GitHub App configuration—do not reuse direct API secret steps alone.

Source Verification Notes

Verified against https://code.claude.com/docs/en/github-actions on 2026-06-16:

  • Quick setup uses /install-github-app; manual setup uses the Claude GitHub app and ANTHROPIC_API_KEY secret.
  • GA workflows use anthropics/claude-code-action@v1 with prompt and claude_args.
  • App permissions include Contents, Issues, and Pull requests read/write.
  • Docs describe @claude comment triggers and automation prompts on events like pull_request and schedule.
  • Security section requires GitHub Secrets and reviewing suggestions before merge.

Duplicate Check

Complements github-actions-security-review-capability-pack (workflow security review skill) and review-ai-generated-code-before-merge (human review practices). No existing guide walks through official Claude Code GitHub Actions setup for PR review automation end to end.

References

Source citations

Add this badge to your README

Show that Claude Code GitHub Actions Review Workflow is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/guides/claude-code-github-actions-review-workflow.svg)](https://heyclau.de/entry/guides/claude-code-github-actions-review-workflow)

How it compares

Claude Code GitHub Actions Review Workflow side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

FieldClaude Code GitHub Actions Review Workflow

Set up Claude Code GitHub Actions for pull request review: install the Claude GitHub app, store ANTHROPIC_API_KEY in secrets, use anthropics/claude-code-action@v1 with prompt-based automation, and follow documented security practices.

Open dossier
Secret Handling For MCP Servers And Agent Tools

A practical guide for handling secrets when connecting MCP servers and authoring Agent SDK tools in Claude Code: env expansion in .mcp.json, OAuth scope pins, keychain storage, local scope, and redaction before tool arguments reach the model.

Open dossier
Claude Process Automation

Automate business and engineering processes with Claude Code: headless `claude -p` runs, GitHub Actions, scheduled routines, and in-session loops, with permission and output-format guidance.

Open dossier
Routines For Recurring Claude Code Maintenance

Use Claude Code routines for recurring maintenance: schedule triggers, API and GitHub events, scoped connectors, and review of autonomous cloud runs for backlog grooming, docs drift, and deploy verification.

Open dossier
Trust
Install riskReview firstReview firstReview firstReview first
Notes Safety Privacy Safety Privacy Safety Privacy Safety Privacy
Categoryguidesguidesguidesguides
Sourcesource-backedsource-backedsource-backedsource-backed
AuthorkiannidevkiannidevJSONboredkiannidev
Added2026-06-162026-06-162025-10-272026-06-16
Platforms
Claude Code
Claude Code
Claude Code
Claude Code
Source repo
Safety notesThe Claude GitHub app requests Contents, Issues, and Pull requests read and write permissions—scope installation to intended repositories. Never commit API keys; use GitHub encrypted secrets such as ANTHROPIC_API_KEY. Review Claude suggestions before merging; automation should not bypass CODEOWNERS. Workflows consume GitHub Actions minutes and Claude API tokens—set timeouts and max-turn limits.Stdio MCP servers inherit environment variables you pass via --env or .mcp.json env blocks; treat that as handing the server your credentials. HTTP MCP headers and OAuth tokens authenticate outbound calls; a compromised server or overly broad scope can exfiltrate data through tool results. Agent SDK tool descriptions, inputs, and outputs enter model context each turn—never embed live secrets in schemas or sample responses. Project-scoped .mcp.json is designed for version control; use ${VAR} expansion and local scope for machine-specific secrets instead of committing raw keys.Automated runs can execute Bash and edit/write files. Scope `--allowedTools` and `--permission-mode` tightly; `dontAsk` denies anything outside your allow rules. Routines run with no approval prompts, so limit repositories, connectors, and network access to what each task actually needs.Routines run as full autonomous cloud sessions with no approval prompts—scope repos, network, and connectors narrowly. Actions through GitHub or connectors appear as your linked identity; treat routine output like your own commits and messages. Enable unrestricted branch pushes only on repositories where pushing to existing branches is explicitly approved.
Privacy notesPR diffs and issue comments are sent to the model provider during workflow runs. Logs may retain prompts—align retention with corporate data handling rules. Use repository secrets rather than echoing credentials in workflow YAML.MCP tool arguments, resource contents, and error messages can contain API keys, JWTs, customer IDs, and internal URLs that flow into session transcripts. OAuth access tokens for remote MCP servers are stored in the macOS Keychain or a credentials file; revoke with Clear authentication in /mcp when offboarding. Agent SDK handlers that call external APIs may log request metadata; redact at the handler boundary before traces or support exports leave your environment. Shared .mcp.json templates should name required variables (for example API_KEY) without example values that look like real credentials.Headless and CI runs read your codebase and any piped stdin; GitHub Actions and routines need an `ANTHROPIC_API_KEY` or provider credentials stored as secrets, never hardcoded in workflow files. Routine actions appear under your linked GitHub and connector identities, so commits, PRs, and connector writes are attributed to you.Routine prompts and run transcripts may include proprietary code, issue titles, and connector payloads. API trigger tokens are secrets; store bearer tokens in a secret manager, not in public CI logs. Slack, Linear, or other connector actions may expose internal project metadata to linked workspaces.
Prerequisites
  • Repository admin access to install the Claude GitHub app and add secrets.
  • Anthropic API access or approved provider setup documented for your org.
  • A CLAUDE.md or review rubric describing project standards.
  • Branch protection requiring human review before merging automation output.
  • Inventory of MCP servers (stdio, HTTP, or plugin) and any Agent SDK custom tools in your project.
  • Access to .mcp.json, user settings, and environment variables on developer machines.
  • Team policy for secret stores, rotation, and what may appear in version control.
  • Ability to test MCP connections in a non-production profile before granting production credentials.
— none listed
  • Claude Pro, Max, Team, or Enterprise with Claude Code on the web and routines enabled.
  • GitHub repositories authorized for cloud sessions and routine branch pushes.
  • Connectors (MCP) only for services the routine truly needs; remove unused defaults.
  • A human reviewer for autonomous runs before merging routine-opened pull requests.
Install
Config
Citations
ClaimUnclaimedUnclaimedUnclaimedUnclaimed

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.