Agent skill

Nuxt Production

by secondsky in secondsky/claude-skills

| Nuxt 5 production optimization: hydration, performance, testing with Vitest, deployment to Cloudflare/Vercel/Netlify, and migration from Nuxt 4.

MITAuto-check passedTesting & QA

Install Nuxt Production

skills CLI
$ npx skills add secondsky/claude-skills --skill nuxt-production -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install secondsky/claude-skills nuxt-production --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/nuxt-v5/skills/nuxt-production .claude/skills/nuxt-production && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
nuxt-production
GitHub stars
227
Token cost
~2.7k tokens
SKILL.md length
433 words
Files
7 (incl. references)
Skills in repo
169
Repo updated
First seen
Licence
MIT

At a glance

| Nuxt 5 production optimization: hydration, performance, testing with Vitest, deployment to Cloudflare/Vercel/Netlify, and migration from Nuxt 4.

  • Works in 10 steps: Update package.json → Enable Compatibility Mode → Update Server Error Handling → …
  • : debugging hydration mismatches
  • SKILL.md covers What's New in Nuxt 5, When to Load References, Hydration Best Practices and Performance Optimization, plus 3 more sections
  • Runs TypeScript scripts from its folder; calls bun and bunx

What it does

Nuxt Production is an agent skill from secondsky/claude-skills. | Nuxt 5 production optimization: hydration, performance, testing with Vitest, deployment to Cloudflare/Vercel/Netlify, and migration from Nuxt 4. Use when: debugging hydration mismatches, optimizing performance and Core Web Vitals, writing tests with Vitest, deploying to Cloudflare Pages/Workers/Vercel/Netlify, or migrating from Nuxt 4 to Nuxt 5.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including reference files (for example `references/deployment-cloudflare.md`, `references/hydration.md` and `references/performance.md`).

It sits in Testing & QA, covering Web performance, Unit testing and Load testing. It works with Nuxt, Vitest, Netlify and Vercel. The repository describes itself as: Production-ready skills for Claude Code CLI - Cloudflare, React, Tailwind v4, and AI integrations. The licence is MIT.

When your agent uses it

  • : debugging hydration mismatches
  • Optimizing performance and Core Web Vitals
  • Writing tests with Vitest
  • Deploying to Cloudflare Pages/Workers/Vercel/Netlify

Example prompts

  • “/nuxt-production”

Requirements

  • Node.js

Workflow steps

10 steps, taken from the step headings in SKILL.md.

  1. Update package.json
  2. Enable Compatibility Mode
  3. Update Server Error Handling
  4. Update Server Event API
  5. Update Vite Config
  6. Update Route Rules
  7. Update Import Paths
  8. Remove Deprecated Options
  9. Install JSX Plugin (If Needed)
  10. Update callHook Usage

What it can do on your machine

Read from SKILL.md and the folder at commit 8837836. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (TypeScript), which the agent can run.

    Shell commands in SKILL.md call:

    • bun
    • bunx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use bunx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Nuxt Production loads about 2.7k tokens when it runs, and up to ~15k if it reads all its reference files. Until then it costs about 91 tokens; SKILL.md has 433 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~91
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~15k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from secondsky/claude-skills at commit 8837836, republished under its MIT licence (© secondsky). 433 words, ~2,733 tokens.

Download SKILL.mdSave it as .claude/skills/nuxt-production/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
nuxt-production
description
| Nuxt 5 production optimization: hydration, performance, testing with Vitest, deployment to Cloudflare/Vercel/Netlify, and migration from Nuxt 4. Use when: debugging hydration mismatches, optimizing performance and Core Web Vitals, writing tests with Vitest, deploying to Cloudflare Pages/Workers/Vercel/Netlify, or migrating from Nuxt 4 to Nuxt 5.
license
MIT
metadata.version
5.0.0
metadata.author
Claude Skills Maintainers
metadata.category
Framework
metadata.framework
Nuxt
metadata.framework-version
5.x
metadata.last-verified
2026-03-30
metadata.keywords
hydration, hydration mismatch, ClientOnly, SSR, performance, lazy loading, lazy hydration, Vitest, testing, deployment, Cloudflare Pages, Cloudflare Workers…

Nuxt 5 Production Guide

Hydration, performance, testing, deployment, and migration patterns.

What's New in Nuxt 5

v5 Key Changes
ChangeNuxt 4Nuxt 5
BundlerVite 6 (esbuild + Rollup)Vite 8 (Rolldown)
Server engineNitro v2Nitro v3 (h3 v2)
Server errorscreateError({statusCode})HTTPError({status})
Client-only placeholderEmpty <div>HTML comment node
callHookAlways returns PromiseMay return void
clearNuxtStateSets to undefinedResets to initial default
Page namesAuto-generatedNormalized to route names
JSX supportIncluded by defaultOptional (on-demand)
externalVueConfigurableRemoved (always mocked)
Client-Only Comment Placeholders (v5)

Client-only components (.client.vue files and createClientOnly() wrappers) now render an HTML comment on the server instead of an empty <div>. This fixes scoped styles hydration issues.

vue
<!-- If you relied on the placeholder <div> for layout -->
<ClientOnly>
  <MyComponent />
  <template #fallback>
    <div class="placeholder" style="min-height: 200px"></div>
  </template>
</ClientOnly>

To revert to the old <div> behavior:

typescript
// nuxt.config.ts
export default defineNuxtConfig({
  experimental: {
    clientNodePlaceholder: false
  }
})
Non-Async callHook (v5)

callHook may now return void instead of always returning Promise. Always use await:

typescript
// WRONG
nuxtApp.callHook('my:hook', data).then(() => { ... })

// CORRECT
await nuxtApp.callHook('my:hook', data)

When to Load References

Load references/hydration.md when:

  • Debugging "Hydration node mismatch" errors
  • Implementing ClientOnly components
  • Fixing non-deterministic rendering issues

Load references/performance.md when:

  • Optimizing Core Web Vitals scores
  • Implementing lazy loading and code splitting
  • Reducing bundle size

Load references/testing-vitest.md when:

  • Writing component tests with @nuxt/test-utils
  • Testing composables with Nuxt context
  • Mocking Nuxt APIs

Load references/deployment-cloudflare.md when:

  • Deploying to Cloudflare Pages or Workers
  • Configuring wrangler.toml
  • Setting up NuxtHub integration

Hydration Best Practices

What Causes Hydration Mismatches
CauseExampleFix
Non-deterministic valuesMath.random()Use useState
Browser APIs on serverwindow.innerWidthUse onMounted
Date/time on servernew Date()Use useState or ClientOnly
Third-party scriptsAnalyticsUse ClientOnly
Fix Patterns
vue
<!-- Non-deterministic values -->
<script setup>
const id = useState('random-id', () => Math.random())
</script>

<!-- Browser APIs -->
<script setup>
const width = ref(0)
onMounted(() => {
  width.value = window.innerWidth
})
</script>

<!-- ClientOnly component -->
<template>
  <ClientOnly>
    <MyMapComponent />
    <template #fallback>
      <div class="skeleton">Loading map...</div>
    </template>
  </ClientOnly>
</template>

Performance Optimization

Lazy Loading Components
vue
<script setup>
const HeavyChart = defineAsyncComponent(() =>
  import('~/components/HeavyChart.vue')
)
</script>
Lazy Hydration
vue
<script setup>
const LazyComponent = defineLazyHydrationComponent(
  'visible',
  () => import('./HeavyComponent.vue')
)

const InteractiveComponent = defineLazyHydrationComponent(
  'interaction',
  () => import('./InteractiveComponent.vue')
)

const IdleComponent = defineLazyHydrationComponent(
  'idle',
  () => import('./IdleComponent.vue')
)
</script>
Route Caching
typescript
export default defineNuxtConfig({
  routeRules: {
    '/': { prerender: true },
    '/about': { prerender: true },
    '/blog/**': { swr: 3600 },
    '/products/**': { isr: 3600 },
    '/dashboard/**': { ssr: false },
    '/static/**': {
      headers: { 'Cache-Control': 'public, max-age=31536000' }
    }
  }
})
Image Optimization
vue
<template>
  <NuxtImg
    src="/images/hero.jpg"
    alt="Hero image"
    width="800"
    height="400"
    loading="lazy"
    placeholder
    format="webp"
  />

  <NuxtPicture
    src="/images/product.jpg"
    alt="Product"
    sizes="sm:100vw md:50vw lg:400px"
    :modifiers="{ quality: 80 }"
  />
</template>

Testing with Vitest

Setup
bash
bun add -d @nuxt/test-utils vitest @vue/test-utils happy-dom
typescript
// vitest.config.ts
import { defineVitestConfig } from '@nuxt/test-utils/config'

export default defineVitestConfig({
  test: {
    environment: 'nuxt',
    environmentOptions: {
      nuxt: {
        domEnvironment: 'happy-dom'
      }
    }
  }
})
Component Testing
typescript
import { describe, it, expect } from 'vitest'
import { mountSuspended } from '@nuxt/test-utils/runtime'
import UserCard from '~/components/UserCard.vue'

describe('UserCard', () => {
  it('renders user name', async () => {
    const wrapper = await mountSuspended(UserCard, {
      props: {
        user: { id: 1, name: 'John Doe', email: 'john@example.com' }
      }
    })

    expect(wrapper.text()).toContain('John Doe')
  })
})
Show full SKILL.md (173 more words)Show less
Mocking Composables
typescript
import { mockNuxtImport } from '@nuxt/test-utils/runtime'

mockNuxtImport('useFetch', () => {
  return () => ({
    data: ref({ users: [{ id: 1, name: 'John' }] }),
    pending: ref(false),
    error: ref(null)
  })
})

Deployment

bash
bun run build
bunx wrangler pages deploy .output/public
typescript
export default defineNuxtConfig({
  nitro: { preset: 'cloudflare_pages' }
})
Cloudflare Workers
typescript
export default defineNuxtConfig({
  nitro: { preset: 'cloudflare_module' }
})
Vercel / Netlify
typescript
// Vercel
export default defineNuxtConfig({
  nitro: { preset: 'vercel' }
})

// Netlify
export default defineNuxtConfig({
  nitro: { preset: 'netlify' }
})
NuxtHub (Cloudflare All-in-One)
bash
bun add @nuxthub/core
typescript
export default defineNuxtConfig({
  modules: ['@nuxthub/core'],
  hub: {
    database: true,
    kv: true,
    blob: true,
    cache: true
  }
})

Migration from Nuxt 4

Step 1: Update package.json
json
{
  "devDependencies": {
    "nuxt": "^5.0.0"
  }
}
Step 2: Enable Compatibility Mode
typescript
// nuxt.config.ts
export default defineNuxtConfig({
  future: {
    compatibilityVersion: 5
  }
})
Step 3: Update Server Error Handling
typescript
// Before (Nuxt 4)
import { createError } from 'h3'
throw createError({ statusCode: 404, statusMessage: 'Not Found' })

// After (Nuxt 5)
import { HTTPError } from 'nitro/h3'
throw new HTTPError({ status: 404, statusText: 'Not Found' })
Step 4: Update Server Event API
typescript
// Before (Nuxt 4)
const path = event.path
event.node.res.statusCode = 200
setResponseHeader(event, 'x-custom', 'value')
const config = useRuntimeConfig(event)

// After (Nuxt 5)
const path = event.url.pathname
event.res.status = 200
event.res.headers.set('x-custom', 'value')
const config = useRuntimeConfig()
Step 5: Update Vite Config
typescript
// Before (Nuxt 4)
export default defineNuxtConfig({
  vite: {
    build: {
      rollupOptions: { ... }
    }
  }
})

// After (Nuxt 5) - use rolldownOptions
export default defineNuxtConfig({
  vite: {
    build: {
      rolldownOptions: { ... }
    }
  }
})
Step 6: Update Route Rules
typescript
// Before
routeRules: {
  '/old': { redirect: { to: '/new', statusCode: 302 } }
}

// After
routeRules: {
  '/old': { redirect: { to: '/new', status: 302 } }
}
Step 7: Update Import Paths
typescript
// Before
import { defineEventHandler, getQuery } from 'h3'

// After
import { defineEventHandler, getQuery } from 'nitro/h3'
// Or rely on auto-imports (no import needed)
Step 8: Remove Deprecated Options
typescript
// Remove these from nuxt.config.ts
export default defineNuxtConfig({
  experimental: {
    externalVue: false,  // REMOVED - delete this
    viteEnvironmentApi: true,  // REMOVED - always enabled
  }
})
Step 9: Install JSX Plugin (If Needed)
bash
# Only if your project uses .jsx/.tsx files
bun add -D @vitejs/plugin-vue-jsx
Step 10: Update callHook Usage
typescript
// Before
nuxtApp.callHook('my:hook', data).then(() => { ... })

// After
await nuxtApp.callHook('my:hook', data)

Common Anti-Patterns

Client-Only Code on Server
typescript
// WRONG
const width = window.innerWidth

// CORRECT
if (import.meta.client) {
  const width = window.innerWidth
}

// Or use onMounted
onMounted(() => {
  const width = window.innerWidth
})
Non-Deterministic SSR
typescript
// WRONG
const id = Math.random()
const time = Date.now()

// CORRECT
const id = useState('id', () => Math.random())
const time = useState('time', () => Date.now())

Troubleshooting

Hydration Mismatch:

  • Check for window, document, localStorage usage
  • Wrap in ClientOnly or use onMounted
  • Look for Math.random(), Date.now()
  • Check if relying on <div> placeholder for client-only components

Build Errors:

bash
rm -rf .nuxt .output node_modules/.vite && bun install

Vite Plugin Warnings:

  • Migrate from extendViteConfig({ server }) to configEnvironment
  • Use applyToEnvironment instead of server: false / client: false

Rolldown Build Issues:

  • Replace rollupOptions with rolldownOptions
  • Replace vite.esbuild with vite.oxc
  • Check CJS interop changes in Vite 8
  • nuxt-core: Project setup, routing, configuration
  • nuxt-data: Composables, data fetching, state
  • nuxt-server: Server routes, API patterns (Nitro v3)
  • cloudflare-d1: D1 database patterns

Version: 5.0.0 | Last Updated: 2026-03-30 | License: MIT

© secondsky, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (references) in plugins/nuxt-v5/skills/nuxt-production of secondsky/claude-skills.

  • SKILL.md
  • references/deployment-cloudflare.md
  • references/hydration.md
  • references/performance.md
  • references/testing-vitest.md
  • templates/tests/components/BlogPost.test.ts
  • templates/wrangler.toml

Open the folder on GitHubat commit 8837836

Compare with similar skills

Nuxt Production next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Nuxt Production compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Nuxt Production this skillsecondsky/claude-skills227—~2.7kAutomated safety check: PassMIT
Golivemikehasa/golive-skill1.2k—~13kAutomated safety check: NotesMIT
Nitro Server Toolkitantfu/skills5.9k—~948Automated safety check: PassMIT
Vercel Migration Deep Divejeremylongshore/tons-of-skills-marketplace2.8k—~2kAutomated safety check: NotesMIT
Control UI E2Eopenclaw/openclaw392k—~2.9kAutomated safety check: PassMIT
Testing Orcaqcin12211/orca-q224—~1.6kAutomated safety check: PassMIT

Similar skills

  • Golive

    mikehasa/golive-skill

    Take an agent-written app from repo to live production on the user's OWN accounts, with providers they choose (hosting, database, auth, payments, email, domain/DNS).

    1.2k GitHub stars~13k tokensUpdated 5 days ago
    Backend & APIsAuto-check: notes
  • Reference for Nitro v3, the server toolkit behind Nuxt: file routing, route rules, caching, storage, tasks, websockets and deployment presets.

    5.9k GitHub stars~948 tokensUpdated 8 days ago
    Backend & APIsAuto-check passed
  • Vercel Migration Deep Dive

    jeremylongshore/tons-of-skills-marketplace

    Migrate to Vercel from other platforms or re-architecture existing Vercel deployments.

    2.8k GitHub stars~2k tokensUpdated yesterday
    DevOps & CloudAuto-check: notes
  • Control UI E2E

    openclaw/openclaw

    A skill your agent uses when designing, testing, fixing, or extending the OpenClaw Control UI GUI, including UI stress-test galleries with feedback inputs, Vitest + Playwright end-to-end checks…

    392k GitHub stars~2.9k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Testing Orcaq

    cin12211/orca-q

    OrcaQ-specific testing guide. An agent skill from cin12211/orca-q.

    224 GitHub stars~1.6k tokensUpdated 17 days ago
    Testing & QAAuto-check passed
  • Web Testing with Playwright and Vitest

    withkynam/vibecode-pro-max-kit

    Covers web testing from unit to E2E, load, visual, accessibility and security checks, with Playwright, Vitest and k6 guides plus a Playwright setup script.

    1.1k GitHub stars~892 tokensUpdated 3 mo ago
    Testing & QAAuto-check passed

More from secondsky/claude-skills

All 169 skills in this repo
  • Tanstack AI

    secondsky/claude-skills

    TanStack AI (alpha) provider-agnostic type-safe chat with streaming for OpenAI, Anthropic, Gemini, Ollama.

    227 GitHub starsUsed in 1 repo~3.6k tokens
    Auto-check: notes
  • Auto Animate

    secondsky/claude-skills

    AutoAnimate (@formkit/auto-animate) zero-config animations for React.

    227 GitHub stars~2.9k tokensUpdated 10 days ago
    Auto-check passed
  • Base UI React

    secondsky/claude-skills

    MUI Base UI unstyled React components with Floating UI. An agent skill from secondsky/claude-skills.

    227 GitHub stars~1.9k tokensUpdated 10 days ago
    Auto-check passed
  • Cloudflare Images

    secondsky/claude-skills

    This skill should be used when the user asks to "upload images to Cloudflare", "implement direct creator upload", "configure image transformations", "optimize WebP/AVIF", "create image variants"…

    227 GitHub stars~3.6k tokensUpdated 10 days ago
    Auto-check: notes
  • Cloudflare Nextjs

    secondsky/claude-skills

    Deploy Next.js to Cloudflare Workers via the OpenNext adapter (@opennextjs/cloudflare).

    227 GitHub stars~5.3k tokensUpdated 10 days ago
    Auto-check: notes
  • Cloudflare Sandbox

    secondsky/claude-skills

    Cloudflare Sandboxes SDK for secure code execution in Linux containers at edge.

    227 GitHub stars~4.5k tokensUpdated 10 days ago
    Auto-check passed

Questions about Nuxt Production

What does Nuxt Production do?

| Nuxt 5 production optimization: hydration, performance, testing with Vitest, deployment to Cloudflare/Vercel/Netlify, and migration from Nuxt 4. Nuxt Production is an agent skill from secondsky/claude-skills. | Nuxt 5 production optimization: hydration, performance, testing with Vitest, deployment to Cloudflare/Vercel/Netlify, and migration from Nuxt 4.

When should I use Nuxt Production?

Nuxt Production fits situations like: : debugging hydration mismatches; optimizing performance and Core Web Vitals; writing tests with Vitest; deploying to Cloudflare Pages/Workers/Vercel/Netlify.

How do I install Nuxt Production in Claude Code?

Run `npx skills add secondsky/claude-skills --skill nuxt-production -a claude-code`. Or copy the skill folder (plugins/nuxt-v5/skills/nuxt-production in secondsky/claude-skills) into .claude/skills/nuxt-production in your project. Claude Code loads it when a task matches its description.

How do I install Nuxt Production in Codex?

Run `npx skills add secondsky/claude-skills --skill nuxt-production -a codex`. Or copy the skill folder (plugins/nuxt-v5/skills/nuxt-production in secondsky/claude-skills) into .agents/skills/nuxt-production in your project. Codex loads it when a task matches its description.

Can I use Nuxt Production in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add secondsky/claude-skills --skill nuxt-production -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/nuxt-production, .gemini/skills/nuxt-production, .github/skills/nuxt-production and .opencode/skills/nuxt-production in your project.

What does Nuxt Production need to run?

Going by SKILL.md and its folder, Nuxt Production needs TypeScript for the scripts in its folder and the command-line tools its instructions call (bun and bunx). Our summary lists: Node.js.

Does Nuxt Production access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Nuxt Production safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Nuxt Production use?

Nuxt Production is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Nuxt Production use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 12k tokens, read only when the agent opens those files.

What are the alternatives to Nuxt Production?

Skills that share tags, products or a category with Nuxt Production: Golive (mikehasa/golive-skill, 1.2k stars), Nitro Server Toolkit (antfu/skills, 5.9k stars), Vercel Migration Deep Dive (jeremylongshore/tons-of-skills-marketplace, 2.8k stars) and Control UI E2E (openclaw/openclaw, 392k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Nuxt Production?

secondsky (a GitHub user) maintains it in secondsky/claude-skills, which has 227 GitHub stars. The repository holds 169 skills in this directory. The repository was last updated on September 28, 2026.

Source: secondsky/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.