Command Palette

Search for a command to run...

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

prisma-helper

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

Prisma ORM for type-safe database access - schema design, migrations, queries, relations, and connection management When user works with Prisma, database…

shepherdjerredот shepherdjerred★ 85 звёзд на GitHub

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

Prisma Helper Agent

What's New in Prisma 7+ (2025)

  • New prisma-client generator: Replaces deprecated prisma-client-js with better ESM/Bun/Deno support
  • All-TypeScript engine: Faster, lighter ORM without Rust binary engines
  • TypedSQL: Write .sql files with full type safety (v5.19.0+)
  • createManyAndReturn() and updateManyAndReturn(): Bulk operations returning results
  • omit: Exclude fields from queries (opposite of select)
  • Relation load strategies: Choose between join or query loading

Core Concepts

Prisma consists of three main components:

  1. Prisma Schema: Data model definition (models, relations, attributes)
  2. Prisma Migrate: Database migration workflow
  3. Prisma Client: Type-safe query builder

CLI Commands

Command Purpose
prisma init Initialize Prisma in project
prisma generate Generate Prisma Client from schema
prisma migrate dev --name <name> Create and apply migration (development)
prisma migrate deploy Apply pending migrations (production)
prisma db push Push schema to database without migration
prisma db pull Introspect database and update schema
prisma studio Open visual database editor
prisma format Format schema file

Schema Definition

Generator Configuration

Prisma 5.x/6.x (current stable):

generator client {
  provider = "prisma-client-js"
}

Prisma 7+ (new format with runtime options):

generator client {
  provider = "prisma-client"   // replaces "prisma-client-js"
  output   = "./generated/client"
  runtime  = "bun"             // nodejs, deno, bun, workerd
  moduleFormat = "esm"         // esm or cjs
}

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

Model Definition

model User {
  id        Int      @id @default(autoincrement())
  email     String   @unique
  name      String?
  posts     Post[]
  profile   Profile?
  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt

  @@index([email])
  @@map("users")
}

model Post {
  id        Int      @id @default(autoincrement())
  title     String
  content   String?
  published Boolean  @default(false)
  authorId  Int
  author    User     @relation(fields: [authorId], references: [id], onDelete: Cascade)

  @@index([authorId])
}

Field Attributes

Attribute Purpose Example
@id Primary key id Int @id
@@id Composite primary key @@id([a, b])
@unique Unique constraint email String @unique
@@unique Compound unique @@unique([firstName, lastName])
@default Default value @default(now()), @default(uuid())
@updatedAt Auto-update timestamp updatedAt DateTime @updatedAt
@relation Define relationship See relations section
@map Map to database column @map("user_name")
@@map Map to database table @@map("users")
@@index Database index @@index([title, content])
@ignore Exclude from Prisma Client legacyField String @ignore

Default Value Functions

Function Purpose
autoincrement() Auto-incrementing integer
uuid() / uuid(7) UUID generation
cuid() / cuid(2) CUID generation
ulid() ULID generation
nanoid(length) Nano ID generation
now() Current timestamp
dbgenerated(expr) Database-level default

Relations

One-to-One

model User {
  id      Int      @id @default(autoincrement())
  profile Profile?
}

model Profile {
  id     Int  @id @default(autoincrement())
  userId Int  @unique
  user   User @relation(fields: [userId], references: [id])
}

One-to-Many

model User {
  id    Int    @id @default(autoincrement())
  posts Post[]
}

model Post {
  id       Int  @id @default(autoincrement())
  authorId Int
  author   User @relation(fields: [authorId], references: [id])
}

Many-to-Many (Implicit)

model Post {
  id         Int        @id @default(autoincrement())
  c
Полный SKILL.md на GitHub

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

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

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

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

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

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

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

FAQ

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

Prisma ORM for type-safe database access - schema design, migrations, queries, relations, and connection management When user works with Prisma, database schemas, migrations, Prisma Client queries, or mentions prisma commands

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

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

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

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

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

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