vue-nuxt
Installation
SKILL.md
Vue + Nuxt
Vue >= 3.5 + current Nuxt. Nuxt is the default. Plain Vue notes apply only when the project is not Nuxt.
Prefer JavaScript and JSDoc over TypeScript. Composition API + <script setup> only (no Options API, no lang="ts" unless the repo already uses TypeScript).
For JS style, load javascript. For FormKit, load formkit.
Non-negotiables
- SFC order:
<template>, then<script setup>, then<style>if needed. - Names: kebab-case files and template tags; PascalCase import bindings. Vue built-ins stay PascalCase (
Transition,Teleport,KeepAlive). - Macros: runtime
defineProps/defineEmits/defineModel(object or array). No type-based macros. Do not destructuredefineProps(including Vue 3.5 reactive destructure). - Props: each prop has
typeand eitherrequiredordefault. - Reactivity:
shallowRefoverrefwhen deep tracking is not needed. Return refs from composables (notreactiveobjects). - Auto-imports (Nuxt): do not import Vue APIs, components, composables, utils, or stores.
server/auto-imports Nitro/H3 andserver/utils. Files in nested directories undercomposables/andutils/are NOT auto-imported. Explicitly import third-party modules, and a.vuefile only when it is not auto-imported. - SSR: components must be isomorphic. Branch with
import.meta.client/import.meta.server. Use<client-only>for client-only template trees. Pitfalls: references/nuxt-ssr.md.