AI-powered code changes directly in your GitHub workflow
Turn PR feedback into code instantly using multiple AI providers
ClaudeCoder is a GitHub Action that automatically processes pull requests using multiple AI providers (AWS Bedrock, OpenRouter) with intelligent model selection to suggest code changes. It analyzes your repository content and pull request descriptions to provide intelligent code suggestions, enhancing your development workflow.
- 🤖 Multi-Provider AI Support - Choose between AWS Bedrock and OpenRouter with automatic provider detection based on model selection
- 📊 Intelligent Model Selection - Priority-based model fallback system with support for multiple Claude models and free OpenRouter models
- 🔄 Seamless GitHub Integration - Works directly within your existing GitHub workflow with zero disruption to your development process
- 🛠️ Highly Configurable - Customize token limits, thinking capabilities, response handling, model selection, and more to fit your team's specific needs
- 🔍 Context-Aware - Analyzes your entire repository to ensure changes align with your existing codebase
- 💰 Cost Flexibility - Use free OpenRouter models or premium AWS Bedrock models based on your needs and budget
- Accelerated Development - Save time on routine code changes and let your team focus on strategic work
- 🔒 Security-Focused - Your code stays within your chosen AI provider environment (AWS or OpenRouter)
Before you can use ClaudeCoderAction, you need one of the following:
- An AWS account with access to AWS Bedrock
- AWS credentials (Access Key ID and Secret Access Key) with permissions to invoke AWS Bedrock
- Access to Claude models in your AWS Bedrock region
- An OpenRouter account (free signup at openrouter.ai)
- OpenRouter API key with access to free or paid models
- No additional setup required - works immediately
- A GitHub repository where you want to use this action
- Basic understanding of GitHub Actions and workflows
For AWS Bedrock:
AWS_ACCESS_KEY_ID: Your AWS Access Key IDAWS_SECRET_ACCESS_KEY: Your AWS Secret Access Key
For OpenRouter:
OPENROUTER_API_KEY: Your OpenRouter API key
Optional:
MODELS: Comma-separated list of models in priority order (auto-detects provider)
Create a workflow file (e.g., .github/workflows/claudecoder.yml) with one of the following configurations:
name: ClaudeCoder
on:
pull_request:
types: [opened, edited, labeled]
pull_request_review_comment:
types: [created, edited]
issue_comment:
types: [created, edited]
jobs:
process-pr:
if: contains(github.event.pull_request.labels.*.name, 'claudecoder')
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: ClaudeCoderAction
uses: EndemicMedia/claudecoder@v2.1.0
with:
openrouter-api-key: ${{ secrets.OPENROUTER_API_KEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}
# Uses free Kimi K2 model by default - no cost!name: ClaudeCoder
on:
pull_request:
types: [opened, edited, labeled]
pull_request_review_comment:
types: [created, edited]
issue_comment:
types: [created, edited]
jobs:
process-pr:
if: contains(github.event.pull_request.labels.*.name, 'claudecoder')
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: ClaudeCoderAction
uses: EndemicMedia/claudecoder@v2.1.0
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}name: ClaudeCoder
on:
pull_request:
types: [opened, edited, labeled]
pull_request_review_comment:
types: [created, edited]
issue_comment:
types: [created, edited]
jobs:
process-pr:
if: contains(github.event.pull_request.labels.*.name, 'claudecoder')
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: ClaudeCoderAction
uses: EndemicMedia/claudecoder@v2.1.0
with:
# Provider auto-detected from first model
openrouter-api-key: ${{ secrets.OPENROUTER_API_KEY }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
models: ${{ secrets.MODELS }} # e.g., "google/gemini-2.0-flash-exp:free,moonshotai/kimi-k2:free"
github-token: ${{ secrets.GITHUB_TOKEN }}ClaudeCoderAction will automatically run on pull requests that have the "claudecoder" label. It will:
- Verify that the PR has the required label (default: "claudecoder")
- Analyze the repository content and the pull request description
- Generate code suggestions using Claude 3.7 Sonnet
- Apply the suggested changes to the pull request branch
- Add a comment to the pull request with a summary of the changes
To use ClaudeCoder on a pull request:
- Create or edit a pull request
- Add the "claudecoder" label to the PR
- Wait for ClaudeCoder to process the PR and suggest changes
ai-provider: AI provider to use (aws,openrouter, orautofor auto-detection based on model)models: Comma-separated list of models in priority order (auto-detects provider from first model)aws-access-key-id: AWS Access Key ID (required for AWS Bedrock)aws-secret-access-key: AWS Secret Access Key (required for AWS Bedrock)aws-region: AWS region to use (default:us-east-1)openrouter-api-key: OpenRouter API key (required for OpenRouter)
# OpenRouter free models only (recommended)
models: "moonshotai/kimi-k2:free,google/gemini-2.0-flash-exp:free,deepseek/deepseek-r1-0528:free"
# AWS Bedrock models only
models: "us.anthropic.claude-3-7-sonnet-20250219-v1:0,anthropic.claude-3-haiku-20240307-v1:0"
# Single model (no fallback)
models: "moonshotai/kimi-k2:free"max-requests: Maximum number of requests to make (default:10)required-label: Label required on PR for processing (default:claudecoder)
max-tokens: Maximum number of tokens for AI to generate (default:64000, up to 128K)enable-thinking: Enable extended thinking capability (default:true)thinking-budget: Token budget for thinking process (default:1024)extended-output: Enable 128K extended output capability (default:true)request-timeout: API request timeout in milliseconds (default:3600000- 60 minutes)
- uses: EndemicMedia/claudecoder@v2.1.0
with:
openrouter-api-key: ${{ secrets.OPENROUTER_API_KEY }}
models: "google/gemini-2.0-flash-exp:free,moonshotai/kimi-k2:free"
max-requests: 5
max-tokens: 32000
enable-thinking: true
thinking-budget: 2000
required-label: 'ai-review'- uses: EndemicMedia/claudecoder@v2.1.0
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-1
models: "us.anthropic.claude-3-7-sonnet-20250219-v1:0"
max-requests: 5
max-tokens: 32000
enable-thinking: true
thinking-budget: 2000
extended-output: true
request-timeout: 1800000
required-label: 'ai-review'You can implement label filtering in two ways:
-
Workflow-level filtering (recommended): Using the
ifcondition in your workflow file as shown in the setup example:if: contains(github.event.pull_request.labels.*.name, 'claudecoder')
This prevents the job from running entirely when the label is not present, saving computational resources.
-
Action-level filtering (built-in): The action itself checks for the required label and exits gracefully if missing, adding a comment to inform users. This acts as a safety mechanism even if workflow-level filtering is not set up.
We recommend using both approaches for optimal efficiency and user experience.
- ClaudeCoderAction is designed to suggest changes, but it's important to review all suggestions before merging.
- The action is limited by the capabilities of Claude 3.7 Sonnet and may not understand very complex or domain-specific code patterns.
- There's a limit to the amount of repository content that can be analyzed due to API constraints.
Contributions to ClaudeCoderAction are welcome! Please see CONTRIBUTING.md for guidelines on commit messages, pull requests, and our development workflow.
This project follows Conventional Commits and uses semantic-release for automated versioning.
This project is licensed under the MIT License - see the LICENSE file for details.
If you find ClaudeCoderAction valuable, please consider supporting the project:
Your support helps us maintain and improve ClaudeCoderAction. Every contribution makes a difference!
If you encounter any problems or have any questions about ClaudeCoderAction, please open an issue in this repository. We're here to help!
Check out these other awesome AI-powered developer tools:
- GitHub Copilot - AI pair programming
- AWS Bedrock - Foundation models for AI applications
Built with ❤️ by EndemicMedia