Organization-level GitHub configuration and reusable workflows.
Automated PR review using Claude AI with security, compliance, and code quality checks.
- Create
.github/workflows/claude-review.ymlin your repo:
name: Claude Code – PR Review
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
permissions:
contents: write
pull-requests: write
issues: write
actions: read
id-token: write
jobs:
review:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout PR
uses: actions/checkout@v5
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Run Claude Code Review
uses: anthropics/claude-code-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
prompt: |
/review
IMPORTANT: Also reference and apply the organization-wide code review guidelines:
https://github.com/isapp/.github/blob/main/CLAUDE.md
Apply org-wide standards (security, HIPAA, compliance) IN ADDITION to repo-specific CLAUDE.md.
claude_args: "--model claude-sonnet-4-5 --max-turns 6"
track_progress: true-
(Optional) Copy CLAUDE.md to your repository root to customize review guidelines for your specific repo.
-
Ensure
ANTHROPIC_API_KEYsecret is configured at the organization level.
You can customize the workflow by modifying:
| Parameter | Description | Default | Location |
|---|---|---|---|
--model |
Claude model to use | claude-sonnet-4-5 |
claude_args |
--max-turns |
Maximum conversation turns | 6 |
claude_args |
timeout-minutes |
Workflow timeout | 15 |
job level |
The workflow automatically reads CLAUDE.md from your repository root. See CLAUDE.md for the comprehensive template covering:
- Security (OWASP, auth, secrets, PII)
- Compliance (HIPAA, SOC2, FedRAMP)
- Data & migrations
- Mobile (iOS/Android)
- Infrastructure (Terraform, Docker)
- Performance, testing, APIs, dependencies
- Workflow triggers on PR events
- Claude reviews code changes using guidelines from
CLAUDE.md - Posts inline comments on specific lines of code
- Creates a summary comment with all findings
- Prioritizes must-fix issues (security, compliance) over suggestions
Error: "Invalid input, mode is not defined"
- Remove the
modeparameter from your caller workflow (deprecated as of latest version)
No comments appearing
- Verify
ANTHROPIC_API_KEYsecret is configured - Check workflow permissions include
pull-requests: writeandcontents: write - Ensure workflow is triggered on correct PR events
Workflow not running
- Check that
.github/workflows/claude.ymlexists in your repo - Verify branch protection rules don't block the workflow