| description | Use this agent when building production Next.js 14+ applications that require full-stack development with App Router, server components, and advanced performance optimization. Invoke when you need to architect or implement complete Next.js applications, optimize Core Web Vitals, implement server actions and mutations, or deploy SEO-optimized applications. Specifically:\n\n<example>\nContext: A startup is building an e-commerce platform and needs a complete Next.js 14 implementation with server-side rendering, database integration, and Lighthouse score > 95.\nuser: "Build a Next.js e-commerce app with product catalog, shopping cart, checkout flow, and real-time inventory updates. Need server components for SEO, App Router structure, and Core Web Vitals > 90."\nassistant: "I'll architect this as a complete Next.js application. I'll design the App Router with route groups for organization, implement server components for product pages and SEO, create server actions for cart and checkout operations, optimize images and fonts, configure ISR for product listings, and set up monitoring to achieve your Lighthouse targets. I'll also implement database integration with Prisma and edge runtime compatibility."\n<commentary>\nUse nextjs-developer when building complete Next.js applications from architecture through deployment, especially when you need to optimize for search engines, implement server-side rendering, and achieve strict performance budgets. This agent handles the full stack including API routes, database integration, and production deployment.\n</commentary>\n</example>\n\n<example>\nContext: An existing React SPA needs to be migrated to Next.js 14 for better SEO and initial page load performance, with existing backend APIs to integrate with.\nuser: "Migrate our React SPA to Next.js 14. We have existing REST APIs at /api/v1 and need to maintain feature parity while improving SEO and first paint time."\nassistant: "I'll design a Next.js App Router structure that maps to your existing React components, implement server components for page templates to improve SEO, create API route middleware to proxy your existing endpoints, set up server-side data fetching with proper cache invalidation, and configure preview deployments for testing. I'll ensure zero-downtime migration and maintain all existing features while optimizing Core Web Vitals."\n<commentary>\nInvoke nextjs-developer when migrating existing applications to Next.js or when adding server-side rendering to frontend-only applications. This agent excels at integrating with existing backend APIs and optimizing for performance during migration.\n</commentary>\n</example>\n\n<example>\nContext: A high-traffic SaaS application needs optimization—pages are slow, SEO metrics are poor, and the team needs to implement real-time features without rebuilding from scratch.\nuser: "Our Next.js app averages 3.5s LCP and we're ranking poorly in search. Need real-time notifications, improved performance, and better SEO. Currently using client-side routing and data fetching."\nassistant: "I'll audit your architecture and optimize it by migrating suitable components to server components, implementing streaming SSR for faster First Contentful Paint, configuring incremental static regeneration for SEO-critical pages, optimizing images and scripts, setting up server actions for real-time mutations, and implementing WebSocket support for notifications. I'll create a phased migration plan to achieve > 90 Lighthouse scores while adding real-time features."\n<commentary>\nUse nextjs-developer for performance optimization and architectural improvements to existing Next.js applications. This agent diagnoses performance bottlenecks and implements Next.js 14+ patterns like server components and streaming to improve metrics without full rewrites.\n</commentary>\n</example> |