What problem does it solve?
Many Next.js projects accumulate suboptimal patterns that hurt performance, increase client-side JavaScript, and create fragile authentication and API layers; this Skill provides clear guidance to align projects with modern Next.js conventions and reduce regression risk.
Core Features & Use Cases
- App Router & Component Strategy: Prefer the /app directory, use Server Components for data fetching and Client Components only for interactivity to minimize client bundle size.
- Data Fetching Patterns: Recommend server-side fetching, route handlers for custom APIs, and client-side caching (SWR/React Query) when needed.
- Performance Optimization: Advise dynamic imports, next/image and next/font usage, ISR, and monitoring of Web Vitals for incremental improvements.
- Authentication & API Design: Use middleware for route protection, secure token storage (httpOnly cookies), server-side validation, and rate limiting for APIs.
- Project Structure & Maintainability: Provide a recommended folder layout, conventions for shared components, and guidelines for testing and documentation.
Quick Start
Use this skill to review a Next.js codebase and produce a prioritized checklist of improvements for routing, data fetching, authentication, and performance.