prisma-workflow
Skill2 starsChanged 10 months agoMITView on GitHub
Prisma ORM best practices, schema design, migrations, seeding, and query optimization for PostgreSQL. Use when working with database schemas, migrations, or Prisma queries.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- sabahattink/antigravity-fullstack-hqword for word, first seen Sep 20, 2026
- UreckChan/Skillstheir own version, first seen Jul 8, 2026
Other versions2 projects use a version of this.
Word for word · 1
- sabahattink/antigravity-fullstack-hq★ 30100% same
Edited · 0
None found.
Wrote their own version · 1
- UreckChan/Skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository3 other files it gives its agents.
- nestjs-patternsSkill
- nextjs-app-routerSkill
- prompt-engineeringSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 97
Always index foreign keys
- Very specific: line 98
Use select to fetch only needed fields
- Very specific: line 99
Use take for large tables
- Distinctive: line 101
Use transactions for related operations
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Prisma Workflow
Schema Design
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
}Migration Workflow
- Edit
schema.prisma npx prisma migrate dev --name descriptive_name- Review generated SQL in
prisma/migrations/ - Test on development
npx prisma migrate deployfor production
Good Migration Names
npx prisma migrate dev --name add_user_role
npx prisma migrate dev --name create_posts_table
npx prisma migrate dev --name add_index_on_emailQuery Patterns
Select Specific Fields
const user = await prisma.user.findUnique({
where: { id },
select: { id: true, email: true, name: true }
})Include Relations
const user = await prisma.user.findUnique({
where: { id },
include: { posts: true }
})Pagination
const users = await prisma.user.findMany({
skip: (page - 1) * limit,
take: limit,
orderBy: { createdAt: 'desc' }
})Transactions
await prisma.$transaction([
prisma.user.update({ where: { id }, data: { balance: { decrement: 100 } } }),
prisma.order.create({ data: { userId: id, amount: 100 } })
])Performance Tips
- Always index foreign keys
- Use
selectto fetch only needed fields - Use
takefor large tables - Batch operations with
createMany - Use transactions for related operations
Prisma Service (NestJS)
@Injectable()
export class PrismaService extends PrismaClient implements OnModuleInit {
async onModuleInit() {
await this.$connect()
}
}Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

