Skip to content

Commit 78b5884

Browse files
committed
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.
1 parent b897500 commit 78b5884

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/ai-claude-review.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ jobs:
2424
with:
2525
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
2626
prompt: |
27-
Review this PR. Check code quality, bugs, performance, security.
28-
Use CLAUDE.md for conventions. Post review via `gh pr comment`.
27+
Review ONLY the changes in this PR, not the entire codebase.
28+
First run `gh pr diff ${{ github.event.pull_request.number }}` to see the diff.
29+
Then run `gh pr view ${{ github.event.pull_request.number }}` for context.
30+
Focus your review on: code quality, bugs, performance, and security.
31+
Use CLAUDE.md for project conventions if present.
32+
Post your review as a single comment via `gh pr comment ${{ github.event.pull_request.number }}`.
2933
claude_args: '--allowed-tools "Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"'

0 commit comments

Comments
 (0)