mcpField
N
nitro

nitro

github.com/antfuDevelopment6.0k2.7k installsUpdated 6d ago
Repository

About nitro

A Nitro v3 skill for server-side developers, covering this framework- and deployment-agnostic toolkit built on H3 v2. It addresses routing, caching, storage, real-time connections, databases, and deployment presets, as well as migration changes from v2.

Key features

  1. 01Filesystem routing and route rules
  2. 02KV storage and caching
  3. 03Runtime config and lifecycle hooks
  4. 04Scheduled tasks, WebSockets, and SSE
  5. 05SQL database layer and OpenAPI docs
  6. 06Deployment presets for multiple platforms

Use cases

  1. 01Configure routes, caching, and response headers for a server
  2. 02Add scheduled tasks or WebSocket handlers
  3. 03Connect a SQL data layer and generate OpenAPI docs
  4. 04Deploy a service to different runtimes or platforms

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/antfu/skills --skill nitro

After installing, type/nitroin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

GENERATION.md
references/
advanced-migration.md
core-assets.md
core-cache.md
core-configuration.md
core-rendering.md
core-routing.md
core-storage.md
deploy-presets.md
features-database.md
features-openapi.md
features-plugins.md
features-tasks.md
features-websocket.md

Details

From the project README

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

TopicDescriptionReference
RoutingFile-based routes, defineHandler, params, middleware, route rules, errorscore-routing
Configurationnitro.config.ts, defineConfig, key options, runtime configcore-configuration
Storageunstorage KV, mount points, drivers, dynamic mountscore-storage
CachedefineCachedHandler, defineCachedFunction, SWR, invalidationcore-cache
AssetsPublic assets, compression, server assets via storagecore-assets
RenderingRenderer (HTML/SSR), server entry, framework integrationcore-rendering

Features

TopicDescriptionReference
Plugins & HooksdefinePlugin, runtime lifecycle hooks, error capturefeatures-plugins
TasksOn-demand & scheduled (cron) tasks, runTaskfeatures-tasks
WebSocket & SSEdefineWebSocketHandler, pub/sub, namespaces, event streamsfeatures-websocket
DatabaseBuilt-in SQL layer via db0, useDatabase, connectorsfeatures-database
OpenAPIAuto spec from defineRouteMeta, Scalar/Swagger UIsfeatures-openapi

Advanced / Deployment

TopicDescriptionReference
Deployment PresetsRuntimes & providers, compatibility dates, platform integrationdeploy-presets
v2 → v3 MigrationPackage rename, nitro/* imports, H3 v2 API, preset changesadvanced-migration

Comments

Markdown supported