Skip to content
CI/CD & Automation Intermediate

GitHub Action PR Review

Auto-review pull requests using the official Claude Code GitHub Action

Command

"color:#9CA3AF;font-style:italic"># .github/workflows/review.yml
$ - uses: anthropics/"color:#7C5CFC">claude-code-action@v1
    with:
      prompt: |
        Review this PR "color:#7C5CFC">for:
        1. Security vulnerabilities
        2. Performance issues
        3. Code style violations
      anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
      max_budget_usd: 1.00

Response

# PR Comment posted by Claude
## Code Review

### Security
- No SQL injection risks found

### Performance
- Consider memoizing the sort in line 42

### Style
- Missing JSDoc on exported function

Parsing Code

# Full workflow YAML:
name: Claude PR Review
on:
  pull_request:
    types: [opened, synchronize]
jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with: { fetch-depth: 0 }
      - uses: anthropics/claude-code-action@v1
        with:
          prompt: 059669">"Review this PR"
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}

Gotchas

! Requires ANTHROPIC_API_KEY secret in repo settings
! Action auto-detects PR context and posts review as a comment

Related Recipes