with one click
claude-code-github-actions
Use when setting up or debugging Claude Code GitHub Actions automation, or deciding whether to route CI/CD tasks to GitHub Actions vs local session.
Menu
Use when setting up or debugging Claude Code GitHub Actions automation, or deciding whether to route CI/CD tasks to GitHub Actions vs local session.
Based on SOC occupation classification
Use when unsure which Claude Code capability fits a task, when about to single-thread large/cross-cutting/repetitive work, or when you or the user ask what Claude Code can do — loads the full capability map (signal → capability) and points to the deep-dive skills.
Use when building custom AI agents headlessly, embedding Claude Code tools in an app, or running scripted/cron agents—need SDK package names, setup, core API entry points, supported languages, and relation to Claude Code CLI and Messages...
Use when needing to understand or manage background agents, long-running tasks, polling, scheduling, or async work in Claude Code without blocking the session.
Use when you need to undo code edits, explore alternatives without losing a starting point, recover from a bad edit path, or restore previous conversation state — press Esc Esc or run /rewind to open checkpoints menu.
Use when a task is too big for one context — broad audits, multi-file migrations, multi-source research, or parallel multi-dimension review — and you want to fan out and orchestrate many subagents deterministically with the Workflow tool (requires ultracode / explicit opt-in).
Use when deciding how to work on a task - choosing effort level, model, or fast mode to balance reasoning depth, speed, and token cost.
| name | claude-code-github-actions |
| description | Use when setting up or debugging Claude Code GitHub Actions automation, or deciding whether to route CI/CD tasks to GitHub Actions vs local session. |
| user-invocable | true |
Claude Code GitHub Actions (anthropics/claude-code-action@v1) runs Claude inside GitHub Actions. Triggered by @claude mentions in PR/issue comments or automatically on repository events. Responds with code changes, reviews, implementations. Executes server-side on GitHub runners (not locally).
Distinct from: GitHub MCP server (raw API access); local Claude Code CLI (interactive terminal); GitHub Code Review (automatic PR reviews without triggers).
Quick install: Run /install-github-app in Claude Code terminal. Guides you through:
https://github.com/apps/claudeANTHROPIC_API_KEY to repository secrets.github/workflows/claude.ymlRequirements: Repository admin access. GitHub App requests read & write permissions for Contents, Issues, and Pull Requests.
Manual setup (if quickstart fails or for cloud providers):
https://github.com/apps/claudeANTHROPIC_API_KEY secret to repositoryhttps://github.com/anthropics/claude-code-action/blob/main/examples/claude.yml into .github/workflows/Tag-based (responds to mentions):
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 }}
# Omit prompt → Claude waits for @claude mention
Automation (runs on event):
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: "/code-review:code-review"
# Has prompt → Claude runs immediately
| Param | Required | Purpose |
|---|---|---|
prompt | No* | Instruction or skill invocation (e.g., "/code-review:code-review" or plain text). Omit for tag-based mode. |
claude_args | No | CLI flags as single string (e.g., "--max-turns 5 --model claude-opus-4-8") |
anthropic_api_key | Yes** | Claude API key from secrets |
plugin_marketplaces | No | Newline-separated plugin Git URLs |
plugins | No | Newline-separated plugin names to install |
github_token | No | Custom GitHub token (auto-generated if using GitHub App) |
trigger_phrase | No | Custom @mention trigger (default: @claude) |
use_bedrock | No | Route to Amazon Bedrock instead of Claude API |
use_vertex | No | Route to Google Vertex AI instead of Claude API |
Prompt optional — omit for tag-based mode (responds to @claude mentions).
*Required for Claude API; not needed for Bedrock/Vertex (use cloud auth instead).
✅ Route to GitHub Actions for:
@claude comments❌ Use local Claude Code instead for:
Tag-based (default): Omit prompt. Claude responds only to @claude mentions.
Automation: Add prompt. Claude runs immediately on event without waiting for mention.
Skills: Use /skill-name or /plugin-name:skill-name in prompt. For repo skills, include actions/checkout@v4 before the action step.
PR review on every change:
on:
pull_request:
types: [opened, synchronize]
prompt: "/code-review:code-review"
Issue → PR implementation:
on:
issues:
types: [opened]
prompt: "Implement this feature. Create a PR with all changes."
Scheduled report:
on:
schedule:
- cron: "0 9 * * *"
prompt: "Summarize yesterday's commits and open issues"
In-comment triggers (tag-based):
@claude implement this feature
@claude review for security
@claude fix the TypeError
Claude respects CLAUDE.md at repo root (coding style, review criteria, project rules). Place it there; action reads automatically.
Breaking changes in v1.0:
| Old (Beta) | New (v1.0) |
|---|---|
@beta | @v1 |
mode: "tag" / "agent" | (removed — auto-detected) |
direct_prompt | prompt |
max_turns: "10" | claude_args: "--max-turns 10" |
model: "claude-sonnet-4-6" | claude_args: "--model claude-sonnet-4-6" |
custom_instructions | claude_args: "--append-system-prompt ..." |
For enterprise environments, route through your own cloud infrastructure (data residency, billing control).
Setup requires:
use_bedrock: "true" or use_vertex: "true"Bedrock: Request Claude model access in Bedrock; configure GitHub OIDC → AWS IAM role with AmazonBedrockFullAccess; set AWS_ROLE_TO_ASSUME secret; use region-prefixed model IDs (e.g., us.anthropic.claude-sonnet-4-6).
Vertex AI: Enable Vertex AI + IAM APIs; configure Workload Identity Federation for GitHub; create service account with Vertex AI User role; set GCP_WORKLOAD_IDENTITY_PROVIDER and GCP_SERVICE_ACCOUNT secrets; action auto-retrieves project ID from auth.
See official GitHub Action repo for complete cloud setup guides.
GitHub Actions minutes: Each run consumes org quota. See GitHub billing.
API tokens: Each Claude interaction charges tokens (varies by complexity/codebase size). Set --max-turns cap to control iterations.
Optimize:
@claude commands to reduce unnecessary runsclaude_args: "--max-turns 5" to cap iterationsconcurrency limits to prevent parallel runs| Issue | Check |
|---|---|
Claude not responding to @claude | Workflow triggers include issue_comment or pull_request_review_comment; comment has @claude (not /claude); app is installed |
| CI doesn't run | API key valid in secrets; workflows enabled; GitHub App has Contents/Issues/Pull Requests permissions |
| Bedrock/Vertex auth fails | OIDC role/provider configured; secret names correct; env vars set (e.g., ANTHROPIC_VERTEX_PROJECT_ID for Vertex) |
| Slow/expensive runs | Increase --max-turns cap; use narrower prompts; check codebase size |
Defaults to Sonnet. Override with claude_args: "--model <id>":
claude-opus-4-8claude-sonnet-4-6claude-haiku-4-5-20251001us.anthropic.claude-opus-4-8/install-github-app in Claude Code@claude help in a PR commentCLAUDE.md to repo root to guide Claude's decisionshttps://github.com/anthropics/claude-code-action/tree/main/examples for complete workflows