// Next.js App Router .cursorrules
Add this skill
npx mdskills install PatrickJS/cursor-nextjs-app-routerLists Next.js App Router conventions but lacks actionable instructions for AI agents
1// Next.js App Router .cursorrules23// Next.js App Router best practices45const nextjsAppRouterBestPractices = [6 "Use server components by default",7 "Implement client components only when necessary",8 "Utilize the new file-based routing system",9 "Use layout.js for shared layouts",10 "Implement loading.js for loading states",11 "Use error.js for error handling",12 "Utilize route handlers for API routes",13];1415// Folder structure1617const folderStructure = `18app/19 layout.js20 page.js21 components/22 lib/23 styles/24public/25`;2627// Additional instructions2829const additionalInstructions = `301. Use TypeScript for type safety312. Implement proper metadata for SEO323. Utilize Next.js Image component for optimized images334. Use CSS Modules or Tailwind CSS for styling345. Implement proper error boundaries356. Follow Next.js naming conventions for special files367. Use environment variables for configuration37`;3839
Full transparency — inspect the skill content before installing.