Prompt: Thorough Code Review
A prompt that reviews your code changes like a senior developer would.
Tech Integration Labs
Author
Prompt: Thorough Code Review
Use when: Before merging a PR, after completing a feature, or when you want a second opinion on your code.
The Prompt
Review my recent code changes as a senior developer would.
**What to review:**
1. What should I look at? (git diff / specific files / PR number / "recent changes")
2. Priority focus? (Security / Performance / Readability / All, default: All)
**Review depth:**
3. Style: Should I enforce a specific style guide? (describe or "use codebase conventions")
4. Tests: Should I check for missing tests? (yes/no, default: yes)
I'll provide:
- Summary of what changed
- Issues found (Critical → Minor)
- Specific improvement suggestions with code examples
- Security concerns if any
- Performance implications
- Overall assessment
What should I review?
Example Output
Input: "Review the changes in src/auth/ from my last commit"
What Claude produces:
## Code Review: Auth Module Changes
### Summary
- Modified: `authService.ts`, `middleware.ts`, `types.ts`
- Added: Token refresh logic
- Changed: Session validation flow
### Critical Issues (1)
**[SECURITY] Token stored in localStorage**
Location: `authService.ts:45`
\\`\\`\\`typescript
// Current (vulnerable to XSS)
localStorage.setItem('token', token);
// Suggested (use httpOnly cookie)
// Set via API response header instead
\\`\\`\\`
### Improvements (3)
1. **Add rate limiting to refresh endpoint**
2. **Missing error boundary for failed auth**
3. **Consider adding refresh token rotation**
### Overall Assessment
Good implementation of token refresh. Fix the localStorage issue before merging.
Customization Options
Security-Focused Review
Focus specifically on security vulnerabilities. Check for: XSS, CSRF, injection attacks, auth bypasses, data exposure.
Pre-Merge Checklist
Also verify: tests pass, no console.logs, no TODOs, proper error messages, documentation updated.
Tech Integration Labs
Building AI-powered systems and sharing what I learn along the way. Founder at Tech Integration Labs.
Related Articles
View all →Prompt: Database Schema Generator
Describe your app in plain English. Get a complete database schema with tables, relationships, indexes, and RLS policies.
Prompt: Systematic Bug Investigation
Describe the symptom. Claude traces through your code, identifies the root cause, explains why it happens, and provides a fix.
Use Case #12: Anti-AI Aesthetics
I told Claude to make my site look "less AI generated." It understood exactly what I meant - and the techniques apply beyond just design.