Directory
‹ Back to apps

Vue 3.5 & Nuxt 4.4

Vue 3.5.34 + Nuxt 4.4.5 rules for Cursor. Pinned to vue ^3.5.34, nuxt ^4.4.5, pinia ^3.0, vue-router ^5.0, @vueuse/core ^14.3, @nuxt/ui ^4.7, vitest ^4.1. Leads with the Vue 3.5 trio LLMs miss (useTemplateRef, useId, reactive props destructure with defaults), the Nuxt 4 app/ srcDir layout (with server/, shared/, public/ at root), useAsyncData shallowRef + singleton-by-key behaviour, Pinia 3 setup stores, VueUse foundational composables, and Vitest 4 + Vue Test Utils 2 + @nuxt/test-utils. Catches 38 LLM regressions including Options API in new components, ref(null) template refs, withDefaults wrapping, Vuex createStore, module-scope ref leaks in Nuxt composables, readBody in GET handlers, missing method-suffix on server routes, store/ instead of stores/, compatibilityVersion: 3 in Nuxt 4, queryContent in @nuxt/content v3, manual addEventListener over useEventListener, eager hydration of below-the-fold async components.

What’s inside

5 skills
  • Skillnuxt-new-pinia-storeScaffold a new Pinia 3 setup store under app/stores/<name>.ts: defineStore('name', () => { ... }) returning state refs + computed getters + action functions, optional VueUse useStorage for persistence, acceptHMRUpdate for HMR, a matching test using setActivePinia(createPinia()). Refuses Vuex createStore, Pinia options-style stores, and module-scope ref leaks. Pairs with the pinia and nuxt-state-management rules.
  • Skillnuxt-new-server-routeScaffold a new Nuxt 4 server route under server/api/ with the correct method suffix (.get/.post/.put/.delete/.patch), defineEventHandler, Zod-validated query via getValidatedQuery or body via readValidatedBody, createError({ statusCode, statusMessage, data }) for failures, typed return value referencing a shared/types.ts interface, and a matching @nuxt/test-utils test. Refuses readBody in GET handlers, missing method suffix, throw new Error, and raw getQuery without validation. Pairs with the nuxt-server-routes rule.
  • Skillvue-new-componentScaffold a Vue 3.5 single-file component using <script setup lang='ts'>, useTemplateRef for DOM refs, useId for SSR-safe ARIA, reactive props destructuring with defaults (no withDefaults), defineEmits with tuple types, and onWatcherCleanup for in-flight fetch aborts. Refuses Options API, ref(null) template refs, withDefaults wrapping, and toRefs(props) boilerplate. Pairs with the vue-3-5-core, vue-script-setup, and vue-nuxt-anti-patterns rules.
  • Skillvue-nuxt-migrate-to-3-5-and-4Stage-by-stage migration from Vue 3.x + Nuxt 3 to Vue 3.5 + Nuxt 4: bump dependency pins, move srcDir to app/ (pages, components, composables, layouts, middleware, plugins, stores, app.vue, error.vue, assets), drop future.compatibilityVersion: 3, rename store/ to stores/ then move to app/stores/, replace Vuex with Pinia setup stores, swap ref(null) template refs for useTemplateRef, drop withDefaults wrappers, drop toRefs(props) boilerplate, add onWatcherCleanup() to fetch watchers, swap queryContent for queryCollection, add method suffixes to server routes, swap @nuxt/ui v3 component anatomy for v4 ui slot prop, set Vitest pool: 'forks'. Pairs with vue-nuxt-anti-patterns rules #8, #9, #10, #11, #12, #18, #25, #26, #27, #28, #32.
  • Skillvue-nuxt-validateRun vue-tsc + ESLint (flat config via @nuxt/eslint) + Vitest 4 in parallel and grep-audit the codebase for tracked Vue 3.5 + Nuxt 4 anti-patterns: ref(null) template refs, withDefaults wrappers, toRefs(props) boilerplate, Options API blocks, Vuex createStore, store/ directory, pages/components/composables at root in Nuxt 4, manual Vue imports inside Nuxt SFCs, readBody in GET handlers, server routes without method suffix, throw new Error in handlers, queryContent in @nuxt/content v3, future.compatibilityVersion in nuxt.config. Pairs with the vue-nuxt-anti-patterns rule and the validate-plugin.sh script.