Skip to content

Instantly share code, notes, and snippets.

@hugooliveirad
Created June 4, 2025 14:48
Show Gist options
  • Save hugooliveirad/5863d9b17ec536ad2b697da35f7b9e33 to your computer and use it in GitHub Desktop.
Save hugooliveirad/5863d9b17ec536ad2b697da35f7b9e33 to your computer and use it in GitHub Desktop.

PR Review Command

This command helps you review GitHub Pull Requests using Claude Code. It will analyze a PR and provide a detailed review in the conversation.

Usage

/pr_review [PR_NUMBER]

Example: /pr_review 123

Review Process

When this command is executed, I will:

  1. Gather PR information using the provided PR number
  2. Analyze the changes and context
  3. Provide a comprehensive review directly in our conversation

1. PR Information Collection

I'll use GitHub CLI to gather information about the PR:

gh pr view [PR_NUMBER] --json title,body,author,comments,files,commits,reviews,reviewRequests
gh pr diff [PR_NUMBER]
gh pr checks [PR_NUMBER]
gh pr view [PR_NUMBER] --comments

2. Context Analysis

I'll examine:

  • Modified files
  • Related code context
  • PR description and comments
  • Commit history
  • CI/CD check results
  • Review comments and threads
  • Requested reviewers

3. Review Components

The review provided in our conversation will include:

  1. Summary of Changes

    • Brief overview of what the PR does
    • Main files/components affected
  2. Check Status

    • CI/CD check results
    • Build and test outcomes
    • Status of required checks
  3. Technical Assessment

    • Code quality evaluation
    • Potential bugs or issues
    • Performance considerations
    • Security implications
    • Test coverage
  4. Existing Review Comments

    • Summary of feedback from other reviewers
    • Unresolved threads or discussions
    • Common themes in existing reviews
  5. Improvement Suggestions

    • Specific recommendations for code improvements
    • Alternative approaches when relevant
    • Suggestions to address existing review comments
  6. Overall Recommendation

    • Whether the PR should be approved, needs changes, or requires further discussion

Review Guidelines

The review will be:

  • Constructive and specific
  • Focused on important issues
  • Clear about what needs improvement
  • Balanced with positive feedback

No comments will be added to GitHub directly - all feedback will remain in our conversation for you to review and decide how to proceed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment