Runs a structured senior-engineer-style review on any code snippet, flagging issues across correctness, security, performance, and readability with a consistent per-issue output format.
Runs a structured senior-engineer-style review on any code snippet, flagging issues across correctness, security, performance, and readability with a consistent per-issue output format. Use it before merging PRs or auditing code you didn't write.
Review the following [language] code as a senior engineer. Context: [describe what the code does and where it lives in the codebase]. Focus your review on: (1) correctness — any logic errors, edge cases, or off-by-one issues, (2) security — injection risks, unvalidated input, exposed secrets, insecure defaults, (3) performance — unnecessary loops, N+1 queries, blocking operations, (4) readability — naming, function length, unnecessary complexity. For each issue, give the line or pattern, explain the problem, and suggest a specific fix. Do not flag style preferences as bugs. Code: [paste code]
Source: https://chatsmith.io/blogs/prompt/claude-prompts-for-software-engineering-00220