[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DB3ZCPYVSGSERCF1XKE4NJ":3,"skill-same:01M7DB3ZCPYVSGSERCF1XKE4NJ":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M7DB3ZCPYVSGSERCF1XKE4NJ","nuxt4-patterns",null,"Nuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData. Use when building or reviewing a Nuxt 4 app, or debugging hydration mismatches and SSR-safe data fetching.","MoradDev\u002Fskills-unified","MoradDev","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F72839584?v=4","01M7DASN3HYHFBYW4ZNMPTHQ63","01M7DASN4N6P4P9WMEFRE2V0TF",2,"MIT","https:\u002F\u002Fgithub.com\u002FMoradDev\u002Fskills-unified\u002Fblob\u002Fmain\u002Fcuration\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. Use when building or reviewing a Nuxt 4 app, or debugging hydration mismatches and SSR-safe data fetching.\nmetadata:\n  origin: 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,"metadata":23,"description":7},{"origin":24},"ECC","main","7542b2fc80051758dfb288b450cb344d3bdfca35","curation\u002Fskills\u002Fnuxt4-patterns",0,"https:\u002F\u002Fgithub.com\u002FMoradDev\u002Fskills-unified","https:\u002F\u002Fgithub.com\u002FMoradDev","2026-11-07 21:53:24",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add MoradDev\u002Fskills-unified --skill nuxt4-patterns",{"tool":38,"command":39},"bunx","bunx skills add MoradDev\u002Fskills-unified --skill nuxt4-patterns",{"tool":41,"command":42},"pnpm","pnpm dlx skills add MoradDev\u002Fskills-unified --skill nuxt4-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMoradDev\u002Fskills-unified\u002Fblob\u002Fmain\u002Fcuration\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":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":18},"01M7DB9J6N2PSGECQ6FTWW7B2H","windows-desktop-e2e","E2E testing for Windows native desktop apps (WPF, WinForms, Win32\u002FMFC, Qt) using pywinauto and Windows UI Automation. Use when writing E2E tests for a Windows native desktop app with pywinauto or UI Automation.","https:\u002F\u002Fgithub.com\u002FMoradDev\u002Fskills-unified\u002Fblob\u002Fmain\u002Fcuration\u002Fskills\u002Fwindows-desktop-e2e\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":18},"01M7DB9CCWT4YW7B791QN43E3Q","vue-patterns","Vue.js 3 Composition API patterns, component architecture, reactivity best practices, Pinia state management, Vue Router navigation, and Nuxt SSR patterns. Activates for Vue, Nuxt, Vite, or Pinia projects. Use when building or reviewing Vue 3, Nuxt, or Pinia code — Composition API, reactivity, or router navigation.","https:\u002F\u002Fgithub.com\u002FMoradDev\u002Fskills-unified\u002Fblob\u002Fmain\u002Fcuration\u002Fskills\u002Fvue-patterns\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M7DB976FM2CAWT807EA36MXM","vite-patterns","Vite build tool patterns including config, plugins, HMR, env variables, proxy setup, SSR, library mode, dependency pre-bundling, and build optimization. Activate when working with vite.config.ts, Vite plugins, or Vite-based projects.","https:\u002F\u002Fgithub.com\u002FMoradDev\u002Fskills-unified\u002Fblob\u002Fmain\u002Fcuration\u002Fskills\u002Fvite-patterns\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M7DB93JZRAWFB5QHH0C8DZ8N","using-agent-skills","Discovers and invokes agent skills. Use when starting a session, or when you need to decide which skill or workflow applies to the piece of work at hand. This is the meta-skill that governs how all other skills are discovered and invoked.","https:\u002F\u002Fgithub.com\u002FMoradDev\u002Fskills-unified\u002Fblob\u002Fmain\u002Fcuration\u002Fskills\u002Fusing-agent-skills\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M7DB8YYW1PEDS7H2AA86TE2E","ui-demo","Record polished UI demo videos using Playwright. Use when the user asks to create a demo, walkthrough, screen recording, or tutorial video of a web application. Produces WebM videos with visible cursor, natural pacing, and professional feel.","https:\u002F\u002Fgithub.com\u002FMoradDev\u002Fskills-unified\u002Fblob\u002Fmain\u002Fcuration\u002Fskills\u002Fui-demo\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M7DB8RPQPW2R6GKJW618VDST","swiftui-patterns","SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS\u002FmacOS UI best practices. Use when building or reviewing SwiftUI views, @Observable state, navigation, or render performance.","https:\u002F\u002Fgithub.com\u002FMoradDev\u002Fskills-unified\u002Fblob\u002Fmain\u002Fcuration\u002Fskills\u002Fswiftui-patterns\u002FSKILL.md",[],[]]