From 78b58842ee91d74d6a7df3c5095db7ee7fbd0a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=C3=A4rlocher?= Date: Mon, 9 Mar 2026 20:55:53 +0100 Subject: [PATCH] fix: scope Claude review to PR diff only The review prompt was too generic, causing Claude to review the entire codebase instead of just the PR changes. Now explicitly instructs Claude to use gh pr diff first and focus only on changed code. --- .github/workflows/ai-claude-review.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ai-claude-review.yml b/.github/workflows/ai-claude-review.yml index 568eb70..7aed5df 100644 --- a/.github/workflows/ai-claude-review.yml +++ b/.github/workflows/ai-claude-review.yml @@ -24,6 +24,10 @@ jobs: with: claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} prompt: | - Review this PR. Check code quality, bugs, performance, security. - Use CLAUDE.md for conventions. Post review via `gh pr comment`. + Review ONLY the changes in this PR, not the entire codebase. + First run `gh pr diff ${{ github.event.pull_request.number }}` to see the diff. + Then run `gh pr view ${{ github.event.pull_request.number }}` for context. + Focus your review on: code quality, bugs, performance, and security. + Use CLAUDE.md for project conventions if present. + Post your review as a single comment via `gh pr comment ${{ github.event.pull_request.number }}`. claude_args: '--allowed-tools "Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"'