[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AP5QEPJG1A3MMDSFQP36DX":3,"skill-same:01M7AP5QEPJG1A3MMDSFQP36DX":55},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":34,"install":35,"resources":48},"01M7AP5QEPJG1A3MMDSFQP36DX","nextjs-app-router-patterns",null,"Master Next.js 14+ App Router with Server Components, streaming, parallel routes, and advanced data fetching. Use when building Next.js applications, implementing SSR\u002FSSG, or optimizing React Server Components.","Vinayak-RZ\u002FImproveness","Vinayak-RZ","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F179278780?v=4","01M7ANW079C0NQMM13ZJ9AFNNB","Vinayak Raizada","01M7ANW07W35RJP6KJQ6448V08",1,"MIT","https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002F.cursor\u002Fskills\u002Fnextjs-app-router-patterns\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: nextjs-app-router-patterns\npaths:\n  - \"**\u002Fapp\u002F**\"\n  - \"**\u002Fpages\u002F**\"\n  - \"next.config.*\"\ndescription: Master Next.js 14+ App Router with Server Components, streaming, parallel routes, and advanced data fetching. Use when building Next.js applications, implementing SSR\u002FSSG, or optimizing React Server Components.\n---\n\n# Next.js App Router Patterns\n\nComprehensive patterns for Next.js 14+ App Router architecture, Server Components, and modern full-stack React development.\n\n## When to Use This Skill\n\n- Building new Next.js applications with App Router\n- Migrating from Pages Router to App Router\n- Implementing Server Components and streaming\n- Setting up parallel and intercepting routes\n- Optimizing data fetching and caching\n- Building full-stack features with Server Actions\n\n## Core Concepts\n\n### 1. Rendering Modes\n\n| Mode                  | Where        | When to Use                               |\n| --------------------- | ------------ | ----------------------------------------- |\n| **Server Components** | Server only  | Data fetching, heavy computation, secrets |\n| **Client Components** | Browser      | Interactivity, hooks, browser APIs        |\n| **Static**            | Build time   | Content that rarely changes               |\n| **Dynamic**           | Request time | Personalized or real-time data            |\n| **Streaming**         | Progressive  | Large pages, slow data sources            |\n\n### 2. File Conventions\n\n```\napp\u002F\n├── layout.tsx       # Shared UI wrapper\n├── page.tsx         # Route UI\n├── loading.tsx      # Loading UI (Suspense)\n├── error.tsx        # Error boundary\n├── not-found.tsx    # 404 UI\n├── route.ts         # API endpoint\n├── template.tsx     # Re-mounted layout\n├── default.tsx      # Parallel route fallback\n└── opengraph-image.tsx  # OG image generation\n```\n\n## Quick Start\n\n```typescript\n\u002F\u002F app\u002Flayout.tsx\nimport { Inter } from 'next\u002Ffont\u002Fgoogle'\nimport { Providers } from '.\u002Fproviders'\n\nconst inter = Inter({ subsets: ['latin'] })\n\nexport const metadata = {\n  title: { default: 'My App', template: '%s | My App' },\n  description: 'Built with Next.js App Router',\n}\n\nexport default function RootLayout({\n  children,\n}: {\n  children: React.ReactNode\n}) {\n  return (\n    \u003Chtml lang=\"en\" suppressHydrationWarning>\n      \u003Cbody className={inter.className}>\n        \u003CProviders>{children}\u003C\u002FProviders>\n      \u003C\u002Fbody>\n    \u003C\u002Fhtml>\n  )\n}\n\n\u002F\u002F app\u002Fpage.tsx - Server Component by default\nasync function getProducts() {\n  const res = await fetch('https:\u002F\u002Fapi.example.com\u002Fproducts', {\n    next: { revalidate: 3600 }, \u002F\u002F ISR: revalidate every hour\n  })\n  return res.json()\n}\n\nexport default async function HomePage() {\n  const products = await getProducts()\n\n  return (\n    \u003Cmain>\n      \u003Ch1>Products\u003C\u002Fh1>\n      \u003CProductGrid products={products} \u002F>\n    \u003C\u002Fmain>\n  )\n}\n```\n\n## Detailed patterns and worked examples\n\nDetailed pattern documentation lives in `references\u002Fdetails.md`. Read that file when the navigation tier above is insufficient.\n\n## Best Practices\n\n### Do's\n\n- **Start with Server Components** - Add 'use client' only when needed\n- **Colocate data fetching** - Fetch data where it's used\n- **Use Suspense boundaries** - Enable streaming for slow data\n- **Leverage parallel routes** - Independent loading states\n- **Use Server Actions** - For mutations with progressive enhancement\n\n### Don'ts\n\n- **Don't pass serializable data** - Server → Client boundary limitations\n- **Don't use hooks in Server Components** - No useState, useEffect\n- **Don't fetch in Client Components** - Use Server Components or React Query\n- **Don't over-nest layouts** - Each layout adds to the component tree\n- **Don't ignore loading states** - Always provide loading.tsx or Suspense\n","# Next.js App Router Patterns\n\nComprehensive patterns for Next.js 14+ App Router architecture, Server Components, and modern full-stack React development.\n\n## When to Use This Skill\n\n- Building new Next.js applications with App Router\n- Migrating from Pages Router to App Router\n- Implementing Server Components and streaming\n- Setting up parallel and intercepting routes\n- Optimizing data fetching and caching\n- Building full-stack features with Server Actions\n\n## Core Concepts\n\n### 1. Rendering Modes\n\n| Mode                  | Where        | When to Use                               |\n| --------------------- | ------------ | ----------------------------------------- |\n| **Server Components** | Server only  | Data fetching, heavy computation, secrets |\n| **Client Components** | Browser      | Interactivity, hooks, browser APIs        |\n| **Static**            | Build time   | Content that rarely changes               |\n| **Dynamic**           | Request time | Personalized or real-time data            |\n| **Streaming**         | Progressive  | Large pages, slow data sources            |\n\n### 2. File Conventions\n\n```\napp\u002F\n├── layout.tsx       # Shared UI wrapper\n├── page.tsx         # Route UI\n├── loading.tsx      # Loading UI (Suspense)\n├── error.tsx        # Error boundary\n├── not-found.tsx    # 404 UI\n├── route.ts         # API endpoint\n├── template.tsx     # Re-mounted layout\n├── default.tsx      # Parallel route fallback\n└── opengraph-image.tsx  # OG image generation\n```\n\n## Quick Start\n\n```typescript\n\u002F\u002F app\u002Flayout.tsx\nimport { Inter } from 'next\u002Ffont\u002Fgoogle'\nimport { Providers } from '.\u002Fproviders'\n\nconst inter = Inter({ subsets: ['latin'] })\n\nexport const metadata = {\n  title: { default: 'My App', template: '%s | My App' },\n  description: 'Built with Next.js App Router',\n}\n\nexport default function RootLayout({\n  children,\n}: {\n  children: React.ReactNode\n}) {\n  return (\n    \u003Chtml lang=\"en\" suppressHydrationWarning>\n      \u003Cbody className={inter.className}>\n        \u003CProviders>{children}\u003C\u002FProviders>\n      \u003C\u002Fbody>\n    \u003C\u002Fhtml>\n  )\n}\n\n\u002F\u002F app\u002Fpage.tsx - Server Component by default\nasync function getProducts() {\n  const res = await fetch('https:\u002F\u002Fapi.example.com\u002Fproducts', {\n    next: { revalidate: 3600 }, \u002F\u002F ISR: revalidate every hour\n  })\n  return res.json()\n}\n\nexport default async function HomePage() {\n  const products = await getProducts()\n\n  return (\n    \u003Cmain>\n      \u003Ch1>Products\u003C\u002Fh1>\n      \u003CProductGrid products={products} \u002F>\n    \u003C\u002Fmain>\n  )\n}\n```\n\n## Detailed patterns and worked examples\n\nDetailed pattern documentation lives in `references\u002Fdetails.md`. Read that file when the navigation tier above is insufficient.\n\n## Best Practices\n\n### Do's\n\n- **Start with Server Components** - Add 'use client' only when needed\n- **Colocate data fetching** - Fetch data where it's used\n- **Use Suspense boundaries** - Enable streaming for slow data\n- **Leverage parallel routes** - Independent loading states\n- **Use Server Actions** - For mutations with progressive enhancement\n\n### Don'ts\n\n- **Don't pass serializable data** - Server → Client boundary limitations\n- **Don't use hooks in Server Components** - No useState, useEffect\n- **Don't fetch in Client Components** - Use Server Components or React Query\n- **Don't over-nest layouts** - Each layout adds to the component tree\n- **Don't ignore loading states** - Always provide loading.tsx or Suspense\n",{"name":5,"paths":24,"description":7},[25,26,27],"**\u002Fapp\u002F**","**\u002Fpages\u002F**","next.config.*","main","9fb685c39f4231d1c854d8d1b95935d2e1a2e709",".cursor\u002Fskills\u002Fnextjs-app-router-patterns",0,"https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness","https:\u002F\u002Fgithub.com\u002FVinayak-RZ","2026-09-15 15:09:50",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add Vinayak-RZ\u002FImproveness --skill nextjs-app-router-patterns",{"tool":41,"command":42},"bunx","bunx skills add Vinayak-RZ\u002FImproveness --skill nextjs-app-router-patterns",{"tool":44,"command":45},"pnpm","pnpm dlx skills add Vinayak-RZ\u002FImproveness --skill nextjs-app-router-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002F.cursor\u002Fskills\u002Fnextjs-app-router-patterns\u002FSKILL.md",true,[49],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"references\u002Fdetails.md","REFERENCE","参考文档",9939,"https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002F.cursor\u002Fskills\u002Fnextjs-app-router-patterns\u002Freferences\u002Fdetails.md",[56,63,70,77,83,90],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7APA22BN6W9SVF4SCEAP3B1","greet","A greeting skill for testing","https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002Foh-my-pi\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Fmarketplace\u002Ffixtures\u002Fvalid-marketplace\u002Fplugins\u002Fhello-plugin\u002Fskills\u002Fgreet\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7AP9ZV2PZ7EZAVMP021GT88","valid-skill","A valid skill for testing purposes.","https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002Foh-my-pi\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Fvalid-skill\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7AP9YRRCH92DRVN61AQTNAZ","unknown-field","A skill with an unknown frontmatter field.","https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002Foh-my-pi\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Funknown-field\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7AP9XDBJJSP9XRNGP6JQ2BX","no-frontmatter","https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002Foh-my-pi\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Fno-frontmatter\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7AP9WAGKGA2C3FN9B92RKAD","child-skill","A nested skill in a subdirectory.","https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002Foh-my-pi\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Fnested\u002Fchild-skill\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M7AP9SRFAAYTQ44GWGXG5ERX","different-name","A skill with a name that doesn't match the directory.","https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002Foh-my-pi\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Fname-mismatch\u002FSKILL.md",[],[]]