# Claude Code GitHub Actions

CreateWithAI Hub page: https://createwithaihub.com/ai-agents/claude-code-github-actions
Latest version of this file: https://createwithaihub.com/ai-agents/claude-code-github-actions.md

- Type: AI agent · Category: AI Agents
- Publisher: Anthropic (official)
- Pricing: Paid · License: MIT
- Works with: Claude Code

Anthropic's GitHub Action that runs Claude Code in your workflows to answer @claude mentions, review PRs and turn issues into PRs.

Claude Code GitHub Actions (the anthropics/claude-code-action action) runs Claude Code on your GitHub Actions runners. In interactive mode Claude responds when someone mentions @claude in an issue or pull request and can analyse code, push commits and open PRs; with a prompt input it runs automatically on any GitHub event, including schedules and skill invocations. Setup installs the Claude GitHub App and stores an API key or subscription token as a repository secret. It is for teams who want Claude working inside their GitHub repositories.

Useful for: Commenting '@claude fix the TypeError in the dashboard component' on an issue and getting a pull request with the fix.

## Key features

- Interactive mode for @claude mentions and automation mode driven by a prompt on any GitHub event
- Quick setup with /install-github-app in Claude Code, or manual setup with the Claude GitHub App and a workflow file
- Authenticates with a Claude API key, a Claude subscription token (claude setup-token) or workload identity federation
- Runs skills and plugins, passes Claude Code CLI arguments via claude_args, and exposes structured JSON outputs
- Can route inference through Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry
- Executes on your own GitHub runner; MIT-licensed action

## Connection

- Model choice: Vendor models only
- Runs: In the cloud

## Before you start

- Admin access to a GitHub repository
- A Claude API key or a Pro, Max, Ultra, Team or Enterprise subscription (or Bedrock, Agent Platform or Foundry access)

## Install steps from the official documentation

Quick setup (inside Claude Code):

```
/install-github-app
```

Workflow step:

```
- uses: anthropics/claude-code-action@v1
  with:
    anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
```

## Limitations

- Each run consumes GitHub Actions minutes plus Claude API tokens or your Claude subscription usage
- Requires repository admin access to install the app and add secrets; quick setup works only for github.com repositories
- The Claude GitHub App requests a broad permission set shared with other Claude features; a custom app is needed for a narrower set
- Only users with write access trigger runs by default, and bots are rejected unless listed in allowed_bots

## Official links

- Website: https://code.claude.com/docs/en/github-actions
- Source repository: https://github.com/anthropics/claude-code-action
- Documentation: https://code.claude.com/docs/en/github-actions
- Source: https://code.claude.com/docs/en/github-actions (Quick and manual setup, Claude GitHub App and its permissions, secrets, modes, trigger checks, costs, cloud providers, action parameters)
- Source: https://github.com/anthropics/claude-code-action (README: features, runs on your own runner, supported providers, MIT license; not archived)
