All tools
HarnessCommunity5k

Claude Code Action

Updated Jul 7, 2026

The official Anthropic GitHub Action for running Claude Code in CI pipelines. Responds to @claude mentions in pull requests and issues, performs automatic PR reviews, implements requested fixes, creates branches, and opens pull requests. Supports five authentication backends: Anthropic direct API, workload identity federation, Amazon Bedrock, Google Vertex AI, and Microsoft Foundry. Runs entirely on your own GitHub runner.

View on GitHub

What it does

  • /install-github-app

    Guides setup of the Claude GitHub App and generates the .github/workflows/claude.yml stub for Anthropic direct API users.

  • @claude <instruction>

    Triggers Claude Code in CI from a PR or issue comment; Claude branches, implements the fix, and opens a pull request.

  • Automatic PR review

    Configured via workflow YAML to review every PR on open/update, with optional path filters for critical files.

  • Scheduled automation

    Runs Claude on a cron schedule for repository health checks, documentation sync, or security scans without a human trigger.

  • Structured outputs

    Returns validated JSON results as GitHub Action outputs, enabling downstream steps to consume Claude findings programmatically.

Files (1)

OVERVIEW.mdprimary · markdown · 2.3 KB
## What it does

The official Anthropic GitHub Action that runs Claude Code inside CI. Triggered by @claude mentions in PR comments or issues, by automated prompts in workflow YAML, or by issue assignment. Claude branches, makes the requested change, runs tests, and opens a PR with a progress-tracking comment (checkboxes updated in real time). Also performs automatic PR reviews when configured.

Authentication backends: Anthropic direct API key, workload identity federation (no long-lived secrets), Amazon Bedrock, Google Vertex AI, and Microsoft Foundry.

The action runs entirely on your own GitHub runner — Anthropic API calls go to your chosen provider, no code leaves your infrastructure.

Use cases from the official Solutions Guide:

- Automatic PR code review — full review on every PR open/update
- Path-specific reviews — trigger only when critical files change
- External contributor reviews — special handling for first-time contributors
- Custom review checklists — enforce team-specific standards
- Scheduled maintenance — automated repository health checks on cron
- Issue triage and labeling — automatic categorization from issue body
- Documentation sync — keep docs updated when source files change
- Security-focused reviews — OWASP-aligned analysis on security-sensitive files
- Structured outputs — validated JSON results exposed as GitHub Action outputs for downstream automation

## Install

Quickstart via Claude Code terminal (Anthropic API only):

    /install-github-app

This guides you through installing the GitHub App and adds the workflow YAML stub to .github/workflows/.

For Bedrock, Vertex AI, or Foundry: follow docs/cloud-providers.md for manual setup.

Manual workflow file: add .github/workflows/claude.yml with the action reference and configure triggers (pull_request, issue_comment, issues, schedule, or workflow_dispatch with an explicit prompt).

## When to use

Use the @claude mention mode for on-demand fixes and answers in existing PRs — it's the lowest-friction way to get Claude to make a targeted change. Use the automation mode (explicit prompt in workflow YAML) for scheduled tasks like dependency audits, documentation sync, or security scans. Use structured outputs when you need downstream steps to consume Claude's findings as machine-readable data.