Prisma ORM — паттерны работы с базой данных

★ 7.5 · general

prisma-orm is a Claude Code skill that provides ready-to-use Prisma ORM patterns for Node.js/TypeScript backends. It covers schema design with models, enums, indexes, and relations; query patterns that avoid N+1 via `include` and `select`; upsert; both batch and interactive transactions; soft delete implemented through Prisma middleware; and safe raw SQL using parameterized `$queryRaw`. The skill also includes CLI commands for the full migration lifecycle — `migrate dev`, `migrate deploy`, `db push`, and `prisma studio` — along with the single PrismaClient instance pattern to prevent connection exhaustion during Next.js HMR. Built-in rules enforce security defaults: always select only needed fields, never expose passwords, and never interpolate user input into raw queries. Use it whenever you build or extend a database layer with Prisma, from early prototyping through production.