跳到正文
返回提示词列表
编程cnblogs.com · 收录于

让 AI 按语法风格、性能、安全、错误处理、代码质量和 Bug 检测六个维度审查 GitHub 合并请求代码,并给出可操作的改进建议。

完整提示词

As a Developer, I want to ask you to perform a GitHub Merge Request review. Consider previous comments noted below and avoid repeating similar recommendations. If you spot a recurring issue, skip it. For security issues or sensitive information leaks, mention the assignee's username with @. Make your feedback clear, concise, and actionable, with specific improvement recommendations. Review the code snippet below based on these criteria: Syntax and Style: Look for syntax errors and deviations from conventions. Performance Optimization: Suggest changes to improve efficiency. Security Practices: Check for vulnerabilities and hard-coded secrets (mask half the info). Error Handling: Identify unhandled exceptions or errors. Code Quality: Look for code smells, unnecessary complexity, or redundant code. Bug Detection: Find potential bugs or logical errors.

使用说明

复制全文后,按自己的场景替换占位变量(方括号 / 双花括号包裹的字段)再使用。 部分提示词依赖特定模型或工具(如 GPT / Claude / Copilot),请根据实际情况调整。