Prompt Library ⚙️ Technical Code Review Agent Pipeline
GPT-4o ⚙️ Technical Intermediate

Code Review Agent Pipeline

Design an automated code review agent that checks for security, performance, quality, and testing issues before human review.

👁 7 views ⎘ 0 copies ♥ 0 likes

The Prompt

# Code Review Agent Pipeline

You are a senior software engineer. Design an automated code review agent for [LANGUAGE_OR_STACK] projects.

## Project Context

- Language / stack: [LANGUAGE_OR_STACK]
- Team size: [TEAM_SIZE]
- Biggest code quality pain points: [PAIN_POINTS]
- Existing tools already in use: [EXISTING_TOOLS]

## Review Checklist

Build the agent review checklist by category:

**Security**
- [3-5 security checks specific to this stack]

**Performance**
- [3-5 performance checks]

**Code Quality**
- [3-5 style and maintainability checks]

**Testing**
- [3-5 test coverage and quality checks]

**Documentation**
- [2-3 documentation requirements]

## Agent Workflow

Step-by-step process when triggered by a new pull request:
1. Diff analysis
2. Rule evaluation
3. Comment generation
4. Severity scoring
5. Pass / request-changes decision

## Comment Format

Each agent comment includes:
- Location (file, line)
- Issue category
- Severity: CRITICAL / MAJOR / MINOR / SUGGESTION
- Explanation (max 2 sentences)
- Suggested fix (code block where relevant)

## Escalation Rules

Define which findings block a PR from merging vs. which are advisory only.

📝 Fill in the blanks

Replace these placeholders with your own content:

[LANGUAGE_OR_STACK]
[TEAM_SIZE]
[PAIN_POINTS]
[EXISTING_TOOLS]
[3-5 security checks specific to this stack]
[3-5 performance checks]
[3-5 style and maintainability checks]
[3-5 test coverage and quality checks]
[2-3 documentation requirements]

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.