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!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 callsmax_turns
limits to prevent excessive iterationstimeout_minutes
to avoid runaway workflows.github/workflows/
directory.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 | The prompt to send to Claude | Yes* |
prompt_file | Path to file containing prompt | Yes* |
anthropic_api_key | Anthropic API key | Yes** |
max_turns | Maximum conversation turns | No |
timeout_minutes | Execution timeout | No |
prompt
or prompt_file
required/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.