Skip to content

fix: scope Claude review to PR diff only#8

Merged
sbaerlocher merged 1 commit intomainfrom
fix/claude-review-scope
Mar 9, 2026
Merged

fix: scope Claude review to PR diff only#8
sbaerlocher merged 1 commit intomainfrom
fix/claude-review-scope

Conversation

@sbaerlocher
Copy link
Member

Summary

  • Fix Claude code review prompt to only review PR changes, not the entire codebase
  • Explicitly instruct Claude to run gh pr diff first before reviewing
  • Add PR number to gh pr comment and gh pr view commands for clarity

Problem

The previous generic prompt ("Review this PR") caused Claude to review the entire repository instead of just the changed files, resulting in irrelevant findings about code that wasn't part of the PR.

Test plan

  • Open a PR in any repo using this workflow
  • Verify Claude's review only covers files in the diff

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.
@sbaerlocher sbaerlocher merged commit 9b7736c into main Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant