[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78E2KDNBYJCQ9ZFW9EAFERD":3,"skill-same:01M78E2KDNBYJCQ9ZFW9EAFERD":46},{"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":25,"commitSha":26,"skillDirectory":27,"forksCount":14,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M78E2KDNBYJCQ9ZFW9EAFERD","nuxt4-patterns",null,"Nuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData.","princepatel04477-web\u002Ftrivoxa-group","princepatel04477-web","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F227740714?v=4","01M788ZAJ2KECD5KXVP55PZXKS","Prince Patel","01M788ZAJTCN8YSD737MRSKC5Q",0,"MIT","https:\u002F\u002Fgithub.com\u002Fprincepatel04477-web\u002Ftrivoxa-group\u002Fblob\u002Fmaster\u002F.github\u002Fskills\u002Fnuxt4-patterns\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: nuxt4-patterns\ndescription: Nuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData.\norigin: ECC\n---\n\n# Nuxt 4 Patterns\n\nUse when building or debugging Nuxt 4 apps with SSR, hybrid rendering, route rules, or page-level data fetching.\n\n## When to Activate\n\n- Hydration mismatches between server HTML and client state\n- Route-level rendering decisions such as prerender, SWR, ISR, or client-only sections\n- Performance work around lazy loading, lazy hydration, or payload size\n- Page or component data fetching with `useFetch`, `useAsyncData`, or `$fetch`\n- Nuxt routing issues tied to route params, middleware, or SSR\u002Fclient differences\n\n## Hydration Safety\n\n- Keep the first render deterministic. Do not put `Date.now()`, `Math.random()`, browser-only APIs, or storage reads directly into SSR-rendered template state.\n- Move browser-only logic behind `onMounted()`, `import.meta.client`, `ClientOnly`, or a `.client.vue` component when the server cannot produce the same markup.\n- Use Nuxt's `useRoute()` composable, not the one from `vue-router`.\n- Do not use `route.fullPath` to drive SSR-rendered markup. URL fragments are client-only, which can create hydration mismatches.\n- Treat `ssr: false` as an escape hatch for truly browser-only areas, not a default fix for mismatches.\n\n## Data Fetching\n\n- Prefer `await useFetch()` for SSR-safe API reads in pages and components. It forwards server-fetched data into the Nuxt payload and avoids a second fetch on hydration.\n- Use `useAsyncData()` when the fetcher is not a simple `$fetch()` call, when you need a custom key, or when you are composing multiple async sources.\n- Give `useAsyncData()` a stable key for cache reuse and predictable refresh behavior.\n- Keep `useAsyncData()` handlers side-effect free. They can run during SSR and hydration.\n- Use `$fetch()` for user-triggered writes or client-only actions, not top-level page data that should be hydrated from SSR.\n- Use `lazy: true`, `useLazyFetch()`, or `useLazyAsyncData()` for non-critical data that should not block navigation. Handle `status === 'pending'` in the UI.\n- Use `server: false` only for data that is not needed for SEO or the first paint.\n- Trim payload size with `pick` and prefer shallower payloads when deep reactivity is unnecessary.\n\n```ts\nconst route = useRoute()\n\nconst { data: article, status, error, refresh } = await useAsyncData(\n  () => `article:${route.params.slug}`,\n  () => $fetch(`\u002Fapi\u002Farticles\u002F${route.params.slug}`),\n)\n\nconst { data: comments } = await useFetch(`\u002Fapi\u002Farticles\u002F${route.params.slug}\u002Fcomments`, {\n  lazy: true,\n  server: false,\n})\n```\n\n## Route Rules\n\nPrefer `routeRules` in `nuxt.config.ts` for rendering and caching strategy:\n\n```ts\nexport default defineNuxtConfig({\n  routeRules: {\n    '\u002F': { prerender: true },\n    '\u002Fproducts\u002F**': { swr: 3600 },\n    '\u002Fblog\u002F**': { isr: true },\n    '\u002Fadmin\u002F**': { ssr: false },\n    '\u002Fapi\u002F**': { cache: { maxAge: 60 * 60 } },\n  },\n})\n```\n\n- `prerender`: static HTML at build time\n- `swr`: serve cached content and revalidate in the background\n- `isr`: incremental static regeneration on supported platforms\n- `ssr: false`: client-rendered route\n- `cache` or `redirect`: Nitro-level response behavior\n\nPick route rules per route group, not globally. Marketing pages, catalogs, dashboards, and APIs usually need different strategies.\n\n## Lazy Loading and Performance\n\n- Nuxt already code-splits pages by route. Keep route boundaries meaningful before micro-optimizing component splits.\n- Use the `Lazy` prefix to dynamically import non-critical components.\n- Conditionally render lazy components with `v-if` so the chunk is not loaded until the UI actually needs it.\n- Use lazy hydration for below-the-fold or non-critical interactive UI.\n\n```vue\n\u003Ctemplate>\n  \u003CLazyRecommendations v-if=\"showRecommendations\" \u002F>\n  \u003CLazyProductGallery hydrate-on-visible \u002F>\n\u003C\u002Ftemplate>\n```\n\n- For custom strategies, use `defineLazyHydrationComponent()` with a visibility or idle strategy.\n- Nuxt lazy hydration works on single-file components. Passing new props to a lazily hydrated component will trigger hydration immediately.\n- Use `NuxtLink` for internal navigation so Nuxt can prefetch route components and generated payloads.\n\n## Review Checklist\n\n- First SSR render and hydrated client render produce the same markup\n- Page data uses `useFetch` or `useAsyncData`, not top-level `$fetch`\n- Non-critical data is lazy and has explicit loading UI\n- Route rules match the page's SEO and freshness requirements\n- Heavy interactive islands are lazy-loaded or lazily hydrated\n","# Nuxt 4 Patterns\n\nUse when building or debugging Nuxt 4 apps with SSR, hybrid rendering, route rules, or page-level data fetching.\n\n## When to Activate\n\n- Hydration mismatches between server HTML and client state\n- Route-level rendering decisions such as prerender, SWR, ISR, or client-only sections\n- Performance work around lazy loading, lazy hydration, or payload size\n- Page or component data fetching with `useFetch`, `useAsyncData`, or `$fetch`\n- Nuxt routing issues tied to route params, middleware, or SSR\u002Fclient differences\n\n## Hydration Safety\n\n- Keep the first render deterministic. Do not put `Date.now()`, `Math.random()`, browser-only APIs, or storage reads directly into SSR-rendered template state.\n- Move browser-only logic behind `onMounted()`, `import.meta.client`, `ClientOnly`, or a `.client.vue` component when the server cannot produce the same markup.\n- Use Nuxt's `useRoute()` composable, not the one from `vue-router`.\n- Do not use `route.fullPath` to drive SSR-rendered markup. URL fragments are client-only, which can create hydration mismatches.\n- Treat `ssr: false` as an escape hatch for truly browser-only areas, not a default fix for mismatches.\n\n## Data Fetching\n\n- Prefer `await useFetch()` for SSR-safe API reads in pages and components. It forwards server-fetched data into the Nuxt payload and avoids a second fetch on hydration.\n- Use `useAsyncData()` when the fetcher is not a simple `$fetch()` call, when you need a custom key, or when you are composing multiple async sources.\n- Give `useAsyncData()` a stable key for cache reuse and predictable refresh behavior.\n- Keep `useAsyncData()` handlers side-effect free. They can run during SSR and hydration.\n- Use `$fetch()` for user-triggered writes or client-only actions, not top-level page data that should be hydrated from SSR.\n- Use `lazy: true`, `useLazyFetch()`, or `useLazyAsyncData()` for non-critical data that should not block navigation. Handle `status === 'pending'` in the UI.\n- Use `server: false` only for data that is not needed for SEO or the first paint.\n- Trim payload size with `pick` and prefer shallower payloads when deep reactivity is unnecessary.\n\n```ts\nconst route = useRoute()\n\nconst { data: article, status, error, refresh } = await useAsyncData(\n  () => `article:${route.params.slug}`,\n  () => $fetch(`\u002Fapi\u002Farticles\u002F${route.params.slug}`),\n)\n\nconst { data: comments } = await useFetch(`\u002Fapi\u002Farticles\u002F${route.params.slug}\u002Fcomments`, {\n  lazy: true,\n  server: false,\n})\n```\n\n## Route Rules\n\nPrefer `routeRules` in `nuxt.config.ts` for rendering and caching strategy:\n\n```ts\nexport default defineNuxtConfig({\n  routeRules: {\n    '\u002F': { prerender: true },\n    '\u002Fproducts\u002F**': { swr: 3600 },\n    '\u002Fblog\u002F**': { isr: true },\n    '\u002Fadmin\u002F**': { ssr: false },\n    '\u002Fapi\u002F**': { cache: { maxAge: 60 * 60 } },\n  },\n})\n```\n\n- `prerender`: static HTML at build time\n- `swr`: serve cached content and revalidate in the background\n- `isr`: incremental static regeneration on supported platforms\n- `ssr: false`: client-rendered route\n- `cache` or `redirect`: Nitro-level response behavior\n\nPick route rules per route group, not globally. Marketing pages, catalogs, dashboards, and APIs usually need different strategies.\n\n## Lazy Loading and Performance\n\n- Nuxt already code-splits pages by route. Keep route boundaries meaningful before micro-optimizing component splits.\n- Use the `Lazy` prefix to dynamically import non-critical components.\n- Conditionally render lazy components with `v-if` so the chunk is not loaded until the UI actually needs it.\n- Use lazy hydration for below-the-fold or non-critical interactive UI.\n\n```vue\n\u003Ctemplate>\n  \u003CLazyRecommendations v-if=\"showRecommendations\" \u002F>\n  \u003CLazyProductGallery hydrate-on-visible \u002F>\n\u003C\u002Ftemplate>\n```\n\n- For custom strategies, use `defineLazyHydrationComponent()` with a visibility or idle strategy.\n- Nuxt lazy hydration works on single-file components. Passing new props to a lazily hydrated component will trigger hydration immediately.\n- Use `NuxtLink` for internal navigation so Nuxt can prefetch route components and generated payloads.\n\n## Review Checklist\n\n- First SSR render and hydrated client render produce the same markup\n- Page data uses `useFetch` or `useAsyncData`, not top-level `$fetch`\n- Non-critical data is lazy and has explicit loading UI\n- Route rules match the page's SEO and freshness requirements\n- Heavy interactive islands are lazy-loaded or lazily hydrated\n",{"name":5,"origin":24,"description":7},"ECC","master","877653a671c51fae6476bd9f0d34ee6c408d68b9",".github\u002Fskills\u002Fnuxt4-patterns","https:\u002F\u002Fgithub.com\u002Fprincepatel04477-web\u002Ftrivoxa-group","https:\u002F\u002Ftrivoxa-group.vercel.app","https:\u002F\u002Fgithub.com\u002Fprincepatel04477-web","2026-08-01 17:29:31",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add princepatel04477-web\u002Ftrivoxa-group --skill nuxt4-patterns",{"tool":38,"command":39},"bunx","bunx skills add princepatel04477-web\u002Ftrivoxa-group --skill nuxt4-patterns",{"tool":41,"command":42},"pnpm","pnpm dlx skills add princepatel04477-web\u002Ftrivoxa-group --skill nuxt4-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fprincepatel04477-web\u002Ftrivoxa-group\u002Fblob\u002Fmaster\u002F.github\u002Fskills\u002Fnuxt4-patterns\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M78G4Z5RFJ72G536XYPC77PG","zustand-store-ts","Create Zustand stores following established patterns with proper TypeScript types and middleware.","https:\u002F\u002Fgithub.com\u002Fprincepatel04477-web\u002Ftrivoxa-group\u002Fblob\u002Fmaster\u002F.github\u002Fskills\u002Fzustand-store-ts\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M78G4WQMHRST36KDP7AV3NR3","zoom-automation","Automate Zoom meeting creation, management, recordings, webinars, and participant tracking via Rube MCP (Composio). Always search tools first for current schemas.","https:\u002F\u002Fgithub.com\u002Fprincepatel04477-web\u002Ftrivoxa-group\u002Fblob\u002Fmaster\u002F.github\u002Fskills\u002Fzoom-automation\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M78G4T37F4SPS7M4KT0A8JJB","zoho-crm-automation","Automate Zoho CRM tasks via Rube MCP (Composio): create\u002Fupdate records, search contacts, manage leads, and convert leads. Always search tools first for current schemas.","https:\u002F\u002Fgithub.com\u002Fprincepatel04477-web\u002Ftrivoxa-group\u002Fblob\u002Fmaster\u002F.github\u002Fskills\u002Fzoho-crm-automation\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M78G4QAJMF71KD1G38MNDQYK","zod-validation-expert","Expert in Zod — TypeScript-first schema validation. Covers parsing, custom errors, refinements, type inference, and integration with React Hook Form, Next.js, and tRPC.","https:\u002F\u002Fgithub.com\u002Fprincepatel04477-web\u002Ftrivoxa-group\u002Fblob\u002Fmaster\u002F.github\u002Fskills\u002Fzod-validation-expert\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M78G4MS3WE96MH5P561KFY95","zipai-optimizer","Adaptive token optimizer: intelligent filtering, surgical output, ambiguity-first, context-window-aware, VCS-aware, MCP-aware.","https:\u002F\u002Fgithub.com\u002Fprincepatel04477-web\u002Ftrivoxa-group\u002Fblob\u002Fmaster\u002F.github\u002Fskills\u002Fzipai-optimizer\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M78G4GZ0T47C6929V9CVH1AK","zeroize-audit","Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with assembly-level analysis, and control-flow verification. Use for auditing C\u002FC++\u002FRust code handling secrets, keys, passwords, or other sensitive data.","https:\u002F\u002Fgithub.com\u002Fprincepatel04477-web\u002Ftrivoxa-group\u002Fblob\u002Fmaster\u002F.github\u002Fskills\u002Fzeroize-audit\u002FSKILL.md",[],[]]