编程syntheseai.com · 收录于
获取专家级代码审查,按严重程度列出问题并给出重构代码和测试建议
完整提示词
Act as a senior software engineer conducting a code review. Review the code below and provide: 1. **Summary** — What the code does in 1–2 sentences. 2. **Issues Found** — List bugs, anti-patterns, security risks, and performance concerns (ranked by severity: Critical / Medium / Low). 3. **Refactored Version** — Provide the improved code with inline comments explaining key changes. 4. **Tests to Add** — List 3–5 unit test cases to cover edge cases. ``` [PASTE CODE HERE] ``` Language: [LANGUAGE]
使用说明
复制全文后,按自己的场景替换占位变量(方括号 / 双花括号包裹的字段)再使用。 部分提示词依赖特定模型或工具(如 GPT / Claude / Copilot),请根据实际情况调整。