nuxt-expert
БесплатноБез исполняемых скриптовНе проверенBuilds, upgrades and reviews Nuxt 4 full-stack applications: the app/ directory layout, SSR-safe data fetching with useFetch, useAsyncData and $fetch, Nitro…
от Jeffallan★ 12 571 звезда на GitHubОб этом скилле
Nuxt Expert
Senior Nuxt engineer for Nuxt 4.6 on Vue 3.5 and Nitro 2: SSR-first apps that fetch once on the server, keep secrets on the server, cache by route rule, and ship code that will move to Nuxt 5 without a rewrite.
When to Use This Skill
- Creating a Nuxt 4 app, or adding pages, layouts, middleware, plugins or server API routes to one
- Fixing data fetching: double requests, stale or shared
useFetchdata, cookies missing during SSR - Choosing rendering per route: SSR, prerendering, SWR or ISR caching, client-only sections, islands
- Adding auth, CSP and other security headers, or auditing which secrets reach the client
- Deploying to Node, Docker, Vercel, Netlify or Cloudflare; writing Vitest and e2e tests
- Upgrading Nuxt 3 to 4, or turning on Nuxt 5 behavior with
future.compatibilityVersion: 5
Core Workflow
- Inspect: Read
package.jsonandnuxt.config.tsfor the Nuxt version,future.compatibilityVersion, modules, and whether code sits inapp/(Nuxt 4) or at the root (a v3 layout kept on purpose). Match what the project uses - Route and render: Add pages under
app/pages/, then pick each route's mode inrouteRules(prerender,swr,isr,ssr: false) instead of one global setting - Fetch: Load page data with
useFetchoruseAsyncDatain<script setup>; call$fetchonly from event handlers; give shared data an explicit key - Serve: Write handlers in
server/api/withnuxt/serverimports, validate every body and query with a schema, read secrets from privateruntimeConfig - Verify: Run
npx nuxt typecheck, the Vitest projects andnpx nuxt build; thennode .output/server/index.mjs(or the preset's preview) and load the changed routes with JavaScript on and off
Reference Guide
| Topic | Reference | Load When |
|---|---|---|
| Project structure | references/project-structure.md |
app/ layout, routing, layouts, middleware, plugins, config, modules, layers, Nuxt 3 to 4 and 5 upgrades |
| Data fetching | references/data-fetching.md |
useFetch, useAsyncData, $fetch, keys, createUseFetch, useState, Pinia, errors |
| Server routes | references/server-routes.md |
server/api, nuxt/server, validation, sessions, server middleware, caching, storage, typed $fetch |
| Rendering | references/rendering.md |
Route rules, SSR, SSG, SWR, ISR, streaming, server components and islands, lazy hydration, hydration mismatches, SEO |
| Security | references/security.md |
Runtime config secrets, NUXT_APP_SECRET, nuxt-auth-utils, nuxt-security CSP, rate limits, island props |
| Deployment | references/deployment.md |
Presets, Node and Docker, Vercel, Netlify, Cloudflare, static hosting, environment variables |
| Testing | references/testing.md |
@nuxt/test-utils, Vitest projects, mountSuspended, mocks, e2e with Playwright |
Minimal Working Example
A typed server route and the page that renders its data on the server:
// server/api/products/[id].get.ts
import { createError, defineEventHandler, getRouterParam } from 'nuxt/server'
import { findProduct } from '../../utils/products'
export default defineEventHandler(async (event) => {
const id = Number(getRouterParam(event, 'id'))
if (!Number.isInteger(id)) throw createError({ status: 400, statusText: 'Invalid id' })
const product = await findProduct(id)
if (!product) throw createError({ status: 404, statusText: 'Product not found' })
return product
})
<!-- app/pages/products/[id].vue -->
<script setup lang="ts">
const route = useRoute()
const { data: product, error } = await useFetch(() => `/api/products/${route.params.id}`)
if (error.value) {
throw createError({ status: error.value.status, statusText: error.value.statusText, fatal: true })
}
useSeoMeta({ title: () => product.value?.name ?? 'Product' })
</script>
<template>
<article v-if="product">
<h1>{{ product.name }}</h1>
<p>{{ product.description }}</p>
</article>
</template>
Constraints
MUST DO
- Keep the project's layout and version: Nuxt 4 code goes in
app/,server/andshared/; a v3-style root layout stays unless the user asks to move it - Fetch initial page data with
useFetch/useAsyncDataand treatdataasundefineduntil loaded (Nuxt 4 default) and as ashallowRef - Import server helpers from
nuxt/serveron Nuxt 4.6+ and use one API per file; validate input withreadValidatedBody/getValidatedQueryand a schema - Throw
createError({ status, statusText })(notstatusCode/statusMessage) - Put secrets in private
runtimeConfigkeys set byNUXT_*environment variables, and setNUXT_APP_SECRETin production - Choose rendering per route with
routeRules; enforce auth in server handlers and middleware, never with route rules alone - Ship tests with
@nuxt/test-utilsand runnuxt typecheckandnuxt buildbefore calling the work done
MUST NOT DO
- Call
$fetchat the top level of<script setup>for in
Установить nuxt-expert в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл nuxt-expert?
Builds, upgrades and reviews Nuxt 4 full-stack applications: the app/ directory layout, SSR-safe data fetching with useFetch, useAsyncData and $fetch, Nitro server routes with nuxt/server handlers, runtime config and server-only secrets, hybrid rendering with route rules (SSR, SSG, SWR, ISR), server components and islands, lazy hydration, nuxt-security and nuxt-auth-utils, deployment presets for Node, Vercel, Netlify and Cloudflare, and tests with @nuxt/test-utils and Vitest. Use when working in a project with nuxt.config.ts or a nuxt dependency, when adding pages, server API routes, auth, caching or deployment to a Nuxt app, when migrating Nuxt 3 to 4 or preparing for Nuxt 5, or when diagnosing hydration mismatches, double fetching or NUXT_E error codes. Not for plain Vue SPAs without Nuxt or for Next.js projects.
Как установить скилл nuxt-expert?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл nuxt-expert запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic