| name | eoa-github-action-integration |
| description | Trigger with Claude Code action requests. Use when setting up Claude Code in GitHub Actions for automated PR reviews, @claude mention responses, and issue triage. |
| license | Apache-2.0 |
| compatibility | Requires AI Maestro installed. |
| metadata | {"author":"Emasoft","version":"1.0.0"} |
| agent | eoa-main |
| context | fork |
| user-invocable | false |
| workflow-instruction | support |
| procedure | support-skill |
Claude Code Action Integration
Prerequisites
- GitHub repository with Actions enabled
- Anthropic API key (ANTHROPIC_API_KEY secret)
- Repository write permissions configured
- Understanding of GitHub Actions workflow syntax
Instructions
- Choose the appropriate workflow template from
templates/workflows/ based on your use case (PR review, @claude mention, or issue triage)
- Copy the selected YAML file to your repository's
.github/workflows/ directory
- Add the
ANTHROPIC_API_KEY secret in your repository settings under Settings > Secrets and variables > Actions
- Configure repository permissions by enabling "Read and write permissions" and "Allow GitHub Actions to create and approve pull requests" in Settings > Actions > General
- Customize the workflow file if needed (model selection, allowed tools, custom prompts)
- Test the workflow on a draft PR or test issue to verify it triggers correctly
- Monitor API usage and costs after deployment
Trigger Conditions
- User asks to "set up automated code review"
- User wants "Claude to review PRs automatically"
- User asks about "GitHub Actions with Claude"
- User needs "@claude mention integration"
- User wants "automated issue triage"
Overview
The claude-code-action is Anthropic's official GitHub Action for running Claude Code in CI/CD workflows. This skill provides ready-to-use workflow templates for common integration patterns.
Available Templates
| Template | Purpose | Location |
|---|
| claude-pr-review.yml | Automatic PR code review | templates/workflows/ |
| claude-mention.yml | @claude mention responses | templates/workflows/ |
| claude-issue-triage.yml | Automated issue triage | templates/workflows/ |
Quick Start
Step 1: Choose a Template
Select the workflow template that matches your use case from templates/workflows/.
Step 2: Copy to Repository
Copy the YAML file to your repository's .github/workflows/ directory:
cp claude-pr-review.yml /path/to/repo/.github/workflows/
Step 3: Configure Secrets
Add required secrets in your repository settings:
- Go to Settings > Secrets and variables > Actions
- Add
ANTHROPIC_API_KEY with your Anthropic API key
Step 4: Configure Permissions
- Go to Settings > Actions > General
- Under "Workflow permissions", select "Read and write permissions"
- Check "Allow GitHub Actions to create and approve pull requests"
Template Details
PR Review Workflow
File: templates/workflows/claude-pr-review.yml
Triggers:
- Pull request opened
- New commits pushed to PR
- PR marked ready for review
- PR reopened
Features:
- Comprehensive code review (quality, bugs, security, performance)
- Inline comments on specific code issues
- Summary comment with overall assessment
- Concurrency control (one review per PR at a time)
- Draft PR handling (skips drafts)
Review Categories:
- Code Quality - patterns, naming, organization, DRY
- Potential Bugs - null handling, edge cases, race conditions
- Security - injection, XSS, auth issues
- Performance - complexity, queries, caching
- Testing - coverage, edge cases, clarity
Mention Response Workflow
File: templates/workflows/claude-mention.yml
Triggers:
- @claude mentioned in issue comment
- @claude mentioned in PR comment
Features:
- Responds to direct questions
- Provides code explanations
- Suggests fixes for reported issues
- Answers architecture questions
Issue Triage Workflow
File: templates/workflows/claude-issue-triage.yml
Triggers:
Features:
- Automatic label assignment
- Priority assessment
- Initial response to reporter
- Related issue linking
Customization
Changing the Model
Edit the claude_args section in any workflow:
claude_args: |
--model "claude-sonnet-4-20250514" # or claude-opus-4-5-20251101
Restricting Tools
Modify the --allowedTools argument to limit what Claude can do:
--allowedTools "Read,Glob,Grep"
Custom Prompts
Edit the prompt section to customize Claude's behavior for your project's specific needs.
Examples
Example 1: Basic PR Review Setup
name: Claude PR Review
on:
pull_request:
types: [opened, synchronize, ready_for_review]
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: anthropics/claude-code-action@v1
with:
prompt: "Review this PR for code quality and potential bugs"
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
Example 2: @claude Mention Handler
name: Claude Mention
on:
issue_comment:
types: [created]
jobs:
respond:
if: contains(github.event.comment.body, '@claude')
runs-on: ubuntu-latest
steps:
- uses: anthropics/claude-code-action@v1
with:
prompt: "Respond to this comment helpfully"
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
Error Handling
Workflow Not Triggering
- Check workflow file is in
.github/workflows/
- Verify YAML syntax is valid
- Ensure trigger conditions match your action
Authentication Errors
- Verify
ANTHROPIC_API_KEY secret is set
- Check API key has not expired
- Ensure key has required permissions
Permission Denied Errors
- Enable "Read and write permissions" in repository settings
- Add required permissions block to workflow
Timeout Issues
- Increase
timeout-minutes in workflow
- Consider using a faster model for large repos
Resources
- claude-code-action GitHub - Official action repository
- GitHub Actions Documentation - Actions reference
templates/workflows/claude-pr-review.yml - PR review template
templates/workflows/claude-mention.yml - Mention handler template
templates/workflows/claude-issue-triage.yml - Issue triage template
Best Practices
- Start with PR Review - Most common and valuable integration
- Use Sonnet for Speed - Faster reviews, lower cost
- Limit Tools - Only allow necessary tools for security
- Test on Draft PRs - Test workflow before enabling widely
- Monitor Costs - Watch API usage with track_progress enabled
Output
| Field | Type | Description |
|---|
| Workflow File | YAML | GitHub Actions workflow configured in .github/workflows/ |
| API Key Secret | Secret | ANTHROPIC_API_KEY configured in repository settings |
| Permissions | Config | Repository permissions set to "Read and write" |
| Status | Boolean | Workflow enabled and ready to trigger |
Checklist
Copy this checklist and track your progress: