[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79AFGBA1QR6H9DBMAEMFXV6":3,"skill-same:01M79AFGBA1QR6H9DBMAEMFXV6":67},{"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":31,"commitSha":32,"skillDirectory":33,"forksCount":14,"repositoryHtmlUrl":34,"repositoryHomepageUrl":6,"ownerHtmlUrl":35,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":36,"install":37,"resources":50},"01M79AFGBA1QR6H9DBMAEMFXV6","nuxt-data",null,"Nuxt 5 data management with useFetch, useAsyncData, useState, and Pinia. Use when creating composables, fetching data, managing state, or debugging reactive\u002FSSR data issues.","Elogic360\u002Fsoftware-factory","Elogic360","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F156535519?v=4","01M74NH3F0RB13PWB7JZDE2V80","elogic360","01M74NH3FPC65082MDZVMFHDM3",0,"MIT","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fnuxt-v5\u002Fskills\u002Fnuxt-data\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: nuxt-data\ndescription: Nuxt 5 data management with useFetch, useAsyncData, useState, and Pinia. Use when creating composables, fetching data, managing state, or debugging reactive\u002FSSR data issues.\nlicense: MIT\nmetadata:\n  version: 5.0.0\n  author: Claude Skills Maintainers\n  category: Framework\n  framework: Nuxt\n  framework-version: 5.x\n  last-verified: 2026-03-30\n---\n\n# Nuxt 5 Data Management\n\nComposables, data fetching, and state management patterns for Nuxt 5 applications.\n\n**Use when**: creating custom composables, fetching data with useFetch or useAsyncData, managing global state with useState, integrating Pinia, debugging reactive data issues, or implementing SSR-safe state patterns.\n\n## Quick Reference\n\n### Data Fetching Methods\n\n| Method | Use Case | SSR | Caching | Reactive |\n|--------|----------|-----|---------|----------|\n| `useFetch` | Simple API calls | Yes | Yes | Yes |\n| `useAsyncData` | Custom async logic | Yes | Yes | Yes |\n| `$fetch` | Client-side only, events | No | No | No |\n\n## When to Load References\n\n**Load `references\u002Fcomposables.md` when:**\n- Writing custom composables with complex state\n- Debugging state management issues or memory leaks\n- Implementing SSR-safe patterns with browser APIs\n- Building authentication or complex state composables\n\n**Load `references\u002Fdata-fetching.md` when:**\n- Implementing API data fetching with reactive parameters\n- Troubleshooting shallow vs deep reactivity issues\n- Debugging data not refreshing when params change\n- Implementing pagination, infinite scroll, or search\n\n## Composables\n\n### useState - The Foundation\n\n`useState` creates SSR-safe, shared reactive state that persists across component instances.\n\n```typescript\n\u002F\u002F composables\u002FuseCounter.ts\nexport const useCounter = () => {\n  const count = useState('counter', () => 0)\n\n  const increment = () => count.value++\n  const decrement = () => count.value--\n  const reset = () => count.value = 0\n\n  return { count, increment, decrement, reset }\n}\n```\n\n### useState vs ref - Critical Distinction\n\n```typescript\n\u002F\u002F CORRECT: Shared state (singleton pattern)\nexport const useAuth = () => {\n  const user = useState('auth-user', () => null)\n  return { user }\n}\n\n\u002F\u002F WRONG: Creates new instance every call!\nexport const useAuth = () => {\n  const user = ref(null)\n  return { user }\n}\n```\n\n**Rule**: Use `useState` for shared\u002Fglobal state. Use `ref` for local component state only.\n\n### clearNuxtState Resets to Defaults (v5 Change)\n\n```typescript\n\u002F\u002F Nuxt 5: clearNuxtState resets state to its initial value, not undefined\nconst count = useState('counter', () => 42)\ncount.value = 100\n\nclearNuxtState('counter')\n\u002F\u002F count.value is now 42 (the initial default), not undefined\n```\n\n### Complete Authentication Composable\n\n```typescript\n\u002F\u002F composables\u002FuseAuth.ts\nexport const useAuth = () => {\n  const user = useState\u003CUser | null>('auth-user', () => null)\n  const isAuthenticated = computed(() => !!user.value)\n  const isLoading = useState('auth-loading', () => false)\n\n  const login = async (email: string, password: string) => {\n    isLoading.value = true\n    try {\n      const data = await $fetch('\u002Fapi\u002Fauth\u002Flogin', {\n        method: 'POST',\n        body: { email, password }\n      })\n      user.value = data.user\n      return { success: true }\n    } catch (error) {\n      return { success: false, error: error.message }\n    } finally {\n      isLoading.value = false\n    }\n  }\n\n  const logout = async () => {\n    await $fetch('\u002Fapi\u002Fauth\u002Flogout', { method: 'POST' })\n    user.value = null\n    navigateTo('\u002Flogin')\n  }\n\n  const checkSession = async () => {\n    if (import.meta.server) return\n    try {\n      const data = await $fetch('\u002Fapi\u002Fauth\u002Fsession')\n      user.value = data.user\n    } catch {\n      user.value = null\n    }\n  }\n\n  return { user, isAuthenticated, isLoading, login, logout, checkSession }\n}\n```\n\n### SSR-Safe Browser APIs\n\n```typescript\n\u002F\u002F composables\u002FuseLocalStorage.ts\nexport const useLocalStorage = \u003CT>(key: string, defaultValue: T) => {\n  const data = useState\u003CT>(key, () => defaultValue)\n\n  if (import.meta.client) {\n    const stored = localStorage.getItem(key)\n    if (stored) {\n      data.value = JSON.parse(stored)\n    }\n\n    watch(data, (newValue) => {\n      localStorage.setItem(key, JSON.stringify(newValue))\n    }, { deep: true })\n  }\n\n  return data\n}\n```\n\n## Data Fetching\n\n### useFetch - Basic Usage\n\n```typescript\nconst { data, error, pending, refresh } = await useFetch('\u002Fapi\u002Fusers')\n\nconst { data: users } = await useFetch('\u002Fapi\u002Fusers', {\n  method: 'GET',\n  query: { limit: 10, offset: 0 },\n  headers: { 'X-Custom-Header': 'value' }\n})\n```\n\n### Reactive Parameters\n\n```vue\n\u003Cscript setup lang=\"ts\">\nconst page = ref(1)\nconst search = ref('')\n\nconst { data: users, pending } = await useFetch('\u002Fapi\u002Fusers', {\n  query: {\n    page,\n    search,\n    limit: 10\n  }\n})\n\u003C\u002Fscript>\n```\n\n### Transform Data\n\n```typescript\nconst { data: userNames } = await useFetch('\u002Fapi\u002Fusers', {\n  transform: (users) => users.map(u => u.name)\n})\n```\n\n### useAsyncData - Custom Logic\n\n```typescript\nconst { data } = await useAsyncData('dashboard', async () => {\n  const [users, posts, stats] = await Promise.all([\n    $fetch('\u002Fapi\u002Fusers'),\n    $fetch('\u002Fapi\u002Fposts'),\n    $fetch('\u002Fapi\u002Fstats')\n  ])\n  return { users, posts, stats }\n})\n```\n\n### Error Handling\n\n```typescript\nconst { data, error, status } = await useFetch('\u002Fapi\u002Fusers')\n\nif (error.value) {\n  console.error('Error:', error.value.message)\n  console.error('Status:', error.value.statusCode)\n}\n\nif (status.value === 'error') {\n  showError(error.value)\n}\n```\n\n### Manual Refresh\n\n```typescript\nconst { data, refresh, execute } = await useFetch('\u002Fapi\u002Fusers', {\n  immediate: false\n})\n\nawait execute()\nawait refresh()\nawait refresh({ dedupe: true })\n```\n\n### Shallow vs Deep Reactivity\n\n```typescript\n\u002F\u002F Nuxt 5 default: Shallow reactivity\nconst { data } = await useFetch('\u002Fapi\u002Fuser')\ndata.value.name = 'New Name'  \u002F\u002F Won't trigger reactivity!\n\n\u002F\u002F Enable deep reactivity for mutations\nconst { data } = await useFetch('\u002Fapi\u002Fuser', {\n  deep: true\n})\ndata.value.name = 'New Name'  \u002F\u002F Now works!\n\n\u002F\u002F Or refresh instead of mutating\nconst { data, refresh } = await useFetch('\u002Fapi\u002Fuser')\nawait $fetch('\u002Fapi\u002Fuser', { method: 'PATCH', body: { name: 'New Name' } })\nawait refresh()\n```\n\n### Caching and Deduplication\n\n```typescript\nconst { data } = await useFetch('\u002Fapi\u002Fusers', {\n  key: 'users-list',\n  dedupe: 'cancel',\n  getCachedData: (key, nuxtApp) => {\n    return nuxtApp.payload.data[key]\n  }\n})\n```\n\n### Lazy Loading Data\n\n```typescript\nconst { data, pending } = useLazyFetch('\u002Fapi\u002Fusers')\nconst { data: data2, pending: pending2 } = useLazyAsyncData('users', () => $fetch('\u002Fapi\u002Fusers'))\n```\n\n### $fetch - Client-Side Only\n\n```typescript\nconst submitForm = async () => {\n  const result = await $fetch('\u002Fapi\u002Fsubmit', {\n    method: 'POST',\n    body: formData.value\n  })\n}\n```\n\n## State Management\n\n### Shared Cart Example\n\n```typescript\n\u002F\u002F composables\u002FuseCart.ts\ninterface CartItem {\n  id: string\n  name: string\n  price: number\n  quantity: number\n}\n\nexport const useCart = () => {\n  const items = useState\u003CCartItem[]>('cart-items', () => [])\n\n  const total = computed(() =>\n    items.value.reduce((sum, item) => sum + item.price * item.quantity, 0)\n  )\n\n  const addItem = (product: Omit\u003CCartItem, 'quantity'>) => {\n    const existing = items.value.find(i => i.id === product.id)\n    if (existing) {\n      existing.quantity++\n    } else {\n      items.value.push({ ...product, quantity: 1 })\n    }\n  }\n\n  const removeItem = (id: string) => {\n    items.value = items.value.filter(i => i.id !== id)\n  }\n\n  const clearCart = () => {\n    items.value = []\n  }\n\n  return { items, total, addItem, removeItem, clearCart }\n}\n```\n\n### Pinia Integration\n\n```bash\nbun add pinia @pinia\u002Fnuxt\n```\n\n```typescript\n\u002F\u002F nuxt.config.ts\nexport default defineNuxtConfig({\n  modules: ['@pinia\u002Fnuxt']\n})\n\n\u002F\u002F stores\u002Fauth.ts\nimport { defineStore } from 'pinia'\n\nexport const useAuthStore = defineStore('auth', {\n  state: () => ({\n    user: null as User | null,\n    token: null as string | null\n  }),\n\n  getters: {\n    isAuthenticated: (state) => !!state.user,\n    userName: (state) => state.user?.name ?? 'Guest'\n  },\n\n  actions: {\n    async login(email: string, password: string) {\n      const { user, token } = await $fetch('\u002Fapi\u002Fauth\u002Flogin', {\n        method: 'POST',\n        body: { email, password }\n      })\n      this.user = user\n      this.token = token\n    },\n\n    logout() {\n      this.user = null\n      this.token = null\n    }\n  }\n})\n```\n\n## Common Anti-Patterns\n\n### Using ref Instead of useState\n\n```typescript\n\u002F\u002F WRONG\nexport const useAuth = () => {\n  const user = ref(null)\n  return { user }\n}\n\n\u002F\u002F CORRECT\nexport const useAuth = () => {\n  const user = useState('auth-user', () => null)\n  return { user }\n}\n```\n\n### Non-Deterministic Transform\n\n```typescript\n\u002F\u002F WRONG - Causes hydration mismatch!\nconst { data } = await useFetch('\u002Fapi\u002Fusers', {\n  transform: (users) => users.sort(() => Math.random() - 0.5)\n})\n\n\u002F\u002F CORRECT\nconst { data } = await useFetch('\u002Fapi\u002Fusers', {\n  transform: (users) => users.sort((a, b) => a.name.localeCompare(b.name))\n})\n```\n\n### Mutating Shallow Refs\n\n```typescript\n\u002F\u002F WRONG\nconst { data } = await useFetch('\u002Fapi\u002Fuser')\ndata.value.name = 'New Name'\n\n\u002F\u002F CORRECT - Enable deep\nconst { data } = await useFetch('\u002Fapi\u002Fuser', { deep: true })\n\n\u002F\u002F CORRECT - Replace entire value\ndata.value = { ...data.value, name: 'New Name' }\n\n\u002F\u002F CORRECT - Refresh after mutation\nawait $fetch('\u002Fapi\u002Fuser', { method: 'PATCH', body: { name: 'New Name' } })\nawait refresh()\n```\n\n## Troubleshooting\n\n**Data Not Refreshing When Params Change:**\n- Ensure params are reactive: `{ query: { page } }` where `page = ref(1)`\n- Check you're using the ref itself, not `.value`\n\n**Hydration Mismatch with useState:**\n- Ensure key is unique: `useState('unique-key', () => value)`\n- Avoid `Math.random()` or `Date.now()` in initial values\n\n**State Lost on Navigation:**\n- Use `useState` instead of `ref` for persistent state\n\n**clearNuxtState not working as expected:**\n- v5 resets to initial default value, not `undefined`\n- Check that the initial factory function returns the expected default\n\n## Related Skills\n\n- **nuxt-core**: Project setup, routing, configuration\n- **nuxt-server**: Server routes, API patterns (Nitro v3)\n- **nuxt-production**: Performance, testing, deployment\n\n---\n\n**Version**: 5.0.0 | **Last Updated**: 2026-03-30 | **License**: MIT\n","# Nuxt 5 Data Management\n\nComposables, data fetching, and state management patterns for Nuxt 5 applications.\n\n**Use when**: creating custom composables, fetching data with useFetch or useAsyncData, managing global state with useState, integrating Pinia, debugging reactive data issues, or implementing SSR-safe state patterns.\n\n## Quick Reference\n\n### Data Fetching Methods\n\n| Method | Use Case | SSR | Caching | Reactive |\n|--------|----------|-----|---------|----------|\n| `useFetch` | Simple API calls | Yes | Yes | Yes |\n| `useAsyncData` | Custom async logic | Yes | Yes | Yes |\n| `$fetch` | Client-side only, events | No | No | No |\n\n## When to Load References\n\n**Load `references\u002Fcomposables.md` when:**\n- Writing custom composables with complex state\n- Debugging state management issues or memory leaks\n- Implementing SSR-safe patterns with browser APIs\n- Building authentication or complex state composables\n\n**Load `references\u002Fdata-fetching.md` when:**\n- Implementing API data fetching with reactive parameters\n- Troubleshooting shallow vs deep reactivity issues\n- Debugging data not refreshing when params change\n- Implementing pagination, infinite scroll, or search\n\n## Composables\n\n### useState - The Foundation\n\n`useState` creates SSR-safe, shared reactive state that persists across component instances.\n\n```typescript\n\u002F\u002F composables\u002FuseCounter.ts\nexport const useCounter = () => {\n  const count = useState('counter', () => 0)\n\n  const increment = () => count.value++\n  const decrement = () => count.value--\n  const reset = () => count.value = 0\n\n  return { count, increment, decrement, reset }\n}\n```\n\n### useState vs ref - Critical Distinction\n\n```typescript\n\u002F\u002F CORRECT: Shared state (singleton pattern)\nexport const useAuth = () => {\n  const user = useState('auth-user', () => null)\n  return { user }\n}\n\n\u002F\u002F WRONG: Creates new instance every call!\nexport const useAuth = () => {\n  const user = ref(null)\n  return { user }\n}\n```\n\n**Rule**: Use `useState` for shared\u002Fglobal state. Use `ref` for local component state only.\n\n### clearNuxtState Resets to Defaults (v5 Change)\n\n```typescript\n\u002F\u002F Nuxt 5: clearNuxtState resets state to its initial value, not undefined\nconst count = useState('counter', () => 42)\ncount.value = 100\n\nclearNuxtState('counter')\n\u002F\u002F count.value is now 42 (the initial default), not undefined\n```\n\n### Complete Authentication Composable\n\n```typescript\n\u002F\u002F composables\u002FuseAuth.ts\nexport const useAuth = () => {\n  const user = useState\u003CUser | null>('auth-user', () => null)\n  const isAuthenticated = computed(() => !!user.value)\n  const isLoading = useState('auth-loading', () => false)\n\n  const login = async (email: string, password: string) => {\n    isLoading.value = true\n    try {\n      const data = await $fetch('\u002Fapi\u002Fauth\u002Flogin', {\n        method: 'POST',\n        body: { email, password }\n      })\n      user.value = data.user\n      return { success: true }\n    } catch (error) {\n      return { success: false, error: error.message }\n    } finally {\n      isLoading.value = false\n    }\n  }\n\n  const logout = async () => {\n    await $fetch('\u002Fapi\u002Fauth\u002Flogout', { method: 'POST' })\n    user.value = null\n    navigateTo('\u002Flogin')\n  }\n\n  const checkSession = async () => {\n    if (import.meta.server) return\n    try {\n      const data = await $fetch('\u002Fapi\u002Fauth\u002Fsession')\n      user.value = data.user\n    } catch {\n      user.value = null\n    }\n  }\n\n  return { user, isAuthenticated, isLoading, login, logout, checkSession }\n}\n```\n\n### SSR-Safe Browser APIs\n\n```typescript\n\u002F\u002F composables\u002FuseLocalStorage.ts\nexport const useLocalStorage = \u003CT>(key: string, defaultValue: T) => {\n  const data = useState\u003CT>(key, () => defaultValue)\n\n  if (import.meta.client) {\n    const stored = localStorage.getItem(key)\n    if (stored) {\n      data.value = JSON.parse(stored)\n    }\n\n    watch(data, (newValue) => {\n      localStorage.setItem(key, JSON.stringify(newValue))\n    }, { deep: true })\n  }\n\n  return data\n}\n```\n\n## Data Fetching\n\n### useFetch - Basic Usage\n\n```typescript\nconst { data, error, pending, refresh } = await useFetch('\u002Fapi\u002Fusers')\n\nconst { data: users } = await useFetch('\u002Fapi\u002Fusers', {\n  method: 'GET',\n  query: { limit: 10, offset: 0 },\n  headers: { 'X-Custom-Header': 'value' }\n})\n```\n\n### Reactive Parameters\n\n```vue\n\u003Cscript setup lang=\"ts\">\nconst page = ref(1)\nconst search = ref('')\n\nconst { data: users, pending } = await useFetch('\u002Fapi\u002Fusers', {\n  query: {\n    page,\n    search,\n    limit: 10\n  }\n})\n\u003C\u002Fscript>\n```\n\n### Transform Data\n\n```typescript\nconst { data: userNames } = await useFetch('\u002Fapi\u002Fusers', {\n  transform: (users) => users.map(u => u.name)\n})\n```\n\n### useAsyncData - Custom Logic\n\n```typescript\nconst { data } = await useAsyncData('dashboard', async () => {\n  const [users, posts, stats] = await Promise.all([\n    $fetch('\u002Fapi\u002Fusers'),\n    $fetch('\u002Fapi\u002Fposts'),\n    $fetch('\u002Fapi\u002Fstats')\n  ])\n  return { users, posts, stats }\n})\n```\n\n### Error Handling\n\n```typescript\nconst { data, error, status } = await useFetch('\u002Fapi\u002Fusers')\n\nif (error.value) {\n  console.error('Error:', error.value.message)\n  console.error('Status:', error.value.statusCode)\n}\n\nif (status.value === 'error') {\n  showError(error.value)\n}\n```\n\n### Manual Refresh\n\n```typescript\nconst { data, refresh, execute } = await useFetch('\u002Fapi\u002Fusers', {\n  immediate: false\n})\n\nawait execute()\nawait refresh()\nawait refresh({ dedupe: true })\n```\n\n### Shallow vs Deep Reactivity\n\n```typescript\n\u002F\u002F Nuxt 5 default: Shallow reactivity\nconst { data } = await useFetch('\u002Fapi\u002Fuser')\ndata.value.name = 'New Name'  \u002F\u002F Won't trigger reactivity!\n\n\u002F\u002F Enable deep reactivity for mutations\nconst { data } = await useFetch('\u002Fapi\u002Fuser', {\n  deep: true\n})\ndata.value.name = 'New Name'  \u002F\u002F Now works!\n\n\u002F\u002F Or refresh instead of mutating\nconst { data, refresh } = await useFetch('\u002Fapi\u002Fuser')\nawait $fetch('\u002Fapi\u002Fuser', { method: 'PATCH', body: { name: 'New Name' } })\nawait refresh()\n```\n\n### Caching and Deduplication\n\n```typescript\nconst { data } = await useFetch('\u002Fapi\u002Fusers', {\n  key: 'users-list',\n  dedupe: 'cancel',\n  getCachedData: (key, nuxtApp) => {\n    return nuxtApp.payload.data[key]\n  }\n})\n```\n\n### Lazy Loading Data\n\n```typescript\nconst { data, pending } = useLazyFetch('\u002Fapi\u002Fusers')\nconst { data: data2, pending: pending2 } = useLazyAsyncData('users', () => $fetch('\u002Fapi\u002Fusers'))\n```\n\n### $fetch - Client-Side Only\n\n```typescript\nconst submitForm = async () => {\n  const result = await $fetch('\u002Fapi\u002Fsubmit', {\n    method: 'POST',\n    body: formData.value\n  })\n}\n```\n\n## State Management\n\n### Shared Cart Example\n\n```typescript\n\u002F\u002F composables\u002FuseCart.ts\ninterface CartItem {\n  id: string\n  name: string\n  price: number\n  quantity: number\n}\n\nexport const useCart = () => {\n  const items = useState\u003CCartItem[]>('cart-items', () => [])\n\n  const total = computed(() =>\n    items.value.reduce((sum, item) => sum + item.price * item.quantity, 0)\n  )\n\n  const addItem = (product: Omit\u003CCartItem, 'quantity'>) => {\n    const existing = items.value.find(i => i.id === product.id)\n    if (existing) {\n      existing.quantity++\n    } else {\n      items.value.push({ ...product, quantity: 1 })\n    }\n  }\n\n  const removeItem = (id: string) => {\n    items.value = items.value.filter(i => i.id !== id)\n  }\n\n  const clearCart = () => {\n    items.value = []\n  }\n\n  return { items, total, addItem, removeItem, clearCart }\n}\n```\n\n### Pinia Integration\n\n```bash\nbun add pinia @pinia\u002Fnuxt\n```\n\n```typescript\n\u002F\u002F nuxt.config.ts\nexport default defineNuxtConfig({\n  modules: ['@pinia\u002Fnuxt']\n})\n\n\u002F\u002F stores\u002Fauth.ts\nimport { defineStore } from 'pinia'\n\nexport const useAuthStore = defineStore('auth', {\n  state: () => ({\n    user: null as User | null,\n    token: null as string | null\n  }),\n\n  getters: {\n    isAuthenticated: (state) => !!state.user,\n    userName: (state) => state.user?.name ?? 'Guest'\n  },\n\n  actions: {\n    async login(email: string, password: string) {\n      const { user, token } = await $fetch('\u002Fapi\u002Fauth\u002Flogin', {\n        method: 'POST',\n        body: { email, password }\n      })\n      this.user = user\n      this.token = token\n    },\n\n    logout() {\n      this.user = null\n      this.token = null\n    }\n  }\n})\n```\n\n## Common Anti-Patterns\n\n### Using ref Instead of useState\n\n```typescript\n\u002F\u002F WRONG\nexport const useAuth = () => {\n  const user = ref(null)\n  return { user }\n}\n\n\u002F\u002F CORRECT\nexport const useAuth = () => {\n  const user = useState('auth-user', () => null)\n  return { user }\n}\n```\n\n### Non-Deterministic Transform\n\n```typescript\n\u002F\u002F WRONG - Causes hydration mismatch!\nconst { data } = await useFetch('\u002Fapi\u002Fusers', {\n  transform: (users) => users.sort(() => Math.random() - 0.5)\n})\n\n\u002F\u002F CORRECT\nconst { data } = await useFetch('\u002Fapi\u002Fusers', {\n  transform: (users) => users.sort((a, b) => a.name.localeCompare(b.name))\n})\n```\n\n### Mutating Shallow Refs\n\n```typescript\n\u002F\u002F WRONG\nconst { data } = await useFetch('\u002Fapi\u002Fuser')\ndata.value.name = 'New Name'\n\n\u002F\u002F CORRECT - Enable deep\nconst { data } = await useFetch('\u002Fapi\u002Fuser', { deep: true })\n\n\u002F\u002F CORRECT - Replace entire value\ndata.value = { ...data.value, name: 'New Name' }\n\n\u002F\u002F CORRECT - Refresh after mutation\nawait $fetch('\u002Fapi\u002Fuser', { method: 'PATCH', body: { name: 'New Name' } })\nawait refresh()\n```\n\n## Troubleshooting\n\n**Data Not Refreshing When Params Change:**\n- Ensure params are reactive: `{ query: { page } }` where `page = ref(1)`\n- Check you're using the ref itself, not `.value`\n\n**Hydration Mismatch with useState:**\n- Ensure key is unique: `useState('unique-key', () => value)`\n- Avoid `Math.random()` or `Date.now()` in initial values\n\n**State Lost on Navigation:**\n- Use `useState` instead of `ref` for persistent state\n\n**clearNuxtState not working as expected:**\n- v5 resets to initial default value, not `undefined`\n- Check that the initial factory function returns the expected default\n\n## Related Skills\n\n- **nuxt-core**: Project setup, routing, configuration\n- **nuxt-server**: Server routes, API patterns (Nitro v3)\n- **nuxt-production**: Performance, testing, deployment\n\n---\n\n**Version**: 5.0.0 | **Last Updated**: 2026-03-30 | **License**: MIT\n",{"name":5,"license":15,"metadata":24,"description":7},{"author":25,"version":26,"category":27,"framework":28,"last-verified":29,"framework-version":30},"Claude Skills Maintainers","5.0.0","Framework","Nuxt",1774828800000,"5.x","main","c475fc64e94e803b50d14a791dfee8853fbb2c5c","integrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fnuxt-v5\u002Fskills\u002Fnuxt-data","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory","https:\u002F\u002Fgithub.com\u002FElogic360","2026-11-08 22:21:22",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add Elogic360\u002Fsoftware-factory --skill nuxt-data",{"tool":43,"command":44},"bunx","bunx skills add Elogic360\u002Fsoftware-factory --skill nuxt-data",{"tool":46,"command":47},"pnpm","pnpm dlx skills add Elogic360\u002Fsoftware-factory --skill nuxt-data","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fnuxt-v5\u002Fskills\u002Fnuxt-data\u002FSKILL.md",true,[51,57,61],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Fcomposables.md","REFERENCE","参考文档",16360,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fnuxt-v5\u002Fskills\u002Fnuxt-data\u002Freferences\u002Fcomposables.md",{"path":58,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Fdata-fetching.md",16316,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fnuxt-v5\u002Fskills\u002Fnuxt-data\u002Freferences\u002Fdata-fetching.md",{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"templates\u002Fcomposables\u002FuseAuth.ts","SCRIPT","脚本",3038,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fnuxt-v5\u002Fskills\u002Fnuxt-data\u002Ftemplates\u002Fcomposables\u002FuseAuth.ts",[68,76,83,90,97,104],{"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":72,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M79G206MT3J6S0GY3C45P2KV","vss-summarize-video","Use to summarize a recorded video via the LVS summarization microservice (HITL-gated) with a VLM fallback. Not for report generation or live RTSP captioning.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-summarize-video\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M79G1WN63PGRE8CKD47WEBQ5","vss-setup-video-analytics-api","Use to deploy the vss-video-analytics-api REST service standalone (config-source, data-log bind, Elasticsearch, optional Kafka). Not for full warehouse deploy.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-setup-video-analytics-api\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":72,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M79G1S9F7VY3EF6H53PRP5AN","vss-setup-behavior-analytics","Use to deploy the vss-behavior-analytics service standalone (entrypoint, config-source, optional calibration). Not for the full warehouse deploy.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-setup-behavior-analytics\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":72,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M79G1N1S1Y27PFZPYMNK1MTQ","vss-search-archive","Use this skill to run top-level VSS fusion search on archived video, or to ingest video files \u002F RTSP streams for search. Do NOT use for ad-hoc visual Q&A (use vss-ask-video), live captioning (use vss-deploy-dense-captioning), or video summarization and reports (use vss-summarize-video).","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-search-archive\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M79G1H6WN0Q6C0VCAXCZX6B7","vss-query-analytics","Use this skill when reading video-analytics metrics, incidents, alerts, and sensor data via the VA-MCP server (port 9901). Not for live VLM or incident-range narrative reports.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-query-analytics\u002FSKILL.md",[],[],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":19},"01M79G1DYPNXQS7QHZ0AAF5FX5","vss-manage-video-io-storage","Use to call the VIOS REST API (sensor list, timelines, clip extraction, snapshots, add\u002Fdelete sensors and streams). Not for VLM inference or search.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-manage-video-io-storage\u002FSKILL.md",[],[]]