prisma-workflow
Strictly enforces Prisma 7 + Next.js App Router protocols. Manages the lifecycle from initialization to deployment. Use for all database tasks.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Prisma Workflow (v7 Protocol)
Purpose
To execute a zero-tolerance, type-safe integration of Prisma 7 with Next.js, strictly adhering to the "Prisma Postgres" adapter pattern.
Critical Directives
You are strictly forbidden from guessing configuration. You must consult the reference files for every step.
-
Version 7 Only: If you generate
provider = "prisma-client-js", you have failed. -
No Hallucinations: Do not invent
DATABASE_URLvalues. -
Interactive Init: You cannot run
npx prisma inityourself. You must guide the user.
Workflow Phases
Phase 1: Bootstrap & Configuration
Reference: references/setup-protocol.md
-
Action: Guide user through the interactive
npx prisma init --db. -
Constraint: Wait for user confirmation. Do not proceed until
.envexists. -
Verification: Check
prisma.config.tsfordotenv/configand Ensureschema.prismahas NOurlin the datasource.
Phase 2: Architecture & Schema
Reference: references/v7-guardrails.md
-
Action: Define models in
schema.prisma. -
Constraint: Use
output = "../app/generated/prisma"(Custom Output). -
Constraint: Use
postgres://(TCP) schema, neverprisma+postgres://(HTTP).
Phase 3: System Implementation
Reference: references/implementation-patterns.md
-
Action: Create the Global Singleton at
lib/prisma.ts. -
Constraint: Must use
@prisma/adapter-pg. -
Constraint: Imports must end in
/client.
Phase 4: Verification
Reference: references/verification-suite.md
-
Action: Create
scripts/test-database.ts. -
Action: Add
db:testanddb:studiotopackage.json. -
Constraint: Never mark a task complete until
npm run db:testpasses.
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-26
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!