Generated banner for Nuxt
Generated logo for Nuxt

Nuxt

Anthony FuCommunityCreated by Anthony Fu

  • Skill
  • Tool integration
  • Software development
  • MIT
  • Low risk

From the author

Nuxt full-stack Vue framework with SSR, auto-imports, and file-based routing. Use when working with Nuxt apps, server routes, useFetch, middleware, or hybrid rendering.
— the description by Anthony Fu

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

Nuxt is a full-stack Vue framework designed for universal deployment. This skill provides essential guidance on Nuxt 5, covering its directory structure, file-based routing, server-side rendering, and Nitro-based server engine. It includes best practices for data fetching, state management, and modular architecture, helping developers leverage features like auto-imports and hybrid rendering.

What it does

  • Explains the Nuxt 5 directory structure and configuration conventions.
  • Details file-based routing, including typed and case-sensitive routes.
  • Provides guidance on data fetching using useFetch and $fetch.
  • Covers server-side rendering, hybrid rendering, and Nitro server integration.
  • Explains how to extend applications using Nuxt Layers and modules.
  • Outlines lifecycle hooks for build-time and runtime customization.

When to use it

  • When starting a new full-stack project with Vue and Nuxt.
  • When migrating existing projects to Nuxt 5 and Nitro v3.
  • When implementing server-side rendering or hybrid rendering strategies.
  • When creating reusable application layers or custom Nuxt modules.
  • When optimizing data fetching patterns and state management in SSR environments.

Advantages

  • Provides standardized patterns for Nuxt 5 development.
  • Simplifies complex concepts like Nitro server integration and lifecycle hooks.
  • Offers clear guidance on project structure and file-based routing.
  • Supports efficient code reuse through the Nuxt Layers system.

Usage examples

“How do I structure my Nuxt 5 project directory?”
The agent explains the default app/ directory structure for Vue code and the root-level placement for server/, public/, and nuxt.config.ts files.
“Explain how to use layers to share components between projects.”
The agent provides instructions on using the extends property in nuxt.config.ts to import layers from local directories, git repositories, or npm packages.
“How do I hook into the page navigation lifecycle?”
The agent shows how to use nuxtApp.hook('page:finish', ...) within a plugin to execute code after navigation completes.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/antfu/nuxt/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip nuxt.zip -d .agents/skills

Documentation by Anthony Fu

Nuxt is a full-stack Vue framework that provides server-side rendering, file-based routing, auto-imports, and a powerful module system. It uses Nitro as its server engine for universal deployment across Node.js, serverless, and edge platforms.

The skill is based on Nuxt 5.x (5.0.0-0), generated at 2026-11-05.

Directory layout: the default srcDir is app/ — Vue app code (app.vue, components/, composables/, pages/, etc.) lives under app/, while server/, shared/, public/, modules/, layers/ and nuxt.config.ts stay at the project root. The ~/@ aliases point at app/; use ~~/@@ for the root.

Nuxt 5 note: Nuxt 5 makes many former experimental flags the default. The biggest shifts for agents: server code moves to Nitro v3 (h3 v2, Web-standard Request/Response), server utilities import from nuxt/server and are no longer auto-imported by default, $fetch/useFetch are typed from generated route types, routing is case-sensitive and typed by default, and the bundler is Vite 8 (Rolldown). Nuxt 5 requires Node 22.19/24.11+. A Nitro v2 compatibility layer (nitroLegacy) keeps older server code building during migration. See individual references for details.

Core

TopicDescriptionReference
Directory StructureNuxt 4 app/ srcDir, shared/, aliases, conventionscore-directory-structure
Configurationnuxt.config.ts, app.config.ts, aliases, Nuxt 5 defaults, jiti removal, experimentalcore-config
CLI CommandsDev server, build, generate, preview, and utility commandscore-cli
RoutingFile-based routing, case-sensitive + typed routes, named views, layout props, middlewarecore-routing
Data FetchinguseFetch, useAsyncData, $fetch, typed routes, createUseFetch factories, cachingcore-data-fetching
ModulesCreating and using Nuxt modules, Nuxt Kit utilitiescore-modules
DeploymentPlatform-agnostic deployment with Nitro, Vercel, Netlify, Cloudflarecore-deployment

Features

TopicDescriptionReference
Composables Auto-importsVue/Nuxt composables, custom composables, shared/, useAnnouncerfeatures-composables
Components Auto-importsComponent naming, lazy loading, hydration strategiesfeatures-components-autoimport
Built-in ComponentsNuxtLink, NuxtPage, NuxtLayout, NuxtAnnouncer, ClientOnly, and morefeatures-components
State ManagementuseState composable, SSR-friendly state, Pinia integrationfeatures-state
Server RoutesAPI routes, nuxt/server imports, Nitro v3 (h3 v2), sessions, middlewarefeatures-server

Rendering

TopicDescriptionReference
Rendering ModesUniversal (SSR), client-side (SPA), hybrid rendering, route rulesrendering-modes

Best Practices

TopicDescriptionReference
Data Fetching PatternsEfficient fetching, caching, parallel requests, error handlingbest-practices-data-fetching
SSR & HydrationAvoiding context leaks, hydration mismatches, composable patternsbest-practices-ssr

Advanced

TopicDescriptionReference
LayersExtending applications with reusable layersadvanced-layers
Lifecycle HooksBuild-time, runtime, and server hooksadvanced-hooks
Module AuthoringPublishable modules with Nuxt Kit, keyed composables, dependenciesadvanced-module-authoring

Files

references/core-deployment.md


name: deployment description: Deploying Nuxt applications to various hosting platforms

Deployment

Nuxt is platform-agnostic thanks to Nitro, its server engine. You can deploy to almost any platform with minimal configuration—Node.js servers, static hosting, serverless functions, or edge networks.

Full list of supported platforms: https://nitro.build/deploy

Deployment Modes

Node.js Server
# Build for Node.js
nuxt build

# Run production server
node .output/server/index.mjs

Environment variables:

  • PORT or NITRO_PORT (default: 3000)

  • HOST or NITRO_HOST (default: 0.0.0.0)

Static Generation
# Generate static site
nuxt generate

Output in .output/public/ - deploy to any static host.

Prerender Configuration

Use the top-level prerender option (routes, ignore, crawlLinks) rather than nitro.prerender; Nitro-specific options (concurrency, failOnError) remain in nitro.prerender.

export default defineNuxtConfig({
  prerender: { crawlLinks: true, routes: ['/sitemap.xml'], ignore: ['/dynamic'] },
})
Preset Configuration
// nuxt.config.ts
export default defineNuxtConfig({
  nitro: {
    preset: 'vercel', // or 'netlify', 'cloudflare-pages', etc.
  },
})

Or via environment variable:

NITRO_PRESET=vercel nuxt build

When helping users choose a deployment platform, consider their needs:

Vercel

Best for: Projects wanting zero-config deployment with excellent DX

# Install Vercel CLI
npm i -g vercel

# Deploy
vercel

Pros:

  • Zero configuration for Nuxt (auto-detects)

  • Excellent preview deployments for PRs

  • Built-in analytics and speed insights

  • Edge Functions support

  • Great free tier for personal projects

Cons:

  • Can get expensive at scale (bandwidth costs)

  • Vendor lock-in concerns

  • Limited build minutes on free tier

Recommended when: User wants fastest setup, values DX, building SaaS or marketing sites.


Netlify

Best for: JAMstack sites, static-heavy apps, teams needing forms/identity

# Install Netlify CLI
npm i -g netlify-cli

# Deploy
netlify deploy --prod

Pros:

  • Great free tier with generous bandwidth

  • Built-in forms, identity, and functions

  • Excellent for static sites with some dynamic features

  • Good preview deployments

  • Split testing built-in

Cons:

  • SSR/serverless functions can be slower than Vercel

  • Less optimized for full SSR apps

  • Build minutes can run out on free tier

Recommended when: User has static-heavy site, needs built-in forms/auth, or prefers Netlify ecosystem.


Cloudflare Pages

Best for: Global performance, edge computing, cost-conscious projects

# Build with Cloudflare preset
NITRO_PRESET=cloudflare-pages nuxt build

Pros:

  • Unlimited bandwidth on free tier

  • Excellent global edge network (fastest TTFB)

  • Workers for edge computing

  • Very cost-effective at scale

  • D1, KV, R2 for data storage

Cons:

  • Workers have execution limits (CPU time)

  • Some Node.js APIs not available in Workers

  • Less mature than Vercel/Netlify for frameworks

Recommended when: User prioritizes performance, global reach, or cost at scale.


GitHub Actions + Self-hosted/VPS

Best for: Full control, existing infrastructure, CI/CD customization

# .github/workflows/deploy.yml
name: Deploy
on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      
      - run: npm ci
      - run: npm run build
      
      # Deploy to your server (example: rsync to VPS)
      - name: Deploy to server
        run: rsync -avz .output/ user@server:/app/

Pros:

  • Full control over build and deployment

  • No vendor lock-in

  • Can deploy anywhere (VPS, Docker, Kubernetes)

  • Free CI/CD minutes for public repos

  • Customizable workflows

Cons:

  • Requires more setup and maintenance

  • Need to manage your own infrastructure

  • No built-in preview deployments

  • SSL, scaling, monitoring are your responsibility

Recommended when: User has existing infrastructure, needs full control, or deploying to private/enterprise environments.


Quick Decision Guide

NeedRecommendation
Fastest setup, small teamVercel
Static site with formsNetlify
Cost-sensitive at scaleCloudflare Pages
Full control / enterpriseGitHub Actions + VPS
Docker/KubernetesGitHub Actions + Container Registry
Serverless APIsVercel or AWS Lambda

Docker Deployment

FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

FROM node:20-alpine
WORKDIR /app
COPY --from=builder /app/.output .output
ENV PORT=3000
EXPOSE 3000
CMD ["node", ".output/server/index.mjs"]
docker build -t my-nuxt-app .
docker run -p 3000:3000 my-nuxt-app

<!-- Source references: - https://nuxt.com/docs/getting-started/deployment - https://nitro.build/deploy - https://nuxt.com/docs/getting-started/prerendering -->

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Security

What our scanner noticed· Low risk

  • Instructions that use the network

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
Anthony Fu
Publisher
Anthony Fu (Community)
Source
antfu/skills · skills/nuxt · commit f63e9ec
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE.md)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Anthony Fu.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download nuxt.zip