skills/prisma-workflow/SKILL.md
Prisma ORM best practices, schema design, migrations, seeding, and query optimization for PostgreSQL. Use when working with database schemas, migrations, or Prisma queries.
npx skillsauth add sabahattinkalkan/antigravity-fullstack-hq prisma-workflowInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
model User {
id String @id @default(cuid())
email String @unique
name String?
role Role @default(USER)
posts Post[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([email])
}
model Post {
id String @id @default(cuid())
title String
content String?
published Boolean @default(false)
author User @relation(fields: [authorId], references: [id], onDelete: Cascade)
authorId String
@@index([authorId])
}
enum Role {
USER
ADMIN
}
schema.prismanpx prisma migrate dev --name descriptive_nameprisma/migrations/npx prisma migrate deploy for productionnpx prisma migrate dev --name add_user_role
npx prisma migrate dev --name create_posts_table
npx prisma migrate dev --name add_index_on_email
const user = await prisma.user.findUnique({
where: { id },
select: { id: true, email: true, name: true }
})
const user = await prisma.user.findUnique({
where: { id },
include: { posts: true }
})
const users = await prisma.user.findMany({
skip: (page - 1) * limit,
take: limit,
orderBy: { createdAt: 'desc' }
})
await prisma.$transaction([
prisma.user.update({ where: { id }, data: { balance: { decrement: 100 } } }),
prisma.order.create({ data: { userId: id, amount: 100 } })
])
select to fetch only needed fieldstake for large tablescreateMany@Injectable()
export class PrismaService extends PrismaClient implements OnModuleInit {
async onModuleInit() {
await this.$connect()
}
}
testing
Generating Excel files with xlsx/exceljs in Node.js. Use when generating .xlsx reports, data exports, dashboards, or spreadsheets from database data.
development
Playwright E2E patterns, Testing Library component tests, test selectors. Use when writing browser tests, component tests, or setting up an E2E testing pipeline for a Next.js or React app.
development
Web design best practices, accessibility, responsive layout, color contrast. Use when auditing a UI for a11y compliance, designing responsive layouts, or establishing design standards across a web app.
tools
TypeScript type system patterns, generics, utility types, and strict mode best practices. Use when writing or reviewing TypeScript code.