prisma-workflow
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.
More from henryxv/study-platform
nextjs-frontend-testing
Use this skill whenever the user wants to set up, improve, or run frontend tests (unit, component, and E2E) for a Next.js (App Router) + TypeScript + Tailwind + shadcn/ui project using Vitest/Jest, React Testing Library, and Playwright.
18landing-page-guide-v2
Create distinctive, high-converting landing pages that combine proven conversion elements with exceptional design quality. Build beautiful, memorable landing pages using Next.js 14+ and ShadCN UI that avoid generic AI aesthetics while following the 11 essential elements framework.
9cartographer
Maps and documents the codebase. Generates `docs/CODEBASE_MAP.md` with architecture diagrams, module relationships, and data flow. Use when the user asks to "map the code", "explain the architecture", or "update documentation".
7backend-dev-guidelines
Comprehensive backend development guide for Langfuse's Next.js 14/tRPC/Express/TypeScript monorepo. Use when creating tRPC routers, public API endpoints, BullMQ queue processors, services, or working with tRPC procedures, Next.js API routes, Prisma database access, ClickHouse analytics queries, Redis queues, OpenTelemetry instrumentation, Zod v4 validation, env.mjs configuration, tenant isolation patterns, or async patterns. Covers layered architecture (tRPC procedures → services, queue processors → services), dual database system (PostgreSQL + ClickHouse), projectId filtering for multi-tenant isolation, traceException error handling, observability patterns, and testing strategies (Jest for web, vitest for worker).
6web-design-guidelines
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
6vercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
6