
nuxt-v5
Nuxt 5 plugin with four skills, three diagnostic agents, and a setup wizard for full-stack development.
- version
- 3.12.0
- GitHub stars
- 250
What it does
- Adds
/nuxt-setup, an interactive wizard for project type, UI, database, deployment, and package manager, plusnuxt-debugger,nuxt-migration-assistant, andnuxt-performance-analyzeragents - Covers core, data, server, and production skills for routing, composables, Nitro v3 routes, hydration, Vitest, and deployment
- Guides migration from Nuxt 4 with Nitro v3 changes, including
HTTPErrorreplacingcreateErrorand Web Standard event APIs - Designed for teams building Nuxt 5 apps that deploy to Cloudflare, Vercel, or Netlify and want the official Nuxt MCP server
Comprehensive Nuxt 5 development with 4 focused skills (core, data, server, production), 3 diagnostic agents (debugger, migration, performance), and interactive setup wizard. Use when: building Nuxt 5 applications, implementing SSR patterns, creating composables, server routes, data fetching, state management, debugging hydration issues, migrating from Nuxt 4, optimizing performance, deploying to Cloudflare/Vercel/Netlify, or setting up testing with Vitest.
Add marketplace
/plugin marketplace add secondsky/claude-skillsRun it inside Claude Code once, then install the plugin below.
Install
/plugin install nuxt-v5@claude-skillsRun it inside Claude Code after adding the marketplace.
Files
Discovered from sourceNuxt 5 Core Fundamentals
Project setup, configuration, routing, SEO, and error handling for Nuxt 5 applications.
Note: As of 2026-08-03, Nuxt 5 is not yet stable (current stable line is Nuxt 4.x; see the
nuxt-v4plugin). This skill documents the upcoming Nuxt 5 APIs (Nitro v3, h3 v2, Vite 8/Rolldown). Treat version numbers below as targets, not pinned production releases.
Quick Reference
Version Requirements
| Package | Minimum | Recommended |
|---|---|---|
| nuxt | 5.0.0 | 5.x |
| vue | 3.5.0 | 3.5.x |
| nitro | 3.0.0 | 3.x |
| vite | 8.0.0 | 8.x |
| typescript | 5.0.0 | 5.x |
Key Commands
bunx nuxi@latest init my-app
bun run dev
bun run build
bun run preview
bun run postinstall
bunx nuxi typecheck
bunx nuxi add page about
bunx nuxi add component MyButton
bunx nuxi add composable useAuth
Secure Installation
Scaffolding tools like bunx nuxi init download and execute remote code. Before running, follow supply chain security best practices:
- Block post-install scripts —
npm config set ignore-scripts true(or Bun: disabled by default) - Cooldown period — Wait 7 days for new package versions to be vetted by the community
- Audit before installing — Run
socket package score npm <pkg>or usesocket npm install <pkg>to check packages
Load the dependency-upgrade skill for full security configuration including Socket CLI integration, cooldown setup, lockfile validation, and CI enforcement.
Directory Structure (Nuxt v5)
my-nuxt-app/
├── app/ # Default srcDir
│ ├── assets/ # Build-processed assets (CSS, images)
│ ├── components/ # Auto-imported Vue components
│ ├── composables/ # Auto-imported composables
│ ├── layouts/ # Layout components
│ ├── middleware/ # Route middleware
│ ├── pages/ # File-based routing
│ ├── plugins/ # Nuxt plugins
│ ├── utils/ # Auto-imported utility functions
│ ├── app.vue # Main app component
│ ├── app.config.ts # App-level runtime config
│ ├── error.vue # Error page component
│ └── router.options.ts # Router configuration
│
├── server/ # Server-side code (Nitro v3)
│ ├── api/ # API endpoints
│ ├── middleware/ # Server middleware
│ ├── plugins/ # Nitro plugins
│ ├── routes/ # Server routes
│ └── utils/ # Server utilities
│
├── shared/ # Shared code (app + server)
│ ├── utils/ # Auto-imported shared utils
│ └── types/ # Auto-imported shared types
│
├── public/ # Static assets (served from root)
├── content/ # Nuxt Content files (if using)
├── layers/ # Nuxt layers
├── modules/ # Local modules
├── .nuxt/ # Generated files (git ignored)
├── .output/ # Build output (git ignored)
├── nuxt.config.ts # Nuxt configuration
├── tsconfig.json # TypeScript configuration
└── package.json # Dependencies
What's New in Nuxt 5
| Area | Nuxt 4 | Nuxt 5 |
|---|---|---|
| Bundler | Vite 6 (esbuild + Rollup) | Vite 8 (Rolldown) |
| Server engine | Nitro v2 (h3 v1) | Nitro v3 (h3 v2, Web Standard APIs) |
| Vite config | Separate client/server configs | Vite Environment API |
| JS runtime | JSX plugin included by default | JSX plugin optional (on-demand) |
| Client-only placeholder | Empty <div> | HTML comment node |
| callHook | Always returns Promise | May return void (sync when possible) |
| clearNuxtState | Sets to undefined | Resets to initial default value |
| Page component names | Auto-generated | Normalized to match route names |
experimental.externalVue | Available | Removed (always mocked) |
Configuration
Basic nuxt.config.ts
export default defineNuxtConfig({
future: {
compatibilityVersion: 5
},
devtools: { enabled: true },
modules: [
'@nuxt/ui',
'@nuxt/content',
'@nuxt/image'
],
runtimeConfig: {
apiSecret: process.env.API_SECRET,
databaseUrl: process.env.DATABASE_URL,
public: {
apiBase: process.env.API_BASE || 'https://api.example.com',
appName: 'My App'
}
},
app: {
head: {
title: 'My Nuxt App',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' }
]
}
},
nitro: {
preset: 'cloudflare_pages'
},
typescript: {
strict: true,
typeCheck: true
}
})
Vite 8 / Rolldown Configuration
Nuxt 5 uses Vite 8 with Rolldown as the bundler. Use rolldownOptions instead of rollupOptions:
export default defineNuxtConfig({
vite: {
build: {
rolldownOptions: {
output: {
manualChunks: {
vendor: ['vue', 'vue-router']
}
}
}
},
optimizeDeps: {
include: []
}
}
})
Vite Environment API
Nuxt 5 uses the Vite Environment API for environment-specific config. Use configEnvironment and applyToEnvironment instead of separate client/server configs:
// Module/plugin authors - use Vite plugins instead of extendViteConfig
addVitePlugin(() => ({
name: 'my-plugin',
config(config) {
// Global vite configuration
},
configEnvironment(name, config) {
// Environment-specific config
if (name === 'client') {
config.optimizeDeps ||= {}
config.optimizeDeps.include ||= []
config.optimizeDeps.include.push('my-package')
}
},
applyToEnvironment(environment) {
return environment.name === 'client'
},
}))
Optional JSX Support
@vitejs/plugin-vue-jsx is no longer installed by default. Install it only if needed:
bun add -D @vitejs/plugin-vue-jsx
Nuxt will auto-detect .jsx/.tsx files and prompt installation.
Runtime Config Usage
const config = useRuntimeConfig()
const apiBase = config.public.apiBase
const apiSecret = config.apiSecret
In server routes (v5 change): useRuntimeConfig() no longer accepts event:
// Nuxt 4
export default defineEventHandler((event) => {
const config = useRuntimeConfig(event)
})
// Nuxt 5
export default defineEventHandler(() => {
const config = useRuntimeConfig()
})
App Config vs Runtime Config
| Feature | App Config | Runtime Config |
|---|---|---|
| Location | app.config.ts | nuxt.config.ts |
| Hot reload | Yes | No |
| Secrets | No | Yes (server-only) |
| Use case | UI settings, themes | API keys, URLs |
Routing
File-Based Routing
app/pages/
├── index.vue → /
├── about.vue → /about
├── users/
│ ├── index.vue → /users
│ └── [id].vue → /users/:id
└── blog/
├── index.vue → /blog
├── [slug].vue → /blog/:slug
└── [...slug].vue → /blog/* (catch-all)
v5 Change: Page component names are now normalized to match their route names. This ensures consistent <KeepAlive> behavior.
Dynamic Routes
<!-- app/pages/users/[id].vue -->
<script setup lang="ts">
const route = useRoute()
const userId = computed(() => route.params.id)
const { data: user } = await useFetch(`/api/users/${userId.value}`)
</script>
<template>
<div>
<h1>{{ user?.name }}</h1>
</div>
</template>
Navigation
<script setup>
const goToUser = (id: string) => {
navigateTo(`/users/${id}`)
}
</script>
<template>
<NuxtLink to="/about">About</NuxtLink>
<NuxtLink :to="`/users/${user.id}`">View User</NuxtLink>
<NuxtLink to="/dashboard" prefetch>Dashboard</NuxtLink>
</template>
Route Middleware
// app/middleware/auth.ts
export default defineNuxtRouteMiddleware((to, from) => {
const { isAuthenticated } = useAuth()
if (!isAuthenticated.value) {
return navigateTo('/login')
}
})
<!-- app/pages/dashboard.vue -->
<script setup lang="ts">
definePageMeta({
middleware: 'auth'
})
</script>
Global Middleware
// app/middleware/analytics.global.ts
export default defineNuxtRouteMiddleware((to, from) => {
if (import.meta.client) {
window.gtag?.('event', 'page_view', {
page_path: to.path
})
}
})
SEO & Meta Tags
useSeoMeta (Recommended)
<script setup lang="ts">
useSeoMeta({
title: 'My Page Title',
description: 'Page description for search engines',
ogTitle: 'My Page Title',
ogDescription: 'Page description',
ogImage: 'https://example.com/og-image.jpg',
ogUrl: 'https://example.com/my-page',
twitterCard: 'summary_large_image'
})
</script>
Dynamic Meta Tags
<script setup lang="ts">
const { data: post } = await useFetch(`/api/posts/${route.params.slug}`)
useSeoMeta({
title: () => post.value?.title,
description: () => post.value?.excerpt,
ogImage: () => post.value?.image
})
</script>
Error Handling
Error Page
<!-- app/error.vue -->
<script setup lang="ts">
import type { NuxtError } from '#app'
const props = defineProps<{
error: NuxtError
}>()
const handleError = () => {
clearError({ redirect: '/' })
}
</script>
<template>
<div class="error-page">
<h1>{{ error.statusCode }}</h1>
<p>{{ error.message }}</p>
<button @click="handleError">Go Home</button>
</div>
</template>
Throwing Errors (App-side)
In the Vue part of your app (the app/ directory), createError continues to work:
throw createError({
statusCode: 404,
statusMessage: 'Page Not Found',
fatal: true
})
Error Boundaries (Component-Level)
<template>
<NuxtErrorBoundary @error="handleError">
<template #error="{ error, clearError }">
<div>
<h2>Something went wrong</h2>
<p>{{ error.message }}</p>
<button @click="clearError">Try again</button>
</div>
</template>
<MyComponent />
</NuxtErrorBoundary>
</template>
clearNuxtState Resets to Defaults (v5 Change)
// Nuxt 4: clearNuxtState sets state to undefined
// Nuxt 5: clearNuxtState resets state to its initial value
const count = useState('counter', () => 42)
count.value = 100
clearNuxtState('counter')
// Nuxt 5: count.value is now 42 (the default), not undefined
Common Anti-Patterns
Using process.env Instead of Runtime Config
// WRONG
const apiUrl = process.env.API_URL
// CORRECT
const config = useRuntimeConfig()
const apiUrl = config.public.apiBase
Missing Middleware Return
// WRONG
export default defineNuxtRouteMiddleware((to) => {
if (!isAuthenticated.value) {
navigateTo('/login') // Missing return!
}
})
// CORRECT
export default defineNuxtRouteMiddleware((to) => {
if (!isAuthenticated.value) {
return navigateTo('/login')
}
})
Non-Reactive Route Params
// WRONG
const userId = route.params.id
// CORRECT
const userId = computed(() => route.params.id)
Troubleshooting
Build Errors / Type Errors:
rm -rf .nuxt .output node_modules/.vite && bun install && bun run dev
Route Not Found:
- Check file is in
app/pages/ - Verify file extension is
.vue - Check for typos in dynamic params
[id].vue
Vite Plugin Warnings:
- Use
configEnvironment+applyToEnvironmentinstead ofserver/clientoptions - Deprecated
extendViteConfig({ server })will show warnings
JSX Not Working:
- Install
@vitejs/plugin-vue-jsxif using.jsx/.tsxfiles
Related Skills
- nuxt-data: Composables, data fetching, state management
- nuxt-server: Server routes, API patterns (Nitro v3)
- nuxt-production: Performance, testing, deployment, migration
Templates Available
See templates/ directory for:
- Production-ready
nuxt.config.ts app.vuewith proper structure
Version: 5.0.0 | Last Updated: 2026-03-30 | License: MIT
Readme
Nuxt 5 - Comprehensive Framework Plugin
Production-ready Nuxt 5 development with 4 focused skills, 3 diagnostic agents, interactive setup wizard, and official Nuxt MCP integration.
Plugin Overview
This plugin provides complete Nuxt 5 coverage through:
- 4 Focused Skills: Core, Data, Server, Production
- 3 Diagnostic Agents: Debugger, Migration Assistant, Performance Analyzer
- 1 Interactive Command: Setup Wizard
- MCP Integration: Official Nuxt MCP server for real-time documentation
What's New in Nuxt 5
Nuxt 5 brings major infrastructure upgrades:
| Area | Nuxt 4 | Nuxt 5 |
|---|---|---|
| Bundler | Vite 6 (esbuild + Rollup) | Vite 8 (Rolldown) |
| Server engine | Nitro v2 | Nitro v3 (h3 v2, Web Standard APIs) |
| Error handling | createError({statusCode}) | HTTPError({status}) (server) |
| Server API | event.path, event.node.res | event.url, event.res (Web Standard) |
| Vite config | Separate client/server configs | Vite Environment API |
| JS runtime | JSX plugin included by default | JSX plugin optional (on-demand) |
| Client-only placeholder | Empty <div> | HTML comment node |
| callHook | Always returns Promise | May return void (sync when possible) |
| clearNuxtState | Sets to undefined | Resets to initial default value |
| Page names | Auto-generated | Normalized to match route names |
Skills
nuxt-core
Project setup, configuration, routing, SEO, and error handling.
Use when: Setting up new projects, configuring nuxt.config.ts, implementing file-based routing, adding middleware, using useHead/useSeoMeta, handling errors with error.vue.
nuxt-data
Composables, data fetching, and state management.
Use when: Creating custom composables, fetching data with useFetch/useAsyncData, managing global state with useState, debugging reactive data issues.
nuxt-server
Server routes, API patterns, and Nitro v3 development.
Use when: Creating API endpoints, implementing server middleware, integrating databases (D1, PostgreSQL, Drizzle), handling file uploads, building WebSocket features.
nuxt-production
Hydration, performance, testing, deployment, and migration.
Use when: Debugging hydration mismatches, optimizing Core Web Vitals, writing Vitest tests, deploying to Cloudflare/Vercel/Netlify, migrating from Nuxt 4 to Nuxt 5.
Agents
nuxt-debugger
7-phase autonomous diagnostic agent for troubleshooting Nuxt applications.
Triggers: Hydration mismatches, SSR errors, routing problems, data fetching issues, server route failures.
nuxt-migration-assistant
6-phase autonomous migration agent for upgrading from Nuxt 4 to Nuxt 5.
Triggers: "Migrate to Nuxt 5", "Upgrade from Nuxt 4", v4 compatibility issues.
nuxt-performance-analyzer
6-phase autonomous performance agent for optimizing Nuxt applications.
Triggers: Slow page loads, Core Web Vitals optimization, bundle size reduction.
Commands
/nuxt-setup
Interactive wizard for creating new Nuxt 5 projects.
Questions Asked:
- Project Type (Full-Stack, Marketing Site, API, SPA)
- UI Framework (Nuxt UI, Tailwind, shadcn-vue)
- Features (Auth, Database, Content, Testing)
- Database (D1, NuxtHub, PostgreSQL)
- Deployment Target (Cloudflare, Vercel, Netlify)
- Package Manager (bun, pnpm, npm)
MCP Integration
This plugin includes the official Nuxt MCP server for real-time documentation access.
Claude Code (CLI)
claude mcp add --transport http nuxt https://nuxt.com/mcp
Claude Desktop
{
"mcpServers": {
"nuxt": {
"command": "npx",
"args": ["mcp-remote", "https://nuxt.com/mcp"]
}
}
}
Cursor / VS Code / Windsurf
Add to respective MCP config:
{
"mcpServers": {
"nuxt": { "type": "http", "url": "https://nuxt.com/mcp" }
}
}
Key v5 Migration Points
Server-side error handling changed
// Nuxt 4
import { createError } from 'h3'
throw createError({ statusCode: 404, statusMessage: 'Not Found' })
// Nuxt 5
import { HTTPError } from 'nitro/h3'
throw new HTTPError({ status: 404, statusText: 'Not Found' })
Server event API uses Web Standards
// Nuxt 4
event.path
event.node.res.statusCode = 200
setResponseHeader(event, 'x-custom', 'value')
// Nuxt 5
event.url.pathname
event.res.status = 200
event.res.headers.set('x-custom', 'value')
Vite config uses Environment API
// Nuxt 5 - use configEnvironment + applyToEnvironment
addVitePlugin(() => ({
name: 'my-plugin',
configEnvironment(name, config) {
if (name === 'client') {
config.optimizeDeps ||= {}
config.optimizeDeps.include ||= []
config.optimizeDeps.include.push('my-package')
}
},
applyToEnvironment(env) { return env.name === 'client' },
}))
useRuntimeConfig() no longer accepts event
// Nuxt 4
const config = useRuntimeConfig(event)
// Nuxt 5
const config = useRuntimeConfig()
Version Requirements
| Package | Minimum | Recommended |
|---|---|---|
| nuxt | 5.0.0 | 5.x |
| vue | 3.5.0 | 3.5.x |
| nitro | 3.0.0 | 3.x |
| vite | 8.0.0 | 8.x |
| typescript | 5.0.0 | 5.x |
Related Plugins
- nuxt-ui-v4: Nuxt UI component library
- cloudflare-d1: D1 database patterns
- cloudflare-kv: KV storage patterns
- cloudflare-r2: R2 object storage
- better-auth: Authentication patterns
- pinia-v3: State management
Installation
/plugin install nuxt-v5@claude-skills
License
MIT
Version: 5.0.0 | Last Updated: 2026-03-30 | Maintainer: Claude Skills Maintainers
Details
- Marketplace
- secondsky/claude-skills
- Source
- plugins/nuxt-v5
- Category
- Frontend
- Keywords
- nuxt-v5, nuxt, frontend, components, ssr, migration
- Listed since
- Apr 7, 2026
More from secondsky/claude-skills
All 122- oauth-implementationv3.12.0
- payment-gateway-integrationv3.12.0
- pinia-coladav3.12.0
- pinia-v3v3.12.0
- plan-interviewv3.12.0
- playwrightv3.12.0
- progressive-web-appv3.12.0
- push-notification-setupv3.12.0
- react-best-practicesv3.12.0
- react-composition-patternsv3.12.0
- react-hook-form-zodv3.12.0
- react-native-skillsv3.12.0
- recommendation-enginev3.12.0
- recommendation-systemv3.12.0
- responsive-web-designv3.12.0
- rest-api-designv3.12.0
- root-cause-tracingv3.12.0
- security-headers-configurationv3.12.0
- seo-keyword-cluster-builderv3.12.0
- seo-optimizerv3.12.0
- sequential-thinkingv3.12.0
- session-managementv3.12.0
- shadcn-vuev3.12.0
- systematic-debuggingv3.12.0
Similar to nuxt-v5
More Frontend & UI Code
nuxt-v4Pluginsecondsky/claude-skills250 starsComprehensive Nuxt 4 development with 4 focused skills (core, data, server, production), 3 diagnostic agents (debugger, migration, performance), and interactive
nuxtSkillantfu/skills24.8K installsFull-stack Vue framework covering SSR, file-based routing, auto-imports, and Nitro server routes for Nuxt 5.
nuxt-productionSkillsecondsky/claude-skills429 installsNuxt 4 production guide covering hydration fixes, performance tuning, Vitest testing, and Nuxt 3 to 4 migration.
nuxt-skillsPluginonmax/nuxt-skills730 starsVue, Nuxt, and NuxtHub skills for AI coding assistants
nextjsPluginTheBushidoCollective/han201 starsAdvanced Next.js skills for App Router, Server Components, and data fetching.
nextjs-vercel-proPlugindavila7/claude-code-templates24.2K starsComplete Next.js and Vercel development toolkit with deployment automation and performance optimization