CC-101 · Module 4
Code Reviews with Claude
3 min read
Boris Chenry's team at Anthropic uses Claude Code as a code reviewer on every pull request via GitHub Actions. The workflow: a developer opens a PR, tags @claude in a comment, and Claude Code — running as a GitHub Action — reviews the diff, identifies issues, and posts review comments. As part of the same PR, the developer updates CLAUDE.md with any new rules discovered during development. This is what Boris calls 'compound engineering' — every PR makes Claude smarter for the entire team.
# Claude Code Review GitHub Action
name: Claude Code Review
on:
pull_request:
types: [opened, synchronize]
issue_comment:
types: [created]
jobs:
review:
if: contains(github.event.comment.body, '@claude')
runs-on: ubuntu-latest
steps:
- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
For teams, this creates a flywheel effect. Every code review surfaces patterns — common mistakes, architectural decisions, naming conventions — that get encoded into CLAUDE.md. New team members benefit from every previous review. The AI code reviewer improves without model changes because the context it operates in gets richer with every commit. Boris notes that Anthropic's team maintains a shared CLAUDE.md that multiple people contribute to multiple times per week.
Do This
- Set up Claude Code GitHub Action for automated PR reviews
- Update CLAUDE.md as part of every PR that surfaces a new pattern
- Share CLAUDE.md via git so the whole team benefits
- Use code reviews to discover rules — if Claude gets it wrong in review, add the correction
Avoid This
- Manually review every PR when Claude can catch the routine issues
- Keep CLAUDE.md rules in your head instead of committing them
- Let CLAUDE.md grow unbounded — prune it like technical debt
- Use --dangerously-skip-permissions for the GitHub Action (it needs controlled permissions)