nitro
What it does
This skill explains how to build a web server with Nitro, a server toolkit that runs on many hosting services. It is for developers building APIs or the back-end part of a website.
When to use it
- ✓When you are building server routes or API endpoints in a Nitro project.
- ✓When you want to add caching, scheduled tasks or storage to a server.
- ✓When you want to deploy a server to a platform such as Node, Cloudflare or Vercel.
Skill link
https://github.com/antfu/skills/blob/main/skills/nitro/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Help me set up a Nitro server with an API route that caches its results and deploys to Cloudflare.”
5 new skills a week. 1 minute to read.
How it works
The agent follows the Nitro guidance on routing, settings and deployment, using the newer version's rules where they differ from older ones.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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.
nitropackv2): the package is renamednitropack→nitrowith H3 v2 (web-standardRequest/Response); auto-imports are removed (import everything explicitly); directory scanning is opt-in viaserverDir;useStorage→useKV(nitro/kv) and thestorageconfig option →kv; cacheswrnow defaults tofalse. 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 |
FAQ
Is this for the newest Nitro version?
Yes. It is based on Nitro v3 and notes where the older version works differently.
Does Nitro work with Nuxt?
Yes. Nitro is the server engine behind Nuxt, and it also works on its own.
Which hosting services are supported?
The guidance covers many options, including Node, Bun, Deno, Cloudflare and Vercel.
Details
Original description by the author
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.
repo: antfu/skills
Popularity
- GitHub stars
- 6.0k
- Ranking position
- #14440
- License
- MIT
- Updated
- 10/30/2026
Comments
- …
More skills from this repository
antfu-create-pr
6.0kHelps your agent open a clear GitHub pull request from your branch, with a plain summary of what changed and why.
antfu-issue-triage
6.0kHelps your agent sort through open GitHub issues and pull requests, spotting duplicates and fixed items, then asks you before acting.
antfu-query
6.0kLets your agent question you one step at a time about a plan or idea until the two of you share a clear, tested understanding.
antfu-simplify
6.0kHelps your agent cut your code changes down to the smallest correct version, removing parts that are not needed.
Similar skills
api-connector-builder
280kHas your agent build new API connections following the existing pattern. Use when you need to add one more integration without creating a new way of doing things.
api-design
280kHelps your agent design REST APIs following best practices. It's useful for defining how APIs communicate, how errors are shown, and how to organize data.
backend-patterns
280kHelps your agent with server-side architecture patterns and database optimization. It's useful for building or reviewing code that runs on the server.