Code Review & Refactor
Separating review from implementation lets you stay in control. Claude Code reads the actual file content rather than working from memory. Rating severity helps you prioritize, and quoting specific code makes issues unambiguous.
Review {{filePath}} and suggest improvements. Do NOT make changes yet — just analyze and report.
**Review criteria:**
1. **Readability:** Are variable/function names clear? Is the logic easy to follow?
2. **Performance:** Any unnecessary re-renders, O(n^2) operations, or missing memoization?
3. **Error handling:** Are failure modes covered? Any silent failures?
4. **Types:** Are TypeScript types precise or using \`any\` / overly broad types?
5. **Duplication:** Is there logic that could be extracted into a shared utility?
6. **Testing:** Is this code easily testable? What would be hard to test and why?
For each issue:
- Quote the specific code
- Explain the problem
- Rate severity: critical / should-fix / nice-to-have
- Provide the improved version
After review, ask me which improvements I want to apply before making any changes.Variables to customize
Why this prompt works
Separating review from implementation lets you stay in control. Claude Code reads the actual file content rather than working from memory. Rating severity helps you prioritize, and quoting specific code makes issues unambiguous.
What you get when you save this prompt
Your workspace unlocks powerful tools to iterate and improve.
AI Optimization
One-click improvement with structure analysis and pattern suggestions.
Version History
Track every edit. Compare versions side-by-side with word-level diffs.
Folders & Tags
Organize your library with nested folders, tags, and drag-and-drop.
$ npm i -g @promptingbox/mcpUse Everywhere
Access prompts from Claude, Cursor, ChatGPT & more via MCP integration.
Your prompts, organized
Save, version, and access your best prompts across ChatGPT, Claude, Cursor, and more.