Get the FREE Ultimate OpenClaw Setup Guide →

nuxt

npx machina-cli add skill antfu/skills/nuxt --openclaw
Files (1)
SKILL.md
3.4 KB

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 3.x, generated at 2026-01-28.

Core

TopicDescriptionReference
Directory StructureProject folder structure, conventions, file organizationcore-directory-structure
Configurationnuxt.config.ts, app.config.ts, runtime config, environment variablescore-config
CLI CommandsDev server, build, generate, preview, and utility commandscore-cli
RoutingFile-based routing, dynamic routes, navigation, middleware, layoutscore-routing
Data FetchinguseFetch, useAsyncData, $fetch, caching, refreshcore-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 APIs, Nuxt composables, custom composables, utilitiesfeatures-composables
Components Auto-importsComponent naming, lazy loading, hydration strategiesfeatures-components-autoimport
Built-in ComponentsNuxtLink, NuxtPage, NuxtLayout, ClientOnly, and morefeatures-components
State ManagementuseState composable, SSR-friendly state, Pinia integrationfeatures-state
Server RoutesAPI routes, server middleware, Nitro server enginefeatures-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 AuthoringCreating publishable Nuxt modules with Nuxt Kitadvanced-module-authoring

Source

git clone https://github.com/antfu/skills/blob/main/skills/nuxt/SKILL.mdView on GitHub

Overview

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.

How This Skill Works

Nuxt boots a universal Vue app with Nitro as the server engine, enabling SSR, server routes, and deployment across environments. It uses a file-based routing system and auto-imports to reduce boilerplate; you write pages and API routes in a predictable structure and Nuxt handles hydration and client/server boundaries.

When to Use It

  • Building a Nuxt 3 app that benefits from server-side rendering (SSR) and client hydration.
  • Implementing server-side API routes or server middleware using Nitro.
  • Leveraging useFetch, $fetch, or useAsyncData for data fetching with caching and SSR.
  • Using file-based routing, auto-imports for components/composables to speed up development.
  • Deploying across Node.js, serverless, or edge platforms with Nitro's universal deployment.

Quick Start

  1. Step 1: Create a Nuxt 3 project: npx nuxi init my-app
  2. Step 2: Install and start: cd my-app && npm install && npm run dev
  3. Step 3: Add a page and a server route (server/api/hello.ts) to see SSR and API routing in action

Best Practices

  • Use useFetch with caching and refresh strategies to optimize SSR hydration and data freshness.
  • Keep SSR hydration safe by avoiding browser-only globals during server-side rendering.
  • Organize functionality with modular Nuxt Kits, modules, and reusable composables.
  • Leverage middleware and server routes to implement authentication and authorization cleanly.
  • Plan deployments with Nitro to ensure smooth hosting across Node.js, serverless, and edge environments.

Example Use Cases

  • SEO-optimized marketing site using SSR for fast first paint and crawlability.
  • E-commerce product pages with dynamic routes and server API for data fetching.
  • Authentication flow protected by middleware across protected routes.
  • Admin dashboard using SSR data fetching and client-side hydration for interactivity.
  • Edge-friendly Nuxt app deployed via Nitro to run near users worldwide.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers