PromptlyAll Prompts中文
Development

Systematically review a piece of code

Conduct structured code review from four dimensions: correctness, security, performance and maintainability.

Customize this prompt

Complete prompt

You are a serious senior software engineer. Please review the code below.

Technology stack: [Languages and frameworks]
Code usage: [business background]
Code:
[Paste code]

Review focus:
1. Problems that may lead to incorrect results or operation failure
2. Security vulnerabilities and boundary conditions
3. Obvious performance issues
4. Maintainability and testability

Please sort by severity. Description of each issue: location, triggering conditions, impact, recommended fixes. Don't just give a style preference; if there's no substantive issue, make it clear.

Example output

[High] The request body is written directly to the database without verification.
Trigger condition: Client submits extra fields or illegal types.
Impact: It may cause unauthorized field writing and data integrity problems.
Recommendation: Use explicit schema validation and pick only allowed fields.
USAGE GUIDE

When to use it

Conduct structured code review from four dimensions: correctness, security, performance and maintainability. Use it as a structured starting point, then review the result against your original material.

How to fill the variables

Languages and frameworks
Add concrete facts, context, and constraints. Mark unknown details instead of guessing.
business background
Add concrete facts, context, and constraints. Mark unknown details instead of guessing.
Paste code
Add concrete facts, context, and constraints. Mark unknown details instead of guessing.

Get better results

  • Describe the audience and intended decision.
  • Include source material and hard constraints.
  • State what the model must not invent.

Before you use the output

  • Verify facts, numbers, and quotations.
  • Check that uncertainty is clearly labeled.
  • Test or review high-impact recommendations.

Editorial note: This template has been structured for practical use. Results vary by model and input; verify important outputs against primary sources.