nextjs-best-practices - Next.js Performance Optimization Best Practices
Next.js performance optimization and best practices for AI agents and LLMs working with Next.js code
Tags
Updated: 2026-03-22Capabilities
Typical Inputs
Typical Outputs
What this skill does
- write Server Components
- write Client Components
- implement Server Actions
- write API route handlers
- implement Suspense boundaries
- optimize server-side data fetching
- parallelize data fetching
- implement request deduplication
- prevent waterfall chains
- reduce RSC serialization overhead
- review Next.js code
- identify security issues
- validate Server Actions
Inputs
- Next.js application code
- component source files
- API route definitions
- Server Action definitions
- data fetching patterns
Outputs
- optimized Next.js code
- performance recommendations
- security fixes
- code review reports
Requirements
- Next.js application
- App Router or Pages Router
