CloudCodeTree LogoCloudCodeTree
AI NewsTutorialsAbout
CloudCodeTree Logo
CloudCodeTree
  • AI News
  • Tutorials
  • About
← Back to AI News
Automated PR Review with claude-code-action: 10 Lines of YAML, Zero Manual Review Fatigue

Automated PR Review with claude-code-action: 10 Lines of YAML, Zero Manual Review Fatigue

Chris Harper

2 min read

Aug 11, 2026 · 20:04 UTC

AI
Workflow
Claude Code
Developer Tools
Best Practices

Drop anthropics/claude-code-action@v1 into your GitHub Actions workflow and every PR gets a full Claude Code review — diff-aware, codebase-aware, and configurable to auto-fix.

claude-code-action is Anthropic's official GitHub Action. It spins up a Claude Code session for each trigger, reads the PR diff alongside your repository, and posts review comments — or pushes fixes directly — all from a standard Actions YAML file.

Minimal review setup — add this to .github/workflows/claude-review.yml:

name: Claude PR Review
on:
  pull_request:
    types: [opened, synchronize]
  issue_comment:
    types: [created]

jobs:
  review:
    runs-on: ubuntu-latest
    permissions:
      pull-requests: write
      contents: read
    steps:
      - uses: anthropics/claude-code-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          trigger_phrase: "@claude"
          mode: review

This fires on every new or updated PR and whenever someone comments @claude review — Claude reads the diff, checks against your codebase, and leaves inline review comments.

Key options:

OptionWhat it does
mode: fixClaude implements the fix and pushes commits
allowed_tools: "Read,Bash"Least-privilege tool list (default: all tools)
claude_md_path: ".claude/review.md"Custom review instructions per project
trigger_phrase: "@claude"Comment-triggered only (saves cost on draft PRs)

Cost and safety notes. Typical review runs $0.03–0.10 on Sonnet 5 — cheap enough to run on every commit. Pin to an audited SHA (anthropics/claude-code-action@abc123) rather than @v1 for supply-chain safety; the Actions marketplace shows the latest verified SHA. Claude Code v2.1.227 (Aug 10) fixed a bug where all Bash commands would silently fail on GitHub-hosted runners when allowed_non_write_users was set — if you hit mysteriously empty tool results, that's the fix to pull.

What it can't do automatically: push to protected branches without relaxed ruleset exceptions, or merge PRs — those still require human approval. Use mode: review for feedback-only and mode: fix for branches where you want Claude to author commits.

Sources: claude-code-action docs — Claude Code · Complete CI/CD Integration Guide — The Prompt Shelf · v2.1.227 Bash fix — Claude Code Changelog