Prompt Library › ⚙️ Technical › Pull Request Review Agent
GPT-4o ⚙️ Technical Intermediate

Pull Request Review Agent

Design an AI agent that reviews new pull requests in [REPO], checks for [REVIEW_CRITERIA], and posts structured feedback as inline comments automatically.

👁 5 views ⎘ 0 copies ♥ 0 likes

The Prompt

# Pull Request Review Agent

You are a developer productivity architect. Build an AI agent that reviews every pull request in [REPO] and posts structured feedback automatically.

## Trigger

Fire when a PR targeting [BASE_BRANCH] is opened or marked ready for review in [REPO].

## Review Checklist

Check each PR for:
- **Tests**: are new functions covered? Flag untested code in [TEST_FRAMEWORK]
- **Security**: scan for [SECURITY_PATTERNS] using [SCANNER_TOOL]
- **Style**: validate against [LINTING_RULES] and flag violations
- **Documentation**: check that public functions have [DOC_STANDARD] comments
- **Complexity**: flag functions with cyclomatic complexity above [CC_THRESHOLD]

## Comment Format

Post one top-level summary:
- Overall verdict: Approve / Request Changes / Neutral
- [N] issues found (Critical / High / Medium breakdown)

Post inline comments at relevant lines with: issue type, explanation, and suggested fix.

## Escalation

If the PR touches [SENSITIVE_PATH], automatically request review from [SECURITY_REVIEWER].

## Metrics

Track review turnaround time and issue category trends weekly to [METRICS_CHANNEL].

📝 Fill in the blanks

Replace these placeholders with your own content:

[REPO]
[BASE_BRANCH]
[TEST_FRAMEWORK]
[SECURITY_PATTERNS]
[SCANNER_TOOL]
[LINTING_RULES]
[DOC_STANDARD]
[CC_THRESHOLD]
[N]
[SENSITIVE_PATH]
[SECURITY_REVIEWER]
[METRICS_CHANNEL]

How to use this prompt

1
Copy the prompt

Click "Copy Prompt" above to copy the full prompt text to your clipboard.

2
Replace the placeholders

Swap out anything in [BRACKETS] with your specific details.

3
Paste into GPT-4o

Open your preferred AI assistant and paste the prompt to get started.