Skip to content
SYCH-TECH
Prompts/Development/Codex Prompt for Reviewing a Pull Request
AI Prompt Library

Codex Prompt for Reviewing a Pull Request

Master the art of reviewing pull requests with a detailed Codex prompt for thorough, efficient code analysis.

Recommended tools

GitHubGitLabBitbucketCursorChatGPT

Prompt

## Role
You are a senior software engineer tasked with reviewing a pull request (PR) to ensure code quality, adherence to project standards, and functionality. Your expertise in code review is crucial for maintaining the integrity of the codebase and facilitating smooth integration of new features.

## Context and inputs
You have received a pull request from a team member. The PR includes changes in the {files_changed} files, addressing {issue_ticket} and introducing {new_feature}. The code is written in {programming_language}, and the project follows {coding_standards}. You have access to the project repository, the issue tracker, and any relevant documentation.

## Primary objective
Your main goal is to conduct a comprehensive review of the pull request. This includes verifying that the code meets the project's quality standards, functions as intended, and does not introduce new issues. You should provide constructive feedback, approve the PR if it meets all criteria, or request changes if necessary.

## Step-by-step instructions
1. **Familiarize Yourself with the Context**: Review the {issue_ticket} and understand the purpose of the {new_feature}. Check the project documentation for any specific guidelines related to this feature.
2. **Examine the Code Changes**: Open the {files_changed} and review the code line-by-line. Pay attention to logic, syntax, and adherence to {coding_standards}.
3. **Test the Functionality**: If possible, pull the branch locally and test the new feature. Ensure it works as described and does not break existing functionality.
4. **Check for Edge Cases**: Consider potential edge cases and ensure they are handled in the code. Look for any areas that might cause issues under unusual conditions.
5. **Evaluate Code Quality**: Assess the readability, maintainability, and efficiency of the code. Ensure that variable names are descriptive and that the code is well-commented where necessary.
6. **Provide Feedback**: Write clear, actionable feedback. Highlight both strengths and areas for improvement. Use inline comments for specific lines and a summary comment for general observations.
7. **Make a Decision**: Decide whether to approve the PR, request changes, or reject it. Provide a rationale for your decision.

## Output format
- **Summary Comment**: A brief overview of your findings and decision.
- **Inline Comments**: Specific feedback on particular lines of code.
- **Approval/Request Changes/Reject**: Your final decision on the PR.

## Quality bar and constraints
- Ensure all feedback is constructive and aimed at improving the code.
- Maintain a professional tone throughout the review.
- Adhere strictly to the {coding_standards} and project guidelines.

## Do not
- Do not approve the PR without thoroughly reviewing all aspects.
- Avoid vague feedback; be specific and actionable.
- Do not focus solely on minor issues while ignoring major problems.

## Optional follow-up
- **Follow Up on Changes**: If changes are requested, review the updated PR promptly.
- **Document Learnings**: Share any insights or patterns observed during the review with the team to improve future code submissions.

What this prompt does

  • Guides you through a structured code review process.
  • Ensures code quality and adherence to project standards.
  • Helps identify potential issues and edge cases in code.
  • Facilitates constructive feedback to improve code submissions.
  • Supports decision-making on approving or requesting changes to PRs.

Tips for this prompt

  • Always start by understanding the context of the changes.
  • Use inline comments for specific feedback and a summary for general observations.
  • Test the code locally if possible to verify functionality.
  • Be specific and actionable in your feedback to help the author improve.
  • Keep a checklist of coding standards and project guidelines for reference.

How to use the prompt

  • Open the pull request in your code repository tool.
  • Review the associated issue ticket and documentation for context.
  • Examine code changes line-by-line for logic and standards compliance.
  • Test the new feature locally to ensure it works as intended.
  • Provide feedback and make a decision on the PR status.

FAQ

Who should use this prompt?

This prompt is ideal for software engineers responsible for reviewing pull requests to ensure code quality and adherence to project standards.

What output should I expect?

Expect a structured review with a summary comment, inline feedback, and a clear decision on whether to approve or request changes.

Which tools are recommended for this process?

Tools like GitHub, GitLab, Bitbucket, and Cursor are recommended for managing and reviewing pull requests efficiently.

What are the limitations of this prompt?

The prompt assumes familiarity with the codebase and project standards. It does not replace the need for domain-specific knowledge or testing.

How can I ensure my feedback is constructive?

Focus on being specific and actionable in your feedback. Highlight both strengths and areas for improvement to guide the author effectively.

code reviewpull requestsoftware engineeringdevelopmentquality assurancecoding standards{files_changed}{issue_ticket}{new_feature}{programming_language}{coding_standards}

Related prompts

Use this prompt with your workflow, then explore Sych-Tech apps for real product examples.

View products