Learn about integrating Claude Code into your development workflow with Claude Code GitHub Actions
@claude
mention in any PR or issue, Claude can analyze your code, create pull requests, implement features, and fix bugs - all while following your project’s standards.
CLAUDE.md
guidelines and existing code patterns/install-github-app
.
This command will guide you through setting up the GitHub app and required secrets.
/install-github-app
command fails or you prefer manual setup, please follow these manual setup instructions:
.github/workflows/
@claude
in an issue or PR comment!@beta
to @v1
mode: "tag"
or mode: "agent"
(now auto-detected)direct_prompt
with prompt
max_turns
, model
, custom_instructions
, etc. to claude_args
Old Beta Input | New v1.0 Input |
---|---|
mode | (Removed - auto-detected) |
direct_prompt | prompt |
override_prompt | prompt with GitHub variables |
custom_instructions | claude_args: --system-prompt |
max_turns | claude_args: --max-turns |
model | claude_args: --model |
allowed_tools | claude_args: --allowedTools |
disallowed_tools | claude_args: --disallowedTools |
claude_env | settings JSON format |
@claude
mentions) or automation mode (runs immediately with a prompt) based on your configuration.CLAUDE.md
file in your repository root to define code style guidelines, review criteria, project-specific rules, and preferred patterns. This file guides Claude’s understanding of your project standards.
ANTHROPIC_API_KEY
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
${{ secrets.ANTHROPIC_API_KEY }}
) rather than hardcoding API keys directly in your workflow files.
CLAUDE.md
concise and focused, and configure appropriate timeouts for your workflows.
@claude
commands to reduce unnecessary API calls--max-turns
in claude_args
to prevent excessive iterationsprompt
for all instructions/review
or /fix
claude_args
prompt
parameter to provide instructions.Create a custom GitHub App (Recommended for 3P Providers)
.pem
fileAPP_PRIVATE_KEY
with the contents of the .pem
fileAPP_ID
with your GitHub App’s IDConfigure cloud provider authentication
AWS Bedrock
Security Note: Use repository-specific configurations and grant only the minimum required permissions.Required Setup:
https://token.actions.githubusercontent.com
sts.amazonaws.com
token.actions.githubusercontent.com
AmazonBedrockFullAccess
policyGoogle Vertex AI
Security Note: Use repository-specific configurations and grant only the minimum required permissions.Required Setup:
https://token.actions.githubusercontent.com
Vertex AI User
roleAdd Required Secrets
ANTHROPIC_API_KEY
: Your Anthropic API key from console.anthropic.comAPP_ID
: Your GitHub App’s IDAPP_PRIVATE_KEY
: The private key (.pem) contentGCP_WORKLOAD_IDENTITY_PROVIDER
GCP_SERVICE_ACCOUNT
APP_ID
: Your GitHub App’s IDAPP_PRIVATE_KEY
: The private key (.pem) contentAWS_ROLE_TO_ASSUME
APP_ID
: Your GitHub App’s IDAPP_PRIVATE_KEY
: The private key (.pem) contentCreate workflow files
AWS Bedrock workflow
Secret Name | Description |
---|---|
AWS_ROLE_TO_ASSUME | ARN of the IAM role for Bedrock access |
APP_ID | Your GitHub App ID (from app settings) |
APP_PRIVATE_KEY | The private key you generated for your GitHub App |
us.anthropic.claude...
) and version suffix.Google Vertex AI workflow
Secret Name | Description |
---|---|
GCP_WORKLOAD_IDENTITY_PROVIDER | Workload identity provider resource name |
GCP_SERVICE_ACCOUNT | Service account email with Vertex AI access |
APP_ID | Your GitHub App ID (from app settings) |
APP_PRIVATE_KEY | The private key you generated for your GitHub App |
@claude
(not /claude
).
Parameter | Description | Required |
---|---|---|
prompt | Instructions for Claude (text or slash command) | No* |
claude_args | CLI arguments passed to Claude Code | No |
anthropic_api_key | Anthropic API key | Yes** |
github_token | GitHub token for API access | No |
trigger_phrase | Custom trigger phrase (default: “@claude”) | No |
use_bedrock | Use AWS Bedrock instead of Anthropic API | No |
use_vertex | Use Google Vertex AI instead of Anthropic API | No |
claude_args
parameter accepts any Claude Code CLI arguments:
--max-turns
: Maximum conversation turns (default: 10)--model
: Model to use (e.g., claude-sonnet-4-20250514
)--mcp-config
: Path to MCP configuration--allowed-tools
: Comma-separated list of allowed tools--debug
: Enable debug output/install-github-app
command is the recommended approach, you can also:
CLAUDE.md
file at the root of your repository. Claude will follow these guidelines when creating PRs and responding to requests. Check out our Memory documentation for more details.prompt
parameter in the workflow file to provide workflow-specific instructions. This allows you to customize Claude’s behavior for different workflows or tasks.