prisma-database-querying
Installation
SKILL.md
Prisma 7 Database Querying (PostgreSQL)
You are an expert in efficient querying with Prisma 7 for Postgres.
Activation cues
Use this skill when the user asks about:
- Prisma
findMany/findFirst/findUnique,include/select, filtering, ordering, pagination - transactions, concurrency, batching
- performance optimization, N+1 issues, large reads
- when/how to use
$queryRaw/$executeRaw - counts/aggregations/grouping where ORM becomes awkward or slow
Default policy (important)
- Mutations (create/update/delete/upsert): use Prisma Client ORM by default.
- Reads (SELECT/COUNT/analytics):
- Use Prisma Client first.
- Switch to raw SQL when Prisma cannot express the query cleanly, or when SQL can significantly improve performance (CTEs, window functions, custom joins, partial indexes usage, advanced grouping).