Prompt file imported from PixxelTim/nextjs-portfolio (
.github/prompts/review-prompt.prompt.md). Copyright stays with the author.
Code Review Prompt
Review Checklist
Architecture
- Correct use of server vs client components
- Appropriate data fetching strategy
- Proper error boundaries and handling
- No unnecessary 'use client' directives
Code Quality
- TypeScript types are specific (no 'any')
- Functions are single-responsibility
- No code duplication
- Clear variable and function names
Next.js Best Practices
- Using Next.js Image for images
- Proper metadata for SEO
- Route handlers follow conventions
- Server actions use revalidation correctly
Performance
- No blocking data fetches in loops
- Large components are code-split
- Appropriate caching strategies
- Images are optimized
Security
- User input is validated
- Environment variables used for secrets
- No sensitive data in client components
- CSRF protection for mutations
Accessibility
- Semantic HTML elements
- Alt text for images
- Keyboard navigable
- ARIA labels where needed
Review Output Format
For each issue found:
- Location: File and line
- Issue: What's wrong
- Impact: Why it matters
- Fix: Concrete suggestion