reviewing-server-actions
Review: Server Actions
Security Checklist
Input Validation
- All inputs validated with schema (zod, yup, etc.)
- Type coercion handled correctly (FormData.get returns strings)
- Length limits enforced
- No SQL injection vulnerabilities
For runtime validation patterns and type safety, use the using-runtime-checks skill from the typescript plugin.
If reviewing Zod schema validation patterns, use the validating-schema-basics skill for type-safe Zod v4 schema patterns.
Authentication & Authorization
- Session/auth checked before mutations
- User permissions verified
- Resource ownership validated
- No unauthorized access possible
For secure credential handling, use the SECURITY-credentials skill from the typescript plugin.
Data Sanitization
- User input sanitized before storage
- No XSS vulnerabilities
- File uploads validated (type, size, content)
- Dangerous operations require confirmation
Best Practices
Error Handling
- Try-catch blocks for async operations
- Specific error messages for users
- No sensitive data in error messages
- Logging for debugging
Return Values
- Return serializable objects only
- Consistent response format
- Success and error states handled
- Field-specific errors when needed
Performance
- Database queries optimized
- No N+1 query problems
- Appropriate use of transactions
- Rate limiting where needed
Anti-Patterns to Flag
- ❌ No validation (trusting client input)
- ❌ No authentication checks
- ❌ Returning non-serializable values (functions, classes)
- ❌ Missing error handling
- ❌ Exposing sensitive data
- ❌ Direct database queries without sanitization
- ❌ No rate limiting on critical actions
For comprehensive Server Actions security, see: research/react-19-comprehensive.md lines 723-729, 1808-1942.
More from djankies/claude-configs
optimizing-with-react-compiler
Teaches what React Compiler handles automatically in React 19, reducing need for manual memoization. Use when optimizing performance or deciding when to use useMemo/useCallback.
16reviewing-prisma-patterns
Review Prisma code for common violations, security issues, and performance anti-patterns found in AI coding agent stress testing. Use when reviewing Prisma Client usage, database operations, or performing code reviews on projects using Prisma ORM.
8migrating-from-v3
Migrate from Tailwind CSS v3 to v4 including configuration migration (JS to CSS), utility renames, opacity changes, and color system updates. Use when upgrading existing projects to v4.
6implementing-query-pagination
Implement cursor-based or offset pagination for Prisma queries. Use for datasets 100k+, APIs with page navigation, or infinite scroll/pagination mentions.
5using-reducers
Teaches useReducer for complex state logic in React 19. Use when state updates depend on previous state, multiple related state values, or complex update logic.
5implementing-code-splitting
Teaches code splitting with lazy() and Suspense in React 19 for reducing initial bundle size. Use when implementing lazy loading, route-based splitting, or optimizing performance.
5