nitro

von sentry

Erstellen und bereitstellen universeller JavaScript-Server mit Nitro v3. Verwenden bei der Arbeit mit nitro.config.ts, defineNitroConfig, defineHandler, defineConfig, server.ts…

npx skills add https://github.com/getsentry/junior --skill nitro

Build, configure, and deploy Nitro v3 applications using correct APIs and patterns.

Step 1: Classify the request

Request typeRead first
API surface, handler signatures, imports, config optionsreferences/api-surface.md
Setup, routing, caching, storage, plugins, frameworks, common patternsreferences/common-use-cases.md
Build failures, runtime errors, deployment issues, migration from v2references/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.

Mehr Skills von sentry

generate-frontend-forms
sentry
Leitfaden zur Erstellung von Formularen mit Sentrys neuem Formularsystem. Verwenden Sie dies bei der Implementierung von Formularen, Formularfeldern, Validierung oder Auto-Save-Funktionalität.
official
sentry-snapshots-cocoa
sentry
Vollständige Sentry-Snapshots-Einrichtung für Apple/Cocoa-Projekte. Verwenden, wenn aufgefordert, "SnapshotPreviews einzurichten", "Apple-Snapshot-Tests einzurichten", "Apple-Snapshots hochzuladen nach…
official
architecture-review
sentry
Codebase-Gesundheitsprüfung auf Mitarbeiterebene. Erkennt monolithische Module, stille Fehler, Typsicherheitslücken, Testabdeckungslücken und LLM-Freundlichkeitsprobleme.
official
linear-type-labeler
sentry
Klassifiziert Linear-Issues und weist ein Typ-Label aus der Label-Taxonomie des Sentry-Workspace zu, basierend auf dem Inhalt des Titels und der Beschreibung jedes Issues.
official
sentry-flutter-sdk
sentry
Vollständige Sentry SDK-Einrichtung für Flutter und Dart. Verwenden, wenn aufgefordert wird, "Sentry zu Flutter hinzuzufügen", "sentry_flutter zu installieren", "Sentry in Dart einzurichten" oder Fehlerkonfiguration…
official
sentry-svelte-sdk
sentry
Vollständige Sentry-SDK-Einrichtung für Svelte und SvelteKit. Verwenden, wenn aufgefordert wird, "Sentry zu Svelte hinzuzufügen", "Sentry zu SvelteKit hinzuzufügen", "@sentry/sveltekit zu installieren" oder zu konfigurieren…
official
vercel-react-best-practices
sentry
Richtlinien zur Leistungsoptimierung von React und Next.js von Vercel Engineering. Diese Fähigkeit sollte beim Schreiben, Überprüfen oder Refaktorisieren von React/Next.js…
official
sentry-tanstack-start-sdk
sentry
Vollständige Sentry SDK-Einrichtung für TanStack Start React. Verwenden, wenn aufgefordert wird, "Sentry zu TanStack Start hinzuzufügen", "@sentry/tanstackstart-react zu installieren" oder Fehlerkonfiguration…
official