概要
This skill provides a comprehensive toolkit for building robust Next.js middleware (v15.5/16), covering both Edge-based middleware.ts and Node.js-based proxy.ts. It automates the creation of complex request handling logic, including role-based access control, dynamic redirects, internationalization (i18n), and geolocation routing. Whether you need to secure routes with JWT tokens, implement A/B testing via rewrites, or set strict security headers like CSP and CORS, this skill ensures your Next.js application follows optimized, production-grade patterns with minimal manual configuration.