nitro
/nitro
Build and deploy universal JavaScript servers with Nitro v3. Use when working with nitro.config.ts, defineNitroConfig, defineHandler, defineConfig, server.ts entry, filesystem routing, route rules, useStorage, defineCachedHandler, useDatabase, definePlugin, runtime hooks, Vercel/Cloudflare deployment, or migrating from Nitro v2/nitropack.
- Author
- getsentry ↗
- Repository
- junior ↗
- Licence
- Apache-2.0
- Last repository change
- 26.10.2026
Assessment and security
- Files in this package
- 5
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
What it does and when to use it
Build and deploy universal JavaScript servers with Nitro v3. Use when working with nitro.config.ts, defineNitroConfig, defineHandler, defineConfig, server.ts entry, filesystem routing, route rules, useStorage, defineCachedHandler, useDatabase, definePlugin, runtime hooks, Vercel/Cloudflare deployment, or migrating from Nitro v2/nitropack.
Original author description
Build and deploy universal JavaScript servers with Nitro v3. Use when working with nitro.config.ts, defineNitroConfig, defineHandler, defineConfig, server.ts entry, filesystem routing, route rules, useStorage, defineCachedHandler, useDatabase, definePlugin, runtime hooks, Vercel/Cloudflare deployment, or migrating from Nitro v2/nitropack.
How it works
- Step 1: Classify the request
- Step 2: Apply core guardrails
- Step 3: Implement
- Step 4: Validate
- Step 5: Troubleshoot
SKILL.md preview
--- name: nitro description: Build and deploy universal JavaScript servers with Nitro v3. Use when working with nitro.config.ts, defineNitroConfig, defineHandler, defineConfig, server.ts entry, filesystem routing, route rules, useStorage, defineCachedHandler, useDatabase, definePlugin, runtime hooks, Vercel/Cloudflare deployment, or migrating from Nitro v2/nitropack. --- Build, configure, and deploy Nitro v3 applications using correct APIs and patterns. ## Step 1: Classify the request | Request type | Read first | | ---------------------------------------------------------------------- | ------------------------------------------- | | API surface, handler signatures, imports, config options | `references/api-surface.md` | | Setup, routing, caching, storage, plugins, frameworks, common patterns | `references/common-use-cases.md` | | Build failures, runtime errors, deployment issues, migration from v2 | `references/troubleshooting-workarounds.md` | Load only the reference(s) matching the request. If the task spans categories, load relevant files. ## Step 2: Apply core guardrails 1. Import `defineHandler` from `"nitro"`, not `defineEventHandler` (v2 API). 2. Import config helpers from subpaths: `"nitro/config"`, `"nitro/cache"`, `"nitro/storage"`, `"nitro/database"`, `"nitro/runtime-config"`, `"nitro/types"`. 3. Use web standard `event.req` (Request) for body/headers — not v2 utilities like `readBody` or `getHeader`. 4. Never return from middleware unless intentionally terminating the request. 5. Only `GET`/`HEAD` requests are cached by `defineCachedHandler`; other methods bypass automatically. 6. `useDatabase` and `defineTask` require experimental feature flags. 7. Use `"nitro"` package name, not `"nitropack"` (v2). ## Step 3: Implement 1. For new projects, use `defineConfig` from `"nitro"` in `nitro.config.ts` or add `nitro()` plugin from `"nitro/vite"` to `vite.config.ts`. 2. For server entry, export a web-compatible `fetch(Request): Response` handler from `server.ts`, or use `server.node.ts` for Express/Fastify. 3. For filesystem routes, place handlers in `routes/` or `api/` with `[param]` for dynamic segments and `.get.ts`/`.post.ts` for method-specific routes. 4. For caching, use `defineCachedHandler` from `"nitro/cache"` with `maxAge` and `swr` options. 5. For storage, use `useStorage(namespace)` from `"nitro/storage"` and configure drivers via `storage` config. 6. For plugins, create files in `plugins/` directory using `definePlugin` and hook into `request`, `response`, `error`, or `close`. 7. For deployment, set `preset` in config or use `NITRO_PRESET` env var; Vercel/Netlify/Cloudflare are auto-detected. ## Step 4: Validate 1. Run `nitro dev` and verify routes respond correctly. 2. Run `nitro build` and check `.output/server/` contains expected files. 3. For cached routes, verify cache headers (`etag`, `cache-control`) and 304 responses. 4. For storage, verify data persists across requests with configured driver. 5. For deployment, verify the preset produces correct output format. ## Step 5: Troubleshoot 1. `defineEventHandler is not defined` → use `defineHandler` from `"nitro"` (v3 API). 2. `Cannot find module 'nitropack'` → rename to `"nitro"` in imports and package.json. 3. Route not matched → check file is in `routes/` or `api/`, or verify `routes` config mapping. 4. Middleware returning responses unexpectedly → ensure middleware does not return a value. 5. For detailed diagnostics, read `references/troubleshooting-workarounds.md`.
Files in this package (5)
- SKILL.md 4 KB
- SOURCES.md 10 KB
- references/api-surface.md 22 KB
- references/common-use-cases.md 11 KB
- references/troubleshooting-workarounds.md 11 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · getsentry/junior | 90 | Apache-2.0 |
| TerminalSkills/skills | 100 | Apache-2.0 |
| antfu/skills | 90 | MIT |
Database snapshot: 13.11.2026 · package version 79d0f5711b3c (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100nitropack
Builds portable server applications with Nitro (nitropack), the server engine behind Nuxt, Analog and SolidStart: file-based routes, middleware, a storage layer, response caching, scheduled tasks and one build that targets Node.js, Bun, Deno, Cloudflare, Vercel, Netlify and AWS.… - 90nuxt
Nuxt 4 full-stack Vue framework. app directory layout, file-based routing, layouts and middleware, useFetch and useAsyncData, useState, server routes on Nitro, rendering modes and route rules, modules and layers, deployment, plus Nitro v3 and Nuxt 5 preparation. Use when working… - 95nuxt-server
Nuxt 5 server-side development with Nitro v3, h3 v2, API routes, middleware, and database integration. Use when creating server routes, integrating D1/Drizzle, or migrating from Nitro v2. - 100nitro-api-development
使用 Nitro v3 框架和 H3 编写服务端 API 的技能。适用于初始化纯后端 Nitro 项目、 为 Vite 项目赋予全栈能力、编写符合规范的 CRUD 接口、以及使用 Drizzle ORM 进行数据库交互。当需要开发新的 Nitro 接口、初始化 Nitro 配置、 或咨询 Nitro 开发规范时使用此技能。 - 100nuxt-fullstack
Use this skill when building full-stack universal Vue applications with Nuxt 3, file-based routing, Nitro server engine, and SEO modules. - 100nuxt-core
Nuxt 5 core framework with project setup, routing, SEO, error handling, and Vite 8/Nitro v3 configuration. Use when creating Nuxt 5 apps, setting up routing, or migrating config.