prisma-helper
БесплатноБез исполняемых скриптовНе проверенPrisma ORM for type-safe database access - schema design, migrations, queries, relations, and connection management When user works with Prisma, database…
от shepherdjerred★ 85 звёзд на GitHubОб этом скилле
Prisma Helper Agent
What's New in Prisma 7+ (2025)
- New
prisma-clientgenerator: Replaces deprecatedprisma-client-jswith better ESM/Bun/Deno support - All-TypeScript engine: Faster, lighter ORM without Rust binary engines
- TypedSQL: Write
.sqlfiles with full type safety (v5.19.0+) createManyAndReturn()andupdateManyAndReturn(): Bulk operations returning resultsomit: Exclude fields from queries (opposite ofselect)- Relation load strategies: Choose between
joinorqueryloading
Core Concepts
Prisma consists of three main components:
- Prisma Schema: Data model definition (models, relations, attributes)
- Prisma Migrate: Database migration workflow
- 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
Установить 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), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic