nuxt

Guides building Nuxt 4 applications with SSR, file-based routing, and auto-imports.

1|Updated Jul 2, 2026
One-click install
npx skills add https://github.com/filippolmt/skills --skill nuxt-filippolmt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nuxt
Source: https://github.com/filippolmt/skills/tree/main/skills/nuxt
Command: npx skills add https://github.com/filippolmt/skills --skill nuxt-filippolmt

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Developers working with Nuxt need accurate, version-specific guidance on its conventions—file-based routing, SSR data fetching, auto-imports, and the Nitro server engine—without digging through scattered documentation or mixing up Nuxt 3 and Nuxt 4 behaviors. ## Core Features & Use Cases - Framework Reference Coverage: Provides detailed references for directory structure, configuration, routing, data fetching (useFetch, useAsyncData, createUseFetch), modules, and deployment across Node.js, serverless, and edge platforms. - Best Practices Guidance: Documents SSR-safe patterns, hydration mismatch prevention, caching strategies, and efficient data fetching to avoid common production bugs. - Advanced Extensibility: Covers layers, lifecycle hooks, and publishable module authoring with Nuxt Kit for teams building reusable Nuxt infrastructure. - Use Case: When asked to add an authenticated API layer to a Nuxt 4 app, the assistant consults the server routes and data fetching references to produce correct server/api handlers and a createUseFetch composable with shared interceptors. ## Quick Start Ask the assistant to help you build or fix a Nuxt feature, such as "create a server route with cached data fetching in my Nuxt 4 app".

Frequently Asked Questions about nuxt

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fetch data in Nuxt without double fetching on server and client?

Use useFetch or useAsyncData instead of calling $fetch directly in setup. These composables fetch on the server, serialize the result into the payload, and hydrate it on the client so the request runs only once.

What changed in Nuxt 4 directory structure compared to Nuxt 3?

Nuxt 4 moves all Vue app code into an app/ srcDir, so components, pages, and composables live under app/ while server/, shared/, and nuxt.config.ts stay at the root. The ~ and @ aliases now point to app/, and ~~ or @@ point to the project root.

How do I create a reusable typed fetch composable in Nuxt?

Use the createUseFetch factory exported from app/composables to build a typed composable with shared baseURL, headers, and interceptors. Pass a function instead of an object when you need to enforce options or access useNuxtApp inside setup context.

Why does my Nuxt app show hydration mismatch errors?

Hydration mismatches occur when server-rendered HTML differs from the client render, often caused by browser APIs like localStorage, random values, or time-based output in setup. Use useCookie, useState, ClientOnly components, or import.meta.client guards to keep output consistent.

Can Nuxt deploy to Cloudflare, Vercel, or a Node.js server?

Yes, Nuxt uses the Nitro server engine, which supports Node.js, static generation, serverless, and edge platforms through presets. Set the preset in nuxt.config.ts under nitro.preset or via the NITRO_PRESET environment variable before building.

How do I share components and composables across multiple Nuxt projects?

Use Nuxt layers, which let you package components, composables, pages, and config into a reusable unit consumed via the extends option in nuxt.config.ts. Layers can come from npm packages, git repositories, local directories, or the auto-scanned layers/ folder.