auth-security
Best practices for implementing JWT, API Keys, OAuth 2.1, and RBAC in a NitroStack application.
Complete migration guide from Prisma ORM v6 to v7 covering all breaking changes. Use when upgrading Prisma versions, encountering v7 errors, or migrating existing projects. Triggers on "upgrade to prisma 7", "prisma 7 migration", "prisma-client generator", "driver adapter
$ npx -y skills add nitrocloudofficial/nitrostack --skill prisma-upgrade-v7 --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/prisma-upgrade-v7Context preview
The summary Claude sees to decide when to auto-load this skill.
Complete migration guide from Prisma ORM v6 to v7 covering all breaking changes. Use when upgrading Prisma versions, encountering v7 errors, or migrating existing projects. Triggers on "upgrade to prisma 7", "prisma 7 migration", "prisma-client generator", "driver adapter
name: prisma-upgrade-v7 description: Complete migration guide from Prisma ORM v6 to v7 covering all breaking changes. Use when upgrading Prisma versions, encountering v7 errors, or migrating existing projects. Triggers on "upgrade to prisma 7", "prisma 7 migration", "prisma-client generator", "driver adapter required". license: MIT metadata: author: prisma version: "7.6.0"
Complete guide for migrating from Prisma ORM v6 to v7. This upgrade introduces significant breaking changes around the new `prisma-client` generator, driver adapters, `prisma.config.ts`, explicit environment loading, and generated client entrypoints.
Reference this skill when:
| Priority | Category | Impact | Prefix | |----------|----------|--------|--------| | 1 | Schema Migration | CRITICAL | `schema-changes` | | 2 | Database Connectivity | CRITICAL | `driver-adapters` | | 3 | Module System | CRITICAL | `esm-support` | | 4 | Config and Env | HIGH | `prisma-config`, `env-variables` | | 5 | Removed Features | HIGH | `removed-features` | | 6 | Accelerate | HIGH | `accelerate-users` |
Prisma 7 has no MongoDB connector. Do not apply any step in this guide to a project with `provider = "mongodb"` — see the `prisma-mongodb-upgrade` skill for the actual decision (stay on v6 deliberately vs migrate to Prisma Next).
1. Update packages to v7 2. Choose your module format (`esm` by default, `cjs` if needed) 3. Update TypeScript configuration 4. Update the schema generator block 5. Create `prisma.config.ts` 6. Install and configure a driver adapter for SQL providers 7. Update Prisma Client imports 8. Update client instantiation 9. Replace deprecated helper patterns like `Prisma.validator` 10. Run `prisma generate` and test
# Update packages npm install @prisma/client@7 npm install -D prisma@7 # Install a driver adapter (PostgreSQL or Prisma Postgres via direct TCP) npm install @prisma/adapter-pg pg # Install dotenv for env loading npm install dotenv # Regenerate client npx prisma generate
| Change | v6 | v7 | |--------|----|----| | Module format | Implicit / mixed | ESM-first, `moduleFormat = "cjs"` supported | | Generator provider | `prisma-client-js` | `prisma-client` is the default, while `prisma-client-js` still exists for legacy setups | | Output path | Auto (node_modules) | Required explicit | | Driver adapters | Optional | Required for SQL providers | | Config file | `.env` + schema | `prisma.config.ts` | | Env loading | Automatic | Manual (dotenv) | | Generated entrypoints | Single package export | `client`, `browser`, `models`, `enums` entrypoints | | Type-safe query fragments | `Prisma.validator()` | TypeScript `satisfies` | | Middleware | `$use()` | Client Extensions | | Metrics | Preview feature | Removed |
Detailed migration guides for each breaking change:
references/esm-support.md - ESM and CommonJS configuration references/schema-changes.md - Generator, output, imports, and generated entrypoints references/driver-adapters.md - Required driver adapter setup references/prisma-config.md - New configuration file references/env-variables.md - Environment variable loading references/removed-features.md - Middleware, metrics, and CLI flags references/accelerate-users.md - Special handling for Accelerate
{
"type": "module"
}If you need to stay on CommonJS, keep your app as CJS and set `moduleFormat = "cjs"` in the generator block instead of forcing ESM.
{
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "bundler",
"target": "ES2023",
"strict": true,
"esModuleInterop": true
}
}// Before (v6)
generator client {
provider = "prisma-client-js"
}
// After (v7)
generator client {
provider = "prisma-client"
output = "../generated/prisma"
// Optional if you need CommonJS:
// moduleFormat = "cjs"
}import 'dotenv/config'
import { defineConfig, env } from 'prisma/config'
export default defineConfig({
schema: 'prisma/schema.prisma',
migrations: {
path: 'prisma/migrations',
},
datasource: {
url: env('DATABASE_URL'),
},
})# PostgreSQL npm install @prisma/adapter-pg pg # MySQL npm install @prisma/adapter-mariadb mariadb # SQLite npm install @prisma/adapter-better-sqlite3 better-sqlite3 # Prisma Postgres in standard Node.js apps (recommended) npm install @prisma/adapter-pg pg # Prisma Postgres serverless driver (edge/serverless) npm insta
The full-stack TypeScript framework to build, test, and deploy production-ready MCP servers and AI-native apps.
Repo: nitrocloudofficial/nitrostack
Best practices for implementing JWT, API Keys, OAuth 2.1, and RBAC in a NitroStack application.
Best practices and guidelines for bootstrapping, defining modules, using dependency injection, managing server lifecycles, and handling events in the…
Best practices for implementing and applying Guards, Interceptors, Middleware, Pipes, and Exception Filters in the NitroStack SDK.
Guidelines and patterns for defining Tools, Resources, and Prompts in a NitroStack application with schema validation via Zod, including caching,…
Best practices for linking tools to interactive frontend widgets using @Widget and @nitrostack/widgets SDK (including state sync, tool calling, display modes,…
Prisma ORM CLI commands reference covering init, generate, migrate, db, dev, studio, validate, format, debug, and mcp. Use for ORM/database CLI workflows, not…