{"name":"build-nuxt-vue-app","description":"Builds a Nuxt 3 app with Vue 3 and TypeScript - script setup components, file-based pages and layouts, composables, server routes, and runtime config for secrets. Use when the user wants a Nuxt app, a Vue 3 app with server routes, or asks how Nuxt pages and composables fit together.","category":"frontend","tags":["nuxt","vue","typescript"],"models":["any"],"proven":false,"passing_families":0,"model_testing":"Not yet model-tested; testing Jan 2027","url":"https://theskillvault.ai/skills/build-nuxt-vue-app","api_url":"https://theskillvault.ai/api/skills/build-nuxt-vue-app","raw_url":"https://theskillvault.ai/api/skills/build-nuxt-vue-app/raw","body":"# Build a Nuxt and Vue app\n\nNuxt is the full-stack framework for Vue. Pages, server routes and composables live in one project.\n\n## When to use\n- You are starting a Vue 3 app and want file-based pages.\n- You want server routes and a browser UI in the same repo.\n- You are moving a Vue app onto Nuxt conventions.\n\n## When not to use\n- You want a mostly static content site. build-astro-site fits that better.\n- You already chose SvelteKit. Use build-sveltekit-app.\n\n## Steps\n1. Create the app with `npx nuxi@latest init my-app`. Pick TypeScript. Then `npm install` and `npm run dev`.\n2. Add pages as Vue files in `pages`. `pages/about.vue` becomes `/about`. Use `<script setup lang=\"ts\">`.\n3. Share the chrome with `layouts/default.vue`. Put reusable pieces in `components`.\n4. Keep shared types next to the feature that owns them. Prefer an interface for an object shape.\n5. Put reusable reactive helpers in `composables`. Use VueUse only when it makes a state change easier to see.\n6. Load secrets through runtime config. Private keys stay off `public`. Read them in server code only.\n7. Add JSON routes under `server/api`. Validate input there. Do not trust the browser.\n8. Lazy-load a heavy component with a dynamic import. Check the bundle before you ship.\n9. Build with `npm run build`. Pick the Nuxt preset for your host.\n\n```vue\n<script setup lang=\"ts\">\nconst { data: projects } = await useFetch(\"/api/projects\");\nconst query = ref(\"\");\nconst shown = computed(() => (projects.value ?? []).filter((p) => p.name.includes(query.value)));\n</script>\n\n<input v-model=\"query\" placeholder=\"Filter\" />\n<ul>\n  <li v-for=\"p in shown\" :key=\"p.id\">{{ p.name }}</li>\n</ul>\n```\n\n## Gotchas\n- A value under `runtimeConfig.public` is sent to the browser. Keep API keys and passwords on the private side.\n- `pages` and `server` are conventions. A component in the wrong folder does not become a route.\n- Setup code runs on the server during SSR. Guard `window` and other browser-only APIs.\n- Tailwind is optional. Add it only when the project already uses it.\n\n## Portability\nWorks on Node, or on Vercel, Netlify, Cloudflare or similar with a Nuxt preset. If you use Vue 3 with Vite and no Nuxt, the script setup and composable parts are the same. Another framework such as SvelteKit uses the same idea of file routes and server code.\n\n## Example prompt\n\"Build a Nuxt 3 app with Vue 3 and TypeScript that lists projects from a server route and filters them in a composable.\"\n\n## Done when\n- Pages use script setup and TypeScript.\n- Secrets stay in private runtime config, not in client code.\n- `npm run build` passes.\n\n---\nBased on the Vue 3 Nuxt 3 TypeScript rules file in PatrickJS/awesome-cursorrules (CC0 1.0, public domain). See LICENSE.txt.","files":["LICENSE.txt"],"license":"CC0-1.0","license_name":"CC0 1.0","license_url":"https://creativecommons.org/publicdomain/zero/1.0/","attribution":"Based on work by awesome-cursorrules contributors (vue-3-nuxt-3-typescript rules) (Public domain (CC0 1.0) - rules contributed to PatrickJS/awesome-cursorrules, CC0 1.0), https://github.com/PatrickJS/awesome-cursorrules/blob/b044f956f021b6e8877f16781bcfc466a6a120e9/rules/vue-3-nuxt-3-typescript-cursorrules-prompt-file.mdc; adapted by TheSkillVault, https://theskillvault.ai","install":{"claude_code":"curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/build-nuxt-vue-app/raw' -o ~/'.claude/skills/build-nuxt-vue-app/SKILL.md' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/build-nuxt-vue-app/files/LICENSE.txt' -o ~/'.claude/skills/build-nuxt-vue-app/LICENSE.txt'","cursor":"curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/build-nuxt-vue-app/raw' -o '.cursor/skills/build-nuxt-vue-app/SKILL.md' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/build-nuxt-vue-app/files/LICENSE.txt' -o '.cursor/skills/build-nuxt-vue-app/LICENSE.txt'","agents":"curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/build-nuxt-vue-app/raw' -o '.agents/skills/build-nuxt-vue-app/SKILL.md' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/build-nuxt-vue-app/files/LICENSE.txt' -o '.agents/skills/build-nuxt-vue-app/LICENSE.txt'","mcp_url":"https://theskillvault.ai/mcp","cursor_mcp_deeplink":"cursor://anysphere.cursor-deeplink/mcp/install?name=theskillvault&config=eyJ1cmwiOiJodHRwczovL3RoZXNraWxsdmF1bHQuYWkvbWNwIn0%3D","mcp_config":{"mcpServers":{"theskillvault":{"url":"https://theskillvault.ai/mcp"}}}},"bundles":[],"tested_on":[{"family":"chatgpt","name":"ChatGPT","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"claude","name":"Claude","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"gemini","name":"Gemini","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"grok","name":"Grok","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"llama","name":"Llama","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"deepseek","name":"DeepSeek","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"mistral","name":"Mistral","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"qwen","name":"Qwen","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"kimi","name":"Kimi K","outcome":null,"date":null,"source":null,"counts":false,"stale":false}],"proven_rule":{"threshold":5,"window_days":365,"computed_at":"2026-11-29T03:42:30.374Z"}}