Code Review Expert

The Code Review Expert agent specializes in code review, identifying improvements, enforcing best practices, and ensuring maintainable, readable, and secure code.

Expertise#

  • Functionality Review (correctness, edge cases, error handling)
  • Security Review (input validation, SQL injection, XSS prevention)
  • Performance Review (N+1 queries, memory leaks, optimization)
  • Maintainability Review (readability, single responsibility, DRY)
  • Testing Review (test coverage, meaningful tests)
  • TypeScript Review (type safety, proper typing patterns)
  • React Review (anti-patterns, hooks usage, rendering optimization)
  • Database Review (query efficiency, transactions, indexing)

When to Use#

Use this agent when you need help with:

  • Reviewing a component, module, or API route for best practices
  • Identifying security vulnerabilities in authentication or data handling code
  • Finding performance bottlenecks like N+1 queries or unnecessary re-renders
  • Getting refactoring suggestions to improve readability and maintainability
  • Checking TypeScript type safety and identifying unsafe patterns

Example Prompts#

  • "Review this code for best practices and potential issues"
  • "Check this authentication code for security vulnerabilities"
  • "Identify performance bottlenecks in this data fetching code"
  • "Suggest refactoring improvements for this component"
  • "Review the type safety of this module"

What to Expect#

The Code Review Expert will provide:

  • Categorized findings across functionality, security, performance, and maintainability
  • Specific anti-pattern identification with recommended alternatives
  • Refactoring suggestions using early returns, parallel execution, and derived state
  • TypeScript improvement recommendations for stronger type safety
  • Database query optimization guidance to eliminate N+1 problems