Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

prisma-7

БесплатноБез исполняемых скриптовНе проверен

Use when working with database schema, migrations, queries, or relations via Prisma 7 (Rust-free client, TypedSQL, Omit API).

Fusengineот Fusengine★ 36 звёзд на GitHub

Об этом скилле

Covers Prisma 7's Rust-free TypeScript ORM: the v6→v7 breaking changes (provider renamed `prisma-client-js` → `prisma-client`, output path now REQUIRED, import moves from `@prisma/client` to the generated path, database driver adapters now required — e.g. `@prisma/adapter-pg` for PostgreSQL — and config moved to a TS config file — `prisma7.config.ts` from 7.10 (`prisma.config.*` still read as fallback), `prisma.config.ts` on 7.0–7.9), schema modeling, CRUD/relations/filtering/pagination/transactions, TypedSQL for type-safe raw queries, and the Omit API for excluding sensitive fields.

Also spans migrations (baselining, shadow database, squashing, zero-downtime), performance (N+1 detection, connection pooling, Accelerate), security (SQL injection prevention, row-level security, encryption), per-database guides (PostgreSQL, MySQL, SQLite, CockroachDB, Turso — MongoDB unsupported in all Prisma 7.x releases through 7.10; stay on 6.19), framework integrations (Next.js, Astro, SvelteKit, Remix, and more), and deployment across Vercel/Netlify/Railway/AWS Lambda/Cloudflare Workers/Docker. Includes SOLID-compliant TypeScript interface references for schema design. Does not cover Better Auth's own database adapter configuration in depth (better-auth) — this skill is the ORM layer itself.

Prisma 7 ORM

Rust-free TypeScript ORM with 90% smaller bundles and 3x faster queries.

Agent Workflow (MANDATORY)

Before ANY implementation, spawn 3 agents in parallel, one Agent call each with a name:

  1. fuse-ai-pilot:explore-codebase - Analyze existing schema and database patterns
  2. fuse-ai-pilot:research-expert - Verify latest Prisma 7 docs via Context7/Exa
  3. mcp__context7__query-docs - Check breaking changes and migration guide

After implementation, run fuse-ai-pilot:sniper for validation.


Overview

When to Use

  • Database access in Next.js 16 applications
  • Type-safe queries with full TypeScript inference
  • Schema-first database modeling and migrations
  • Complex queries requiring TypedSQL
  • Excluding sensitive fields with Omit API

Why Prisma 7

Feature Benefit
Rust-free client 90% smaller bundles (14MB → 1.6MB)
Query performance Up to 3x faster on large datasets
ESM-first Native ES modules, modern architecture
TypedSQL Type-safe raw SQL queries
Omit API Exclude sensitive fields globally
Driver adapters Direct database driver integration

Breaking Changes from v6

Critical Migration Points

Change v6 v7
Provider prisma-client-js prisma-client
Output path Optional REQUIRED
Import @prisma/client ./generated/prisma/client
Drivers Built-in Adapter required
Config Schema only prisma7.config.ts (7.10+, falls back to prisma.config.*); prisma.config.ts (7.0–7.9) — edit the file prisma init created

Required Schema Changes

Provider must be prisma-client with explicit output path. No more generation to node_modules.

Driver Adapters Required

PostgreSQL requires @prisma/adapter-pg, MySQL requires @prisma/adapter-mariadb, SQLite requires @prisma/adapter-better-sqlite3.

Notable 7.x Minor Releases (current stable: 7.10.1)

Version Change
7.4 Query plan caching in Prisma Client; partialIndexes preview feature (@@index(..., where: raw("...")))
7.5 Nested transaction rollbacks via savepoints
7.6 prisma postgres link; @prisma/adapter-pg accepts a connection string directly
7.7 prisma bootstrap command
7.8 queryPlanCacheMaxSize option on PrismaClient (0 disables the cache)
7.9 CLI tab completions; AI-agent safety checks extended to db push --accept-data-loss; TypeScript perf regression from 7.0 fixed
7.10 Prisma Studio bound to 127.0.0.1 with origin checks; @prisma/adapter-mariadb accepts an existing pool

Prisma 8 is in release candidate only (npm latest tag points to 8.0.0-rc.*) — pin prisma@7 / @prisma/client@7 for stable installs.


SOLID Architecture

Module Structure

Database code organized in modules/cores/db/:

  • modules/cores/db/prisma.ts - Singleton PrismaClient
  • modules/cores/db/generated/ - Generated client
  • prisma/schema.prisma - Schema definition
  • prisma/migrations/ - Migration history
  • prisma7.config.ts - Prisma configuration (7.0–7.9: prisma.config.ts)

File Organization

File Purpose
prisma.ts Singleton client
schema.prisma Models, relations
seed.ts Database seeding

Key Concepts

Singleton Pattern (Next.js)

Prevent multiple PrismaClient instances during hot-reload. Use globalThis to cache instance in development.

Output Path

Generated client goes to custom path, not node_modules. Import from generated folder.

Driver Adapters

Direct database driver integration for

Полный SKILL.md на GitHub

Установить prisma-7 в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

100-getting-started/02-prisma-orm/100-quickstart/100-prisma-postgres.md100-getting-started/02-prisma-orm/100-quickstart/200-sqlite.md100-getting-started/02-prisma-orm/100-quickstart/300-postgresql.md100-getting-started/02-prisma-orm/100-quickstart/400-mysql.md100-getting-started/02-prisma-orm/100-quickstart/500-sql-server.md100-getting-started/02-prisma-orm/100-quickstart/600-planetscale.md100-getting-started/02-prisma-orm/100-quickstart/700-cockroachdb.md100-getting-started/02-prisma-orm/100-quickstart/800-mongodb.md100-getting-started/02-prisma-orm/200-add-to-existing-project/100-prisma-postgres.md100-getting-started/02-prisma-orm/200-add-to-existing-project/200-sqlite.md100-getting-started/02-prisma-orm/200-add-to-existing-project/300-postgresql.md100-getting-started/02-prisma-orm/200-add-to-existing-project/400-mysql.md100-getting-started/02-prisma-orm/200-add-to-existing-project/500-sql-server.md100-getting-started/02-prisma-orm/200-add-to-existing-project/600-planetscale.md100-getting-started/02-prisma-orm/200-add-to-existing-project/700-cockroachdb.md100-getting-started/02-prisma-orm/200-add-to-existing-project/800-mongodb.md100-getting-started/03-prisma-postgres/100-from-the-cli.md100-getting-started/03-prisma-postgres/100-quickstart/100-kysely.md100-getting-started/03-prisma-postgres/100-quickstart/200-drizzle-orm.md100-getting-started/03-prisma-postgres/100-quickstart/300-typeorm.md100-getting-started/03-prisma-postgres/100-quickstart/50-prisma-orm.md100-getting-started/03-prisma-postgres/110-import-from-existing-database-postgresql.md100-getting-started/03-prisma-postgres/115-import-from-existing-database-mysql.md100-getting-started/03-prisma-postgres/index.md100-getting-started/_components/_create-prisma-client.md100-getting-started/_components/_create-project.md100-getting-started/_components/_explore-data.md100-getting-started/_components/_install-prisma-client.md100-getting-started/_components/_next-steps.md100-getting-started/_components/_prerequisites.md100-getting-started/_components/_prisma-init.md100-getting-started/index.md200-orm/025-getting-started/10-quickstart.md200-orm/025-getting-started/20-add-to-existing-project.md200-orm/025-getting-started/_category_.json200-orm/025-getting-started/index.md200-orm/050-overview/100-introduction/100-what-is-prisma.md200-orm/050-overview/100-introduction/200-why-prisma.md200-orm/050-overview/100-introduction/250-should-you-use-prisma.md200-orm/050-overview/100-introduction/300-data-modeling.md

FAQ

Что делает скилл prisma-7?

Use when working with database schema, migrations, queries, or relations via Prisma 7 (Rust-free client, TypedSQL, Omit API).

Как установить скилл prisma-7?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл prisma-7 запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить prisma-7 с