Nuxt
Build Vue 3 SSR/SSG applications with proper data fetching, hydration, and server patterns.
от clawic★ 23 звезды на GitHub
Установить Nuxt в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Nuxt 3 Patterns
Data Fetching
useFetchdeduplicates and caches requests during SSR — use it in components, not$fetchwhich fetches twice (server + client)$fetchis for event handlers and server routes only — in<script setup>it causes hydration mismatchesuseFetchruns on server during SSR — checkprocess.serverif you need client-only data- Add
keyoption touseFetchwhen URL params change but path stays same — without it, cache returns stale data useLazyFetchdoesn't block navigation — use for non-critical data, but handle the pending state
Hydration Traps
Date.now()orMath.random()in templates cause hydration mismatches — compute once in setup or use<ClientOnly>- Browser-only APIs (localStorage, window) crash SSR — wrap in
onMountedorprocess.clientcheck - Conditional rendering based on client-only state mismatches — use
<ClientOnly>component with fallback v-ifwith async data shows flash of wrong content — usev-showor skeleton states instead
Auto-imports
- Components in
components/auto-import with folder-based naming —components/UI/Button.vuebecomes<UIButton> - Composables in
composables/must be nameduse*for auto-import —utils.tsexports won't auto-import - Server utils in
server/utils/auto-import in server routes only — not available in client code - Disable auto-imports per-file with
// @ts-nocheckor explicitly import to avoid naming collisions
Server Routes
- Files in
server/api/become API routes —server/api/users.get.tshandles GET /api/users - Method suffix (
.get.ts,.post.ts) is required for method-specific handlers — without it, handles all methods getQuery(event)for query params,readBody(event)for POST body — don't accessevent.reqdirectly- Return value is auto-serialized to JSON — throw
createError({ statusCode: 404 })for errors
State Management
useStateis SSR-safe and persists across navigation — regularref()resets on each pageuseStatekey must be unique app-wide — collisions silently share state between components- Pinia stores need
storeToRefs()to keep reactivity when destructuring — without it, values lose reactivity - Don't initialize state with browser APIs in
useStatedefault — it runs on server too
Middleware
- Global middleware in
middleware/with.global.tssuffix runs on every route — order is alphabetical - Route middleware defined in
definePageMetaruns after global — use for auth checks on specific pages navigateTo()in middleware must be returned — forgettingreturncontinues to the original route- Server middleware in
server/middleware/runs on all server requests including API routes
Configuration
runtimeConfigfor server secrets,runtimeConfig.publicfor client-safe values — env vars override withNUXT_prefixapp.config.tsfor build-time config that doesn't need env vars — it's bundled into the appnuxt.config.tschanges require restart —app.config.tschanges hot-reload
SEO and Meta
useSeoMetafor standard meta tags — type-safe and handles og:/twitter: prefixes automaticallyuseHeadfor custom tags, scripts, and links — more flexible but no type safety for meta names- Meta in
definePageMetais static — useuseSeoMetain setup for dynamic values titleTemplateinnuxt.configfor consistent titles —%s - My Sitepattern
Plugins
- Plugins run before app creation — use
nuxtApp.hook('app:created')for post-creation logic providein plugins makes values available viauseNuxtApp()— but composables are cleaner- Plugin order: numbered prefixes (
01.plugin.ts) run first, then alphabetical — dependencies need explicit ordering - Client-only plugins:
.client.tssuffix — server-only:.server.tssuffix
Build and Deploy
nuxt generatecreates static files — but API routes won't work without a servernuxt buildcreates server bundle — deploy the.outputdirectory- ISR with
routeRules:'/blog/**': { isr: 3600 }— caches pages for 1 hour - Prerender specific routes:
routeRules: { '/about': { prerender: true } }— builds static HTML at build time
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- _meta.json
FAQ
Что делает скилл Nuxt?
Build Vue 3 SSR/SSG applications with proper data fetching, hydration, and server patterns.
Как установить скилл Nuxt?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Nuxt запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate 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…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…