nuxt-skills
Installation
SKILL.md
Nuxt Skills
Project layout
- Source directory: Prefer
srcDir: 'app'soapp/holds pages, components, composables, layouts, middleware. Reference as~/(e.g.~/components/,~/composables/). - Pages:
app/pages/*.vue— file-based routing. UsedefinePageMeta({ middleware: 'auth' })for route-level middleware. - Layouts:
app/layouts/default.vue(or named). Use<NuxtLayout>orapp.vueto wrap content. - Components:
app/components/— auto-imported; use PascalCase names in templates.
Composables
- Location:
app/composables/*.ts— auto-imported. Export functions nameduseXxx. - Pattern: Accept
Ref<T> | Tfor flexibility; normalize withtypeof x === 'string' ? ref(x) : xwhen needed. - Data fetching: Prefer
useAsyncDatawith a unique key (e.g.time-blocks-${uid}-${day}), async fetcher, andwatchfor reactive params. Return{ data, refresh, pending }.