All skills
antfu avatar

/nitro

@d02c484 official
by Anthony Fuantfu/skills5.9k stars
335

Nitro is the framework-agnostic server toolkit (powering Nuxt) for building and deploying web servers anywhere. Use when working with nitro.config, server routes/event handlers, route rules, caching, storage, tasks, websockets, or deploying to Node/Bun/Deno/Cloudflare/Vercel.

Use this Skill: https://skilld.dev/gh/antfu/skills/nitro

This session only. Nothing lands on disk.

SKILL.md

≈71 tokens always: the name and description. ≈831 when used: this file. ≈16k more on demand in 14 files.

The skill is based on Nitro v3 (beta, 3.0.260903), generated at 2026-09-25.

Nitro is a framework-agnostic, deployment-agnostic server toolkit powered by H3 v2, unstorage, and Vite/Rolldown/Rollup. It powers Nuxt and works standalone. From one codebase it builds optimized output for Node.js, Bun, Deno, Cloudflare, Vercel, Netlify, and more.

Key capabilities:

  • Filesystem routing with H3 v2 event handlers, dynamic params, and method suffixes.
  • Route rules for declarative caching, headers, redirects, proxying, and CORS.
  • Caching layer (cached handlers/functions, SWR) on top of the unstorage KV layer.
  • Runtime config overridable via NITRO_* env vars.
  • Tasks (on-demand + scheduled/cron), WebSockets/SSE, a SQL database layer, and OpenAPI auto-docs.
  • Plugins & lifecycle hooks, custom renderer/server entry, and portable deployment presets.

Key v3 changes (vs. nitropack v2): the package is renamed nitropack → nitro with H3 v2 (web-standard Request/Response); auto-imports are removed (import everything explicitly); directory scanning is opt-in via serverDir; useStorage → useKV (nitro/kv) and the storage config option → kv; cache swr now defaults to false. If unsure about v2-vs-v3 APIs, read advanced-migration first.

Core

Topic Description Reference
Routing File-based routes, defineHandler, params, middleware, route rules, errors core-routing
Configuration nitro.config.ts, defineConfig, key options, runtime config core-configuration
Storage unstorage KV, mount points, drivers, dynamic mounts core-storage
Cache defineCachedHandler, defineCachedFunction, SWR, invalidation core-cache
Assets Public assets, compression, server assets via storage core-assets
Rendering Renderer (HTML/SSR), server entry, framework integration core-rendering

Features

Topic Description Reference
Plugins & Hooks definePlugin, runtime lifecycle hooks, error capture features-plugins
Tasks On-demand & scheduled (cron) tasks, runTask features-tasks
WebSocket & SSE defineWebSocketHandler, pub/sub, namespaces, event streams features-websocket
Database Built-in SQL layer via db0, useDatabase, connectors features-database
OpenAPI Auto spec from defineRouteMeta, Scalar/Swagger UIs features-openapi

Advanced / Deployment

Topic Description Reference
Deployment Presets Runtimes & providers, compatibility dates, platform integration deploy-presets
v2 → v3 Migration Package rename, nitro/* imports, H3 v2 API, preset changes advanced-migration

Source: SKILL.md on GitHub

No alerts3d3 checks · Risk SAFE
  • Gen Agent Trust Hub3d

    The skill provides comprehensive documentation and guidelines for Nitro v3, a server toolkit for building web applications. It includes security best practices like using parameterized queries to prevent SQL injection and authenticating task execution. No security issues were detected.

  • Socket3d

    No alerts

  • Snyk3d

    Risk: LOW · No issues

Signed by skilld at d02c484. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 4 days ago
Other metadata
metadata
{
  "author": "Anthony Fu",
  "version": "2026.9.25",
  "source": "Generated from https://github.com/nitrojs/nitro, scripts located at https://github.com/antfu/skills"
}

README badge

README badge for antfu/skills/nitro