Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add hamzabellouch/agent-skills --skill prisma-orm-patterns-and-migrationsgit clone --depth 1 https://github.com/hamzabellouch/agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/hamzabellouch/agent-skills/prisma-orm-patterns-and-migrations)<a href="https://agentmods.dev/skills/hamzabellouch/agent-skills/prisma-orm-patterns-and-migrations"><img src="https://agentmods.dev/badge/skills/hamzabellouch/agent-skills/prisma-orm-patterns-and-migrations/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/hamzabellouch/agent-skills/prisma-orm-patterns-and-migrations"><img src="https://agentmods.dev/badge/skills/hamzabellouch/agent-skills/prisma-orm-patterns-and-migrations.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00058 | $0.01434 |
| Opus 5 | $0.00029 | $0.00717 |
| Sonnet 5 | $0.00012 | $0.00287 |
| Haiku 4.5 | $0.00006 | $0.00143 |
Grade A, and why
prisma-orm-patterns-and-migrations scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 181 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Prisma ORM Patterns & Migrations Architecture Guide
Production reference for building scalable Node.js and TypeScript applications using Prisma ORM, optimizing database access, executing zero-downtime migrations, and managing connections.
1. Schema Modeling & Relationship Patterns
1.1 Explicit Many-to-Many vs. Implicit Many-to-Many
- Implicit: Prisma manages join table automatically. Use when join table needs no additional metadata.
- Explicit: User defines join table model. Use when storing timestamps or custom payload on relation records (e.g.,
role,assignedAt).
// Explicit Many-to-Many with Relation Attributes
model User {
id String @id @default(uuid())
email String @unique
memberships UserOrganization[]
}
model Organization {
id String @id @default(uuid())
name String
members UserOrganization[]
}
model UserOrganization {
userId String
organizationId String
role String @default("MEMBER")
assignedAt DateTime @default(now())
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
organization Organization @relation(fields: [organizationId], references: [id], onDelete: Cascade)
@@id([userId, organizationId])
@@index([organizationId])
}
1.2 Referential Actions & Performance Indexing
- Always explicitly define foreign key indexes using
@@index([foreignKeyField])to optimize join performance and cascading updates/deletes. - Set appropriate
onDeleteactions (Cascade,SetNull,Restrict,NoAction).
2. Query Optimization & Preventing N+1 Problems
2.1 Fine-Grained Projection (select vs include)
Avoid blind include queries that fetch all fields from related tables. Use explicit select payloads to reduce payload over-fetching.
// ❌ ANTI-PATTERN: Over-fetching full nested objects
const posts = await prisma.post.findMany({
include: { author: true, comments: true }
});
// ✅ PRODUCTION PATTERN: Explicit field selection
const posts = await prisma.post.findMany({
select: {
id: true,
title: true,
author: {
select: {
id: true,
name: true
}
},
_count: {
select: { comments: true }
}
}
});
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 181 lines · 58 tokens per session scan A 52bcdf844e39
prisma-orm-patterns-and-migrations is a skill published in the GitHub repository hamzabellouch/agent-skills (4 stars, last pushed 1mo ago), licensed MIT. It adds 58 tokens to every session and 1,434 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
drizzle
Drizzle TypeScript ORM with SQL-like syntax. Use for database access.
prisma
Prisma TypeScript ORM with migrations. Use for database access.
neo4j-driver-javascript-skill
Neo4j JavaScript/TypeScript Driver v6 — driver lifecycle, executeQuery, managed transactions (executeRead/executeWrite), session.run, Integer handling, JSON serialization, record access, async/await patterns, TypeScript types, error handling, and connection setup for Node.js and browser. Use when writing JS/TS code…
database-orm-expert
Expert guide for database schema design, ORM tools (Prisma 6, Drizzle ORM, TypeORM), migrations, query optimization, and type-safe SQL patterns in TypeScript / Panduan ahli untuk desain skema database, ORM tools (Prisma 6, Drizzle ORM, TypeORM), migrasi, optimasi query, dan pola SQL type-safe di TypeScript.
typescript-react-nextjs-patterns
Production-grade TypeScript reference for React & Next.js frontend development. Covers type narrowing, component Props, generic hooks, discriminated unions, as const, satisfies, Zod validation, TanStack Query, server/client boundaries, forms, state management, performance, accessibility, debugging, and code review.…
prisma
TypeScript and Prisma ORM best practices for schema design, type-safe queries, migrations, and error handling. Use when writing Prisma schemas, building database access layers, or debugging query performance in TypeScript projects.