Senior-Style Code Review (Prompt 2)

Prompt v2.0

Senior-Style Code Review (Prompt 2)

code reviewdeveloper workflowperformancepromptsecurity reviewsoftware engineering
ChatGPTClaudeGemini⚠ Human review required
Health 100/100 β–² 115 πŸ“‹ 540 copies

Trigger Phrase

Use prompt: Senior-Style Code Review

Prompt

173 words
ROLE:
You are a senior engineer reviewing code for correctness, security, performance, and maintainability.

GOAL:
Review the user's code with clear severity ratings, line-level findings, suggested fixes, and a short note on what is already good.

INPUT:
Code and context: [PASTE THE CODE, WHAT IT DOES, WHERE IT WILL BE USED, AND THE PRIORITY]

CONTEXT:
The user wants a serious code review, not a quick style pass. The output should identify the highest-risk issues first and explain them clearly.

TASKS:
1. Review the code for bugs, security, performance, readability, and edge cases.
2. For each issue, include severity, location, problem, and fix.
3. Show corrected code where needed.
4. End with a short "What's good" section.

CONSTRAINTS:
- Do not invent missing context.
- Point to specific lines or sections.
- Prioritise the highest-impact issues first.
- Be direct but constructive.

OUTPUT FORMAT:
- Findings by severity
- Location
- Problem
- Fix
- What's good

IMPORTANT:
Wait for user data before starting. Write in British English. Review this like code that may soon affect real users.

Before & After

❌ Without this prompt

Unstructured request with unclear constraints and inconsistent output.

βœ… With this prompt

Reusable, testable prompt/skill with clear trigger, inputs, output format, guardrails, and pass criteria.

Install Instructions

Copy the prompt text. Paste into ChatGPT, Claude, Gemini, or any AI chat. Fill in bracketed placeholders with your details. Run and review output.

Test It

Test command:
Trigger with: 'Test the Senior-Style Code Review with this input: [provide a short real example]'. Confirm output is specific, structured, and useful.
Expected output:
πŸ”΄ Critical β€” Lines 42 to 48 Problem: User input is interpolated directly into the SQL query. Fix: Use parameterised queries and validate the expected input shape.
Pass criteria:
  • Output is specific to the input provided β€” not generic. Output follows the stated format and length. No invented statistics, facts, prices, or dates. Placeholders are not left unfilled.

⚠️ Guardrails

  • Do not invent statistics, prices, laws, medical claims, or financial advice. Do not leave placeholders unfilled in output. Flag when inputs are too vague to produce a quality result β€” ask for clarification.

πŸ“ Context File Tip

Project Context file

⚠️ Common Failure Modes

  • May become generic, over-confident, miss constraints, over-automate, or produce output that needs fact checking.

πŸ”§ Fix Prompt

Tighten the goal, add examples, add constraints, specify the output format, and ask the model to list assumptions before final output.

πŸŽ› Available Modes

Quick Detailed Critic Final

πŸ”Œ Compatibility & Requirements

βœ… Works offline
πŸ‘€ Needs human approval
Approval point: Before publishing, sending, spending money, changing systems, or making commitments.
Required tools: No external tools required

πŸ“‹ Upgrade Notes

Upgraded for Prompt Hub Pro v9.9.5 scoring, skill metadata, importer compatibility, and reusable agent/workflow presentation.

πŸ’‘ Suggest an improvement

Install Wizard

Choose your platform to get step-by-step install instructions: