nitro
できること
このスキルは、多くのホスティングサービスで動くサーバーツールキットNitroで、Webサーバーを作る方法を説明します。APIやWebサイトのバックエンドを作る開発者のためのものです。
使う場面
- ✓Nitroプロジェクトでサーバーのルートや APIエンドポイントを作っているとき。
- ✓サーバーにキャッシュ、定期タスク、ストレージを追加したいとき。
- ✓Node、Cloudflare、Vercelなどのプラットフォームにサーバーをデプロイしたいとき。
スキルのリンク
https://github.com/antfu/skills/blob/main/skills/nitro/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“キャッシュ付きのAPIルートを持つNitroサーバーを設定して、Cloudflareにデプロイするのを手伝ってください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、ルーティング、設定、デプロイに関するNitroの指針に従います。古いバージョンと異なる部分は、新しいバージョンのルールを使います。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)を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 |
よくある質問
最新のNitroバージョン向けですか?
はい。Nitro v3を基にしており、古いバージョンとの違いも書かれています。
NitroはNuxtで使えますか?
はい。NitroはNuxtの裏側のサーバーエンジンで、単独でも使えます。
どのホスティングサービスに対応していますか?
Node、Bun、Deno、Cloudflare、Vercelなど多くの選択肢を扱います。
詳細
作者による元の説明
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
人気
- GitHubのスター
- 6.0k
- ランキング
- #14440
- ライセンス
- MIT
- 更新日
- 2026/10/30
コメント
- …
このリポジトリの他のスキル
antfu-create-pr
6.0kブランチから、変更内容と理由をわかりやすくまとめたGitHubのプルリクエストを、エージェントが開けるよう支援します。
antfu-issue-triage
6.0k開いているGitHubのissueとプルリクエストを整理し、重複や修正済みのものを見つけて、操作の前に確認を取るようエージェントを支援します。
antfu-query
6.0k計画やアイデアについて一度に一つずつ質問し、二人で明確でテスト済みの理解に至るまでエージェントが問いかけます。
antfu-simplify
6.0kコードの変更を、必要な部分だけを残した最小限の正しい形に減らすようエージェントを支援します。
似ているスキル
api-connector-builder
280kエージェントが既存のパターンに従って、新しいAPI連携を構築します。新しい方式を作らずに、もう一つ連携を追加したいときに使います。
api-design
280kエージェントがベストプラクティスに沿ってREST APIを設計できるようにします。APIの通信方法、エラーの表示方法、データの整理方法を決めるのに役立ちます。
backend-patterns
280kエージェントのサーバーサイドのアーキテクチャパターンとデータベースの最適化を支援します。サーバー上で動くコードを作成またはレビューするときに役立ちます。