[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M783YVD3M934K818AY2FCRJE":3,"skill-same:01M783YVD3M934K818AY2FCRJE":62},{"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":30,"commitSha":31,"skillDirectory":32,"forksCount":13,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M783YVD3M934K818AY2FCRJE","nuxt-core",null,"Nuxt 5 core framework with project setup, routing, SEO, error handling, and Vite 8\u002FNitro v3 configuration. Use when creating Nuxt 5 apps, setting up routing, or migrating config.","aibizmod\u002Faibizmod-service-web","aibizmod","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F295315630?v=4","01M7836CB8EQY701YQ7N88M591","01M7836CBVPZGNSJ8BRP2BT398",0,"MIT","https:\u002F\u002Fgithub.com\u002Faibizmod\u002Faibizmod-service-web\u002Fblob\u002Fmain\u002F.opencode\u002Fskill\u002Fclaude-skills\u002Fplugins\u002Fnuxt-v5\u002Fskills\u002Fnuxt-core\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: nuxt-core\ndescription: Nuxt 5 core framework with project setup, routing, SEO, error handling, and Vite 8\u002FNitro v3 configuration. Use when creating Nuxt 5 apps, setting up routing, or migrating config.\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 Core Fundamentals\n\nProject setup, configuration, routing, SEO, and error handling for Nuxt 5 applications.\n\n## Quick Reference\n\n### Version Requirements\n\n| Package | Minimum | Recommended |\n|---------|---------|-------------|\n| nuxt | 5.0.0 | 5.x |\n| vue | 3.5.0 | 3.5.x |\n| nitro | 3.0.0 | 3.x |\n| vite | 8.0.0 | 8.x |\n| typescript | 5.0.0 | 5.x |\n\n### Key Commands\n\n```bash\nbunx nuxi@latest init my-app\nbun run dev\nbun run build\nbun run preview\nbun run postinstall\nbunx nuxi typecheck\nbunx nuxi add page about\nbunx nuxi add component MyButton\nbunx nuxi add composable useAuth\n```\n\n## Secure Installation\n\nScaffolding tools like `bunx nuxi init` download and execute remote code. Before running, follow supply chain security best practices:\n\n- **Block post-install scripts** — `npm config set ignore-scripts true` (or Bun: disabled by default)\n- **Cooldown period** — Wait 7 days for new package versions to be vetted by the community\n- **Audit before installing** — Run `socket package score npm \u003Cpkg>` or use `socket npm install \u003Cpkg>` to check packages\n\nLoad the `dependency-upgrade` skill for full security configuration including Socket CLI integration, cooldown setup, lockfile validation, and CI enforcement.\n\n## Directory Structure (Nuxt v5)\n\n```\nmy-nuxt-app\u002F\n├── app\u002F                    # Default srcDir\n│   ├── assets\u002F             # Build-processed assets (CSS, images)\n│   ├── components\u002F         # Auto-imported Vue components\n│   ├── composables\u002F        # Auto-imported composables\n│   ├── layouts\u002F            # Layout components\n│   ├── middleware\u002F         # Route middleware\n│   ├── pages\u002F              # File-based routing\n│   ├── plugins\u002F            # Nuxt plugins\n│   ├── utils\u002F              # Auto-imported utility functions\n│   ├── app.vue             # Main app component\n│   ├── app.config.ts       # App-level runtime config\n│   ├── error.vue           # Error page component\n│   └── router.options.ts   # Router configuration\n│\n├── server\u002F                 # Server-side code (Nitro v3)\n│   ├── api\u002F                # API endpoints\n│   ├── middleware\u002F         # Server middleware\n│   ├── plugins\u002F            # Nitro plugins\n│   ├── routes\u002F             # Server routes\n│   └── utils\u002F              # Server utilities\n│\n├── shared\u002F                 # Shared code (app + server)\n│   ├── utils\u002F              # Auto-imported shared utils\n│   └── types\u002F              # Auto-imported shared types\n│\n├── public\u002F                 # Static assets (served from root)\n├── content\u002F                # Nuxt Content files (if using)\n├── layers\u002F                 # Nuxt layers\n├── modules\u002F                # Local modules\n├── .nuxt\u002F                  # Generated files (git ignored)\n├── .output\u002F                # Build output (git ignored)\n├── nuxt.config.ts          # Nuxt configuration\n├── tsconfig.json           # TypeScript configuration\n└── package.json            # Dependencies\n```\n\n## What's New in Nuxt 5\n\n| Area | Nuxt 4 | Nuxt 5 |\n|------|--------|--------|\n| Bundler | Vite 6 (esbuild + Rollup) | Vite 8 (Rolldown) |\n| Server engine | Nitro v2 (h3 v1) | Nitro v3 (h3 v2, Web Standard APIs) |\n| Vite config | Separate client\u002Fserver configs | Vite Environment API |\n| JS runtime | JSX plugin included by default | JSX plugin optional (on-demand) |\n| Client-only placeholder | Empty `\u003Cdiv>` | HTML comment node |\n| callHook | Always returns Promise | May return void (sync when possible) |\n| clearNuxtState | Sets to `undefined` | Resets to initial default value |\n| Page component names | Auto-generated | Normalized to match route names |\n| `experimental.externalVue` | Available | Removed (always mocked) |\n\n## Configuration\n\n### Basic nuxt.config.ts\n\n```typescript\nexport default defineNuxtConfig({\n  future: {\n    compatibilityVersion: 5\n  },\n\n  devtools: { enabled: true },\n\n  modules: [\n    '@nuxt\u002Fui',\n    '@nuxt\u002Fcontent',\n    '@nuxt\u002Fimage'\n  ],\n\n  runtimeConfig: {\n    apiSecret: process.env.API_SECRET,\n    databaseUrl: process.env.DATABASE_URL,\n\n    public: {\n      apiBase: process.env.API_BASE || 'https:\u002F\u002Fapi.example.com',\n      appName: 'My App'\n    }\n  },\n\n  app: {\n    head: {\n      title: 'My Nuxt App',\n      meta: [\n        { charset: 'utf-8' },\n        { name: 'viewport', content: 'width=device-width, initial-scale=1' }\n      ]\n    }\n  },\n\n  nitro: {\n    preset: 'cloudflare_pages'\n  },\n\n  typescript: {\n    strict: true,\n    typeCheck: true\n  }\n})\n```\n\n### Vite 8 \u002F Rolldown Configuration\n\nNuxt 5 uses Vite 8 with Rolldown as the bundler. Use `rolldownOptions` instead of `rollupOptions`:\n\n```typescript\nexport default defineNuxtConfig({\n  vite: {\n    build: {\n      rolldownOptions: {\n        output: {\n          manualChunks: {\n            vendor: ['vue', 'vue-router']\n          }\n        }\n      }\n    },\n\n    optimizeDeps: {\n      include: []\n    }\n  }\n})\n```\n\n### Vite Environment API\n\nNuxt 5 uses the Vite Environment API for environment-specific config. Use `configEnvironment` and `applyToEnvironment` instead of separate client\u002Fserver configs:\n\n```typescript\n\u002F\u002F Module\u002Fplugin authors - use Vite plugins instead of extendViteConfig\naddVitePlugin(() => ({\n  name: 'my-plugin',\n  config(config) {\n    \u002F\u002F Global vite configuration\n  },\n  configEnvironment(name, config) {\n    \u002F\u002F Environment-specific config\n    if (name === 'client') {\n      config.optimizeDeps ||= {}\n      config.optimizeDeps.include ||= []\n      config.optimizeDeps.include.push('my-package')\n    }\n  },\n  applyToEnvironment(environment) {\n    return environment.name === 'client'\n  },\n}))\n```\n\n### Optional JSX Support\n\n`@vitejs\u002Fplugin-vue-jsx` is no longer installed by default. Install it only if needed:\n\n```bash\nbun add -D @vitejs\u002Fplugin-vue-jsx\n```\n\nNuxt will auto-detect `.jsx`\u002F`.tsx` files and prompt installation.\n\n### Runtime Config Usage\n\n```typescript\nconst config = useRuntimeConfig()\nconst apiBase = config.public.apiBase\nconst apiSecret = config.apiSecret\n```\n\n**In server routes (v5 change):** `useRuntimeConfig()` no longer accepts `event`:\n\n```typescript\n\u002F\u002F Nuxt 4\nexport default defineEventHandler((event) => {\n  const config = useRuntimeConfig(event)\n})\n\n\u002F\u002F Nuxt 5\nexport default defineEventHandler(() => {\n  const config = useRuntimeConfig()\n})\n```\n\n### App Config vs Runtime Config\n\n| Feature | App Config | Runtime Config |\n|---------|------------|----------------|\n| Location | `app.config.ts` | `nuxt.config.ts` |\n| Hot reload | Yes | No |\n| Secrets | No | Yes (server-only) |\n| Use case | UI settings, themes | API keys, URLs |\n\n## Routing\n\n### File-Based Routing\n\n```\napp\u002Fpages\u002F\n├── index.vue              → \u002F\n├── about.vue              → \u002Fabout\n├── users\u002F\n│   ├── index.vue          → \u002Fusers\n│   └── [id].vue           → \u002Fusers\u002F:id\n└── blog\u002F\n    ├── index.vue          → \u002Fblog\n    ├── [slug].vue         → \u002Fblog\u002F:slug\n    └── [...slug].vue      → \u002Fblog\u002F* (catch-all)\n```\n\n**v5 Change**: Page component names are now normalized to match their route names. This ensures consistent `\u003CKeepAlive>` behavior.\n\n### Dynamic Routes\n\n```vue\n\u003C!-- app\u002Fpages\u002Fusers\u002F[id].vue -->\n\u003Cscript setup lang=\"ts\">\nconst route = useRoute()\nconst userId = computed(() => route.params.id)\nconst { data: user } = await useFetch(`\u002Fapi\u002Fusers\u002F${userId.value}`)\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Cdiv>\n    \u003Ch1>{{ user?.name }}\u003C\u002Fh1>\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n```\n\n### Navigation\n\n```vue\n\u003Cscript setup>\nconst goToUser = (id: string) => {\n  navigateTo(`\u002Fusers\u002F${id}`)\n}\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003CNuxtLink to=\"\u002Fabout\">About\u003C\u002FNuxtLink>\n  \u003CNuxtLink :to=\"`\u002Fusers\u002F${user.id}`\">View User\u003C\u002FNuxtLink>\n  \u003CNuxtLink to=\"\u002Fdashboard\" prefetch>Dashboard\u003C\u002FNuxtLink>\n\u003C\u002Ftemplate>\n```\n\n### Route Middleware\n\n```typescript\n\u002F\u002F app\u002Fmiddleware\u002Fauth.ts\nexport default defineNuxtRouteMiddleware((to, from) => {\n  const { isAuthenticated } = useAuth()\n\n  if (!isAuthenticated.value) {\n    return navigateTo('\u002Flogin')\n  }\n})\n```\n\n```vue\n\u003C!-- app\u002Fpages\u002Fdashboard.vue -->\n\u003Cscript setup lang=\"ts\">\ndefinePageMeta({\n  middleware: 'auth'\n})\n\u003C\u002Fscript>\n```\n\n### Global Middleware\n\n```typescript\n\u002F\u002F app\u002Fmiddleware\u002Fanalytics.global.ts\nexport default defineNuxtRouteMiddleware((to, from) => {\n  if (import.meta.client) {\n    window.gtag?.('event', 'page_view', {\n      page_path: to.path\n    })\n  }\n})\n```\n\n## SEO & Meta Tags\n\n### useSeoMeta (Recommended)\n\n```vue\n\u003Cscript setup lang=\"ts\">\nuseSeoMeta({\n  title: 'My Page Title',\n  description: 'Page description for search engines',\n  ogTitle: 'My Page Title',\n  ogDescription: 'Page description',\n  ogImage: 'https:\u002F\u002Fexample.com\u002Fog-image.jpg',\n  ogUrl: 'https:\u002F\u002Fexample.com\u002Fmy-page',\n  twitterCard: 'summary_large_image'\n})\n\u003C\u002Fscript>\n```\n\n### Dynamic Meta Tags\n\n```vue\n\u003Cscript setup lang=\"ts\">\nconst { data: post } = await useFetch(`\u002Fapi\u002Fposts\u002F${route.params.slug}`)\n\nuseSeoMeta({\n  title: () => post.value?.title,\n  description: () => post.value?.excerpt,\n  ogImage: () => post.value?.image\n})\n\u003C\u002Fscript>\n```\n\n## Error Handling\n\n### Error Page\n\n```vue\n\u003C!-- app\u002Ferror.vue -->\n\u003Cscript setup lang=\"ts\">\nimport type { NuxtError } from '#app'\n\nconst props = defineProps\u003C{\n  error: NuxtError\n}>()\n\nconst handleError = () => {\n  clearError({ redirect: '\u002F' })\n}\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Cdiv class=\"error-page\">\n    \u003Ch1>{{ error.statusCode }}\u003C\u002Fh1>\n    \u003Cp>{{ error.message }}\u003C\u002Fp>\n    \u003Cbutton @click=\"handleError\">Go Home\u003C\u002Fbutton>\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n```\n\n### Throwing Errors (App-side)\n\nIn the Vue part of your app (the `app\u002F` directory), `createError` continues to work:\n\n```typescript\nthrow createError({\n  statusCode: 404,\n  statusMessage: 'Page Not Found',\n  fatal: true\n})\n```\n\n### Error Boundaries (Component-Level)\n\n```vue\n\u003Ctemplate>\n  \u003CNuxtErrorBoundary @error=\"handleError\">\n    \u003Ctemplate #error=\"{ error, clearError }\">\n      \u003Cdiv>\n        \u003Ch2>Something went wrong\u003C\u002Fh2>\n        \u003Cp>{{ error.message }}\u003C\u002Fp>\n        \u003Cbutton @click=\"clearError\">Try again\u003C\u002Fbutton>\n      \u003C\u002Fdiv>\n    \u003C\u002Ftemplate>\n    \u003CMyComponent \u002F>\n  \u003C\u002FNuxtErrorBoundary>\n\u003C\u002Ftemplate>\n```\n\n### clearNuxtState Resets to Defaults (v5 Change)\n\n```typescript\n\u002F\u002F Nuxt 4: clearNuxtState sets state to undefined\n\u002F\u002F Nuxt 5: clearNuxtState resets state to its initial value\n\nconst count = useState('counter', () => 42)\ncount.value = 100\n\nclearNuxtState('counter')\n\u002F\u002F Nuxt 5: count.value is now 42 (the default), not undefined\n```\n\n## Common Anti-Patterns\n\n### Using process.env Instead of Runtime Config\n\n```typescript\n\u002F\u002F WRONG\nconst apiUrl = process.env.API_URL\n\n\u002F\u002F CORRECT\nconst config = useRuntimeConfig()\nconst apiUrl = config.public.apiBase\n```\n\n### Missing Middleware Return\n\n```typescript\n\u002F\u002F WRONG\nexport default defineNuxtRouteMiddleware((to) => {\n  if (!isAuthenticated.value) {\n    navigateTo('\u002Flogin')  \u002F\u002F Missing return!\n  }\n})\n\n\u002F\u002F CORRECT\nexport default defineNuxtRouteMiddleware((to) => {\n  if (!isAuthenticated.value) {\n    return navigateTo('\u002Flogin')\n  }\n})\n```\n\n### Non-Reactive Route Params\n\n```typescript\n\u002F\u002F WRONG\nconst userId = route.params.id\n\n\u002F\u002F CORRECT\nconst userId = computed(() => route.params.id)\n```\n\n## Troubleshooting\n\n**Build Errors \u002F Type Errors:**\n```bash\nrm -rf .nuxt .output node_modules\u002F.vite && bun install && bun run dev\n```\n\n**Route Not Found:**\n- Check file is in `app\u002Fpages\u002F`\n- Verify file extension is `.vue`\n- Check for typos in dynamic params `[id].vue`\n\n**Vite Plugin Warnings:**\n- Use `configEnvironment` + `applyToEnvironment` instead of `server`\u002F`client` options\n- Deprecated `extendViteConfig({ server })` will show warnings\n\n**JSX Not Working:**\n- Install `@vitejs\u002Fplugin-vue-jsx` if using `.jsx`\u002F`.tsx` files\n\n## Related Skills\n\n- **nuxt-data**: Composables, data fetching, state management\n- **nuxt-server**: Server routes, API patterns (Nitro v3)\n- **nuxt-production**: Performance, testing, deployment, migration\n\n## Templates Available\n\nSee `templates\u002F` directory for:\n- Production-ready `nuxt.config.ts`\n- `app.vue` with proper structure\n\n---\n\n**Version**: 5.0.0 | **Last Updated**: 2026-03-30 | **License**: MIT\n","# Nuxt 5 Core Fundamentals\n\nProject setup, configuration, routing, SEO, and error handling for Nuxt 5 applications.\n\n## Quick Reference\n\n### Version Requirements\n\n| Package | Minimum | Recommended |\n|---------|---------|-------------|\n| nuxt | 5.0.0 | 5.x |\n| vue | 3.5.0 | 3.5.x |\n| nitro | 3.0.0 | 3.x |\n| vite | 8.0.0 | 8.x |\n| typescript | 5.0.0 | 5.x |\n\n### Key Commands\n\n```bash\nbunx nuxi@latest init my-app\nbun run dev\nbun run build\nbun run preview\nbun run postinstall\nbunx nuxi typecheck\nbunx nuxi add page about\nbunx nuxi add component MyButton\nbunx nuxi add composable useAuth\n```\n\n## Secure Installation\n\nScaffolding tools like `bunx nuxi init` download and execute remote code. Before running, follow supply chain security best practices:\n\n- **Block post-install scripts** — `npm config set ignore-scripts true` (or Bun: disabled by default)\n- **Cooldown period** — Wait 7 days for new package versions to be vetted by the community\n- **Audit before installing** — Run `socket package score npm \u003Cpkg>` or use `socket npm install \u003Cpkg>` to check packages\n\nLoad the `dependency-upgrade` skill for full security configuration including Socket CLI integration, cooldown setup, lockfile validation, and CI enforcement.\n\n## Directory Structure (Nuxt v5)\n\n```\nmy-nuxt-app\u002F\n├── app\u002F                    # Default srcDir\n│   ├── assets\u002F             # Build-processed assets (CSS, images)\n│   ├── components\u002F         # Auto-imported Vue components\n│   ├── composables\u002F        # Auto-imported composables\n│   ├── layouts\u002F            # Layout components\n│   ├── middleware\u002F         # Route middleware\n│   ├── pages\u002F              # File-based routing\n│   ├── plugins\u002F            # Nuxt plugins\n│   ├── utils\u002F              # Auto-imported utility functions\n│   ├── app.vue             # Main app component\n│   ├── app.config.ts       # App-level runtime config\n│   ├── error.vue           # Error page component\n│   └── router.options.ts   # Router configuration\n│\n├── server\u002F                 # Server-side code (Nitro v3)\n│   ├── api\u002F                # API endpoints\n│   ├── middleware\u002F         # Server middleware\n│   ├── plugins\u002F            # Nitro plugins\n│   ├── routes\u002F             # Server routes\n│   └── utils\u002F              # Server utilities\n│\n├── shared\u002F                 # Shared code (app + server)\n│   ├── utils\u002F              # Auto-imported shared utils\n│   └── types\u002F              # Auto-imported shared types\n│\n├── public\u002F                 # Static assets (served from root)\n├── content\u002F                # Nuxt Content files (if using)\n├── layers\u002F                 # Nuxt layers\n├── modules\u002F                # Local modules\n├── .nuxt\u002F                  # Generated files (git ignored)\n├── .output\u002F                # Build output (git ignored)\n├── nuxt.config.ts          # Nuxt configuration\n├── tsconfig.json           # TypeScript configuration\n└── package.json            # Dependencies\n```\n\n## What's New in Nuxt 5\n\n| Area | Nuxt 4 | Nuxt 5 |\n|------|--------|--------|\n| Bundler | Vite 6 (esbuild + Rollup) | Vite 8 (Rolldown) |\n| Server engine | Nitro v2 (h3 v1) | Nitro v3 (h3 v2, Web Standard APIs) |\n| Vite config | Separate client\u002Fserver configs | Vite Environment API |\n| JS runtime | JSX plugin included by default | JSX plugin optional (on-demand) |\n| Client-only placeholder | Empty `\u003Cdiv>` | HTML comment node |\n| callHook | Always returns Promise | May return void (sync when possible) |\n| clearNuxtState | Sets to `undefined` | Resets to initial default value |\n| Page component names | Auto-generated | Normalized to match route names |\n| `experimental.externalVue` | Available | Removed (always mocked) |\n\n## Configuration\n\n### Basic nuxt.config.ts\n\n```typescript\nexport default defineNuxtConfig({\n  future: {\n    compatibilityVersion: 5\n  },\n\n  devtools: { enabled: true },\n\n  modules: [\n    '@nuxt\u002Fui',\n    '@nuxt\u002Fcontent',\n    '@nuxt\u002Fimage'\n  ],\n\n  runtimeConfig: {\n    apiSecret: process.env.API_SECRET,\n    databaseUrl: process.env.DATABASE_URL,\n\n    public: {\n      apiBase: process.env.API_BASE || 'https:\u002F\u002Fapi.example.com',\n      appName: 'My App'\n    }\n  },\n\n  app: {\n    head: {\n      title: 'My Nuxt App',\n      meta: [\n        { charset: 'utf-8' },\n        { name: 'viewport', content: 'width=device-width, initial-scale=1' }\n      ]\n    }\n  },\n\n  nitro: {\n    preset: 'cloudflare_pages'\n  },\n\n  typescript: {\n    strict: true,\n    typeCheck: true\n  }\n})\n```\n\n### Vite 8 \u002F Rolldown Configuration\n\nNuxt 5 uses Vite 8 with Rolldown as the bundler. Use `rolldownOptions` instead of `rollupOptions`:\n\n```typescript\nexport default defineNuxtConfig({\n  vite: {\n    build: {\n      rolldownOptions: {\n        output: {\n          manualChunks: {\n            vendor: ['vue', 'vue-router']\n          }\n        }\n      }\n    },\n\n    optimizeDeps: {\n      include: []\n    }\n  }\n})\n```\n\n### Vite Environment API\n\nNuxt 5 uses the Vite Environment API for environment-specific config. Use `configEnvironment` and `applyToEnvironment` instead of separate client\u002Fserver configs:\n\n```typescript\n\u002F\u002F Module\u002Fplugin authors - use Vite plugins instead of extendViteConfig\naddVitePlugin(() => ({\n  name: 'my-plugin',\n  config(config) {\n    \u002F\u002F Global vite configuration\n  },\n  configEnvironment(name, config) {\n    \u002F\u002F Environment-specific config\n    if (name === 'client') {\n      config.optimizeDeps ||= {}\n      config.optimizeDeps.include ||= []\n      config.optimizeDeps.include.push('my-package')\n    }\n  },\n  applyToEnvironment(environment) {\n    return environment.name === 'client'\n  },\n}))\n```\n\n### Optional JSX Support\n\n`@vitejs\u002Fplugin-vue-jsx` is no longer installed by default. Install it only if needed:\n\n```bash\nbun add -D @vitejs\u002Fplugin-vue-jsx\n```\n\nNuxt will auto-detect `.jsx`\u002F`.tsx` files and prompt installation.\n\n### Runtime Config Usage\n\n```typescript\nconst config = useRuntimeConfig()\nconst apiBase = config.public.apiBase\nconst apiSecret = config.apiSecret\n```\n\n**In server routes (v5 change):** `useRuntimeConfig()` no longer accepts `event`:\n\n```typescript\n\u002F\u002F Nuxt 4\nexport default defineEventHandler((event) => {\n  const config = useRuntimeConfig(event)\n})\n\n\u002F\u002F Nuxt 5\nexport default defineEventHandler(() => {\n  const config = useRuntimeConfig()\n})\n```\n\n### App Config vs Runtime Config\n\n| Feature | App Config | Runtime Config |\n|---------|------------|----------------|\n| Location | `app.config.ts` | `nuxt.config.ts` |\n| Hot reload | Yes | No |\n| Secrets | No | Yes (server-only) |\n| Use case | UI settings, themes | API keys, URLs |\n\n## Routing\n\n### File-Based Routing\n\n```\napp\u002Fpages\u002F\n├── index.vue              → \u002F\n├── about.vue              → \u002Fabout\n├── users\u002F\n│   ├── index.vue          → \u002Fusers\n│   └── [id].vue           → \u002Fusers\u002F:id\n└── blog\u002F\n    ├── index.vue          → \u002Fblog\n    ├── [slug].vue         → \u002Fblog\u002F:slug\n    └── [...slug].vue      → \u002Fblog\u002F* (catch-all)\n```\n\n**v5 Change**: Page component names are now normalized to match their route names. This ensures consistent `\u003CKeepAlive>` behavior.\n\n### Dynamic Routes\n\n```vue\n\u003C!-- app\u002Fpages\u002Fusers\u002F[id].vue -->\n\u003Cscript setup lang=\"ts\">\nconst route = useRoute()\nconst userId = computed(() => route.params.id)\nconst { data: user } = await useFetch(`\u002Fapi\u002Fusers\u002F${userId.value}`)\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Cdiv>\n    \u003Ch1>{{ user?.name }}\u003C\u002Fh1>\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n```\n\n### Navigation\n\n```vue\n\u003Cscript setup>\nconst goToUser = (id: string) => {\n  navigateTo(`\u002Fusers\u002F${id}`)\n}\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003CNuxtLink to=\"\u002Fabout\">About\u003C\u002FNuxtLink>\n  \u003CNuxtLink :to=\"`\u002Fusers\u002F${user.id}`\">View User\u003C\u002FNuxtLink>\n  \u003CNuxtLink to=\"\u002Fdashboard\" prefetch>Dashboard\u003C\u002FNuxtLink>\n\u003C\u002Ftemplate>\n```\n\n### Route Middleware\n\n```typescript\n\u002F\u002F app\u002Fmiddleware\u002Fauth.ts\nexport default defineNuxtRouteMiddleware((to, from) => {\n  const { isAuthenticated } = useAuth()\n\n  if (!isAuthenticated.value) {\n    return navigateTo('\u002Flogin')\n  }\n})\n```\n\n```vue\n\u003C!-- app\u002Fpages\u002Fdashboard.vue -->\n\u003Cscript setup lang=\"ts\">\ndefinePageMeta({\n  middleware: 'auth'\n})\n\u003C\u002Fscript>\n```\n\n### Global Middleware\n\n```typescript\n\u002F\u002F app\u002Fmiddleware\u002Fanalytics.global.ts\nexport default defineNuxtRouteMiddleware((to, from) => {\n  if (import.meta.client) {\n    window.gtag?.('event', 'page_view', {\n      page_path: to.path\n    })\n  }\n})\n```\n\n## SEO & Meta Tags\n\n### useSeoMeta (Recommended)\n\n```vue\n\u003Cscript setup lang=\"ts\">\nuseSeoMeta({\n  title: 'My Page Title',\n  description: 'Page description for search engines',\n  ogTitle: 'My Page Title',\n  ogDescription: 'Page description',\n  ogImage: 'https:\u002F\u002Fexample.com\u002Fog-image.jpg',\n  ogUrl: 'https:\u002F\u002Fexample.com\u002Fmy-page',\n  twitterCard: 'summary_large_image'\n})\n\u003C\u002Fscript>\n```\n\n### Dynamic Meta Tags\n\n```vue\n\u003Cscript setup lang=\"ts\">\nconst { data: post } = await useFetch(`\u002Fapi\u002Fposts\u002F${route.params.slug}`)\n\nuseSeoMeta({\n  title: () => post.value?.title,\n  description: () => post.value?.excerpt,\n  ogImage: () => post.value?.image\n})\n\u003C\u002Fscript>\n```\n\n## Error Handling\n\n### Error Page\n\n```vue\n\u003C!-- app\u002Ferror.vue -->\n\u003Cscript setup lang=\"ts\">\nimport type { NuxtError } from '#app'\n\nconst props = defineProps\u003C{\n  error: NuxtError\n}>()\n\nconst handleError = () => {\n  clearError({ redirect: '\u002F' })\n}\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Cdiv class=\"error-page\">\n    \u003Ch1>{{ error.statusCode }}\u003C\u002Fh1>\n    \u003Cp>{{ error.message }}\u003C\u002Fp>\n    \u003Cbutton @click=\"handleError\">Go Home\u003C\u002Fbutton>\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n```\n\n### Throwing Errors (App-side)\n\nIn the Vue part of your app (the `app\u002F` directory), `createError` continues to work:\n\n```typescript\nthrow createError({\n  statusCode: 404,\n  statusMessage: 'Page Not Found',\n  fatal: true\n})\n```\n\n### Error Boundaries (Component-Level)\n\n```vue\n\u003Ctemplate>\n  \u003CNuxtErrorBoundary @error=\"handleError\">\n    \u003Ctemplate #error=\"{ error, clearError }\">\n      \u003Cdiv>\n        \u003Ch2>Something went wrong\u003C\u002Fh2>\n        \u003Cp>{{ error.message }}\u003C\u002Fp>\n        \u003Cbutton @click=\"clearError\">Try again\u003C\u002Fbutton>\n      \u003C\u002Fdiv>\n    \u003C\u002Ftemplate>\n    \u003CMyComponent \u002F>\n  \u003C\u002FNuxtErrorBoundary>\n\u003C\u002Ftemplate>\n```\n\n### clearNuxtState Resets to Defaults (v5 Change)\n\n```typescript\n\u002F\u002F Nuxt 4: clearNuxtState sets state to undefined\n\u002F\u002F Nuxt 5: clearNuxtState resets state to its initial value\n\nconst count = useState('counter', () => 42)\ncount.value = 100\n\nclearNuxtState('counter')\n\u002F\u002F Nuxt 5: count.value is now 42 (the default), not undefined\n```\n\n## Common Anti-Patterns\n\n### Using process.env Instead of Runtime Config\n\n```typescript\n\u002F\u002F WRONG\nconst apiUrl = process.env.API_URL\n\n\u002F\u002F CORRECT\nconst config = useRuntimeConfig()\nconst apiUrl = config.public.apiBase\n```\n\n### Missing Middleware Return\n\n```typescript\n\u002F\u002F WRONG\nexport default defineNuxtRouteMiddleware((to) => {\n  if (!isAuthenticated.value) {\n    navigateTo('\u002Flogin')  \u002F\u002F Missing return!\n  }\n})\n\n\u002F\u002F CORRECT\nexport default defineNuxtRouteMiddleware((to) => {\n  if (!isAuthenticated.value) {\n    return navigateTo('\u002Flogin')\n  }\n})\n```\n\n### Non-Reactive Route Params\n\n```typescript\n\u002F\u002F WRONG\nconst userId = route.params.id\n\n\u002F\u002F CORRECT\nconst userId = computed(() => route.params.id)\n```\n\n## Troubleshooting\n\n**Build Errors \u002F Type Errors:**\n```bash\nrm -rf .nuxt .output node_modules\u002F.vite && bun install && bun run dev\n```\n\n**Route Not Found:**\n- Check file is in `app\u002Fpages\u002F`\n- Verify file extension is `.vue`\n- Check for typos in dynamic params `[id].vue`\n\n**Vite Plugin Warnings:**\n- Use `configEnvironment` + `applyToEnvironment` instead of `server`\u002F`client` options\n- Deprecated `extendViteConfig({ server })` will show warnings\n\n**JSX Not Working:**\n- Install `@vitejs\u002Fplugin-vue-jsx` if using `.jsx`\u002F`.tsx` files\n\n## Related Skills\n\n- **nuxt-data**: Composables, data fetching, state management\n- **nuxt-server**: Server routes, API patterns (Nitro v3)\n- **nuxt-production**: Performance, testing, deployment, migration\n\n## Templates Available\n\nSee `templates\u002F` directory for:\n- Production-ready `nuxt.config.ts`\n- `app.vue` with proper structure\n\n---\n\n**Version**: 5.0.0 | **Last Updated**: 2026-03-30 | **License**: MIT\n",{"name":5,"license":14,"metadata":23,"description":7},{"author":24,"version":25,"category":26,"framework":27,"last-verified":28,"framework-version":29},"Claude Skills Maintainers","5.0.0","Framework","Nuxt",1774828800000,"5.x","main","9f54582c8b485462d402d7e70feaef34801746b9",".opencode\u002Fskill\u002Fclaude-skills\u002Fplugins\u002Fnuxt-v5\u002Fskills\u002Fnuxt-core","https:\u002F\u002Fgithub.com\u002Faibizmod\u002Faibizmod-service-web","https:\u002F\u002Fgithub.com\u002Faibizmod","2026-09-24 00:48:11",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add aibizmod\u002Faibizmod-service-web --skill nuxt-core",{"tool":42,"command":43},"bunx","bunx skills add aibizmod\u002Faibizmod-service-web --skill nuxt-core",{"tool":45,"command":46},"pnpm","pnpm dlx skills add aibizmod\u002Faibizmod-service-web --skill nuxt-core","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Faibizmod\u002Faibizmod-service-web\u002Fblob\u002Fmain\u002F.opencode\u002Fskill\u002Fclaude-skills\u002Fplugins\u002Fnuxt-v5\u002Fskills\u002Fnuxt-core\u002FSKILL.md",true,[50,56],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"templates\u002Fapp.vue","OTHER","其他",309,"https:\u002F\u002Fgithub.com\u002Faibizmod\u002Faibizmod-service-web\u002Fblob\u002Fmain\u002F.opencode\u002Fskill\u002Fclaude-skills\u002Fplugins\u002Fnuxt-v5\u002Fskills\u002Fnuxt-core\u002Ftemplates\u002Fapp.vue",{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"templates\u002Fnuxt.config.ts","SCRIPT","脚本",1754,"https:\u002F\u002Fgithub.com\u002Faibizmod\u002Faibizmod-service-web\u002Fblob\u002Fmain\u002F.opencode\u002Fskill\u002Fclaude-skills\u002Fplugins\u002Fnuxt-v5\u002Fskills\u002Fnuxt-core\u002Ftemplates\u002Fnuxt.config.ts",[63,70,77,84,91,98],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":18},"01M7846EAPZWCQ8C6G3AAMMR57","{TODO=lowercase-hyphen-case-name}","[TODO: Write comprehensive description in third-person. Start with \"This skill provides...\" or \"This skill should be used when...\"]\n\n[TODO: Add \"Use when\" scenarios - specific situations where Claude should use this skill]\n\n[TODO: Add keywords - technologies, use cases, error messages that should trigger this skill]","https:\u002F\u002Fgithub.com\u002Faibizmod\u002Faibizmod-service-web\u002Fblob\u002Fmain\u002F.opencode\u002Fskill\u002Fclaude-skills\u002Ftemplates\u002Fskill-skeleton\u002Fskills\u002Fskill-name\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":18},"01M7846A0WGDKJTDPD5QMHQVFV","zustand-state-management","Zustand state management for React with TypeScript. Use for global state, Redux\u002FContext API migration, localStorage persistence, slices pattern, devtools, Next.js SSR, or encountering hydration errors, TypeScript inference issues, persist middleware problems, infinite render loops.","https:\u002F\u002Fgithub.com\u002Faibizmod\u002Faibizmod-service-web\u002Fblob\u002Fmain\u002F.opencode\u002Fskill\u002Fclaude-skills\u002Fplugins\u002Fzustand-state-management\u002Fskills\u002Fzustand-state-management\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":18},"01M78463GGSP9B3JSF146B2MG0","zod","TypeScript-first schema validation and type inference. Use for validating API requests\u002Fresponses, form data, env vars, configs, defining type-safe schemas with runtime validation, transforming data, generating JSON Schema for OpenAPI\u002FAI, or encountering missing validation errors, type inference issues, validation error handling problems. Zero dependencies (2kb gzipped).","https:\u002F\u002Fgithub.com\u002Faibizmod\u002Faibizmod-service-web\u002Fblob\u002Fmain\u002F.opencode\u002Fskill\u002Fclaude-skills\u002Fplugins\u002Fzod\u002Fskills\u002Fzod\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":18},"01M7845ZX17SVNNY7EDGPJHSBT","xss-prevention","XSS attack prevention with input sanitization, output encoding, Content Security Policy. Use for user-generated content, rich text editors, web application security, or encountering stored XSS, reflected XSS, DOM manipulation, script injection errors.","https:\u002F\u002Fgithub.com\u002Faibizmod\u002Faibizmod-service-web\u002Fblob\u002Fmain\u002F.opencode\u002Fskill\u002Fclaude-skills\u002Fplugins\u002Fxss-prevention\u002Fskills\u002Fxss-prevention\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":18},"01M7845ST1H37YHSXWWQ9N0V0S","wordpress-plugin-core","WordPress plugin development with hooks, security, REST API, custom post types. Use for plugin creation, $wpdb queries, Settings API, or encountering SQL injection, XSS, CSRF, nonce errors.","https:\u002F\u002Fgithub.com\u002Faibizmod\u002Faibizmod-service-web\u002Fblob\u002Fmain\u002F.opencode\u002Fskill\u002Fclaude-skills\u002Fplugins\u002Fwordpress-plugin-core\u002Fskills\u002Fwordpress-plugin-core\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":18},"01M7845PTWD5HWSTGP35Q8TFNY","woocommerce-dev-cycle","Run tests, linting, and quality checks for WooCommerce development. Use when running tests, fixing code style, or following the development workflow in WooCommerce projects.","https:\u002F\u002Fgithub.com\u002Faibizmod\u002Faibizmod-service-web\u002Fblob\u002Fmain\u002F.opencode\u002Fskill\u002Fclaude-skills\u002Fplugins\u002Fwoocommerce-dev-cycle\u002Fskills\u002Fwoocommerce-dev-cycle\u002FSKILL.md",[],[]]