awesome-cursor-rules-mdc is a generator that creates Cursor MDC rule files from structured library information, using semantic search and language models to gather and organize guidance. Developers use it to produce reusable rules for libraries in Cursor, and the catalogue includes 200 of those rules.
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 agentmods add rules/sanjeed5/awesome-cursor-rules-mdc/prismagit clone --depth 1 https://github.com/sanjeed5/awesome-cursor-rules-mdcWrote 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/rules/sanjeed5/awesome-cursor-rules-mdc/prisma)<a href="https://agentmods.dev/rules/sanjeed5/awesome-cursor-rules-mdc/prisma"><img src="https://agentmods.dev/badge/rules/sanjeed5/awesome-cursor-rules-mdc/prisma.svg" alt="Measured on agentmods" 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 | $0.01759 | $0.01759 |
| Opus 5 | $0.00879 | $0.00879 |
| Sonnet 5 | $0.00352 | $0.00352 |
| Haiku 4.5 | $0.00176 | $0.00176 |
Grade A, and why
prisma 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 yesterday.
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 — 248 lines — stays where its author put it; the contents beside it link to each section on GitHub.
prisma Best Practices
Prisma is the definitive Type-first ORM for modern TypeScript applications. Adhere to these guidelines for optimal performance, maintainability, and type safety, leveraging the latest TypeScript/WASM engine for a superior developer experience.
1. Code Organization & Client Management
Always use prisma.config.ts for configuration and ensure a single, globally accessible PrismaClient instance.
✅ GOOD: Type-Safe Configuration (prisma.config.ts)
Configure Prisma CLI with full type safety using defineConfig or satisfies PrismaConfig. This is the standard for Prisma ORM v7+.
// prisma.config.ts
import 'dotenv/config';
import { defineConfig, env } from 'prisma/config'; // v7+ config import
export default defineConfig({
schema: 'prisma/schema.prisma',
migrations: {
path: 'prisma/migrations',
seed: 'tsx prisma/seed.ts', // Use tsx for TypeScript seed scripts
},
datasource: {
url: env('DATABASE_URL'), // Always use environment variables for sensitive data
},
});
✅ GOOD: Singleton PrismaClient Instance
Prevent connection pool exhaustion and memory leaks, especially in hot-reloading development environments like Next.js.
// lib/prisma.ts
import { PrismaClient } from '@prisma/client'; // Import generated client
const globalForPrisma = global as unknown as { prisma: PrismaClient };
export const prisma =
globalForPrisma.prisma ||
new PrismaClient({
log: ['query', 'info', 'warn', 'error'], // Essential for observability and debugging
});
if (process.env.NODE_ENV !== 'production') {
globalForPrisma.prisma = prisma; // Persist client across hot reloads in dev
}
❌ BAD: Instantiating new PrismaClient() in every request or module.
// ❌ BAD: Creates multiple PrismaClient instances
async function getPosts() {
const prisma = new PrismaClient(); // This will exhaust your connection pool
await prisma.post.findMany();
}
2. Data Modeling & Schema Design
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.
- yesterday First seen · 248 lines · 1,759 tokens per session scan A e6da261ab64c
prisma is a cursor rule published in the GitHub repository sanjeed5/awesome-cursor-rules-mdc (3,571 stars, last pushed 3mo ago), licensed CC0-1.0. It adds 1,759 tokens to every session, about $0.0088 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 cursor rules, from other repositories
sql-types-imports
Canonical import paths for SQL types.
type-extraction-from-contract
Extract TypeScript types from contract.d.ts and helpers.
drizzle-patterns
Drizzle ORM patterns and database conventions.
manage-hierarchical-resources
Cursor rule "manage-hierarchical-resources" from PaulJPhilp/EffectPatterns, covering manage hierarchical resources and example.
cursorrules
You are an expert in Solidity, TypeScript, Node.js, postgres, Sqlite3, and Prisma.
prisma
Prisma database patterns and conventions for Next.js and TypeScript projects.