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 monkilabs/opencastle --skill prisma-databasegit clone --depth 1 https://github.com/monkilabs/opencastleWrote 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/monkilabs/opencastle/prisma-database)<a href="https://agentmods.dev/skills/monkilabs/opencastle/prisma-database"><img src="https://agentmods.dev/badge/skills/monkilabs/opencastle/prisma-database/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/monkilabs/opencastle/prisma-database"><img src="https://agentmods.dev/badge/skills/monkilabs/opencastle/prisma-database.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.00035 | $0.00528 |
| Opus 5.5 | $0.00014 | $0.00211 |
| Sonnet 5.5 | $0.00007 | $0.00106 |
| Haiku 4.5 | $0.00003 | $0.00053 |
Grade A, and why
prisma-database 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 19d 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 — 38 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Prisma Database
Project schema and connection details: .opencastle/stack/database-config.md. Docs: https://www.prisma.io/docs
Migration rules
npx prisma migrate devin development only — never in production; it can reset data. CI/production usesnpx prisma migrate deploy.- Inspect
prisma/migrations/<timestamp>/migration.sqlbefore applying. Destructive operations (drops, column rewrites) need an explicit backfill step added to the migration. - Never edit an already-applied migration file — the checksum is recorded and will fail. Write a corrective migration instead.
npx prisma generateafter every schema change; a stale client silently mismatches the DB.npx prisma db pushskips migration history entirely — prototyping only.
Schema gotchas
- Use
cuid()/uuid()for IDs, not serial increments, in anything distributed. - Renaming a field without matching
@map/@@mapproduces a column drop plus add, not a rename. Check both when renaming. - Add
@@indexexplicitly on frequently queried columns — the schema does not imply them. - Write
@relationexplicitly, includingonDelete(e.g.onDelete: Cascade); leaving it implicit means the delete behavior is whatever the connector defaults to. - Include
createdAt @default(now())andupdatedAt @updatedAtfor auditability.
Client and queries
Hot reload in dev creates a new PrismaClient per reload and exhausts the connection pool. Use the global singleton:
const globalForPrisma = globalThis as unknown as { prisma?: PrismaClient };
export const prisma = globalForPrisma.prisma ?? new PrismaClient();
if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma;
Use select for narrow reads, include for relations, prisma.$transaction for multi-step writes. Catch error code P2002 for unique-constraint violations and handle it rather than letting it surface as a 500.
Other commands: prisma studio (visual editor), prisma db pull (introspect), prisma db seed, prisma validate, prisma format.
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.
- 19d ago Changed · -2 lines · -2 tokens per session 7abc711f9540
- 20d ago First seen · 40 lines · 37 tokens per session scan A 37bf342fec20
prisma-database is a skill published in the GitHub repository monkilabs/opencastle (80 stars, last pushed 3d ago), licensed MIT. It adds 35 tokens to every session and 528 once invoked, about $0.0001 per session on Opus 5.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-10-04.
Other skills, from other repositories
transactional-patterns
Use when defining or debugging Spring Boot 3 database transaction boundaries, rollback, propagation, optimistic-lock retries, or commit-bound events. For duplicate HTTP commands use idempotency-patterns; for reactive transactions use webflux-reactive-patterns.
flyway-migrations
Use when creating database migrations, schema changes, seed data, or any SQL that modifies database structure. Covers Flyway naming conventions, versioning, and safe migration patterns.
spring-data-redis
Use when implementing caching, session storage, rate limiting, or any Redis integration. Covers cache-aside pattern, key naming, TTL strategy, and serialization config.
spring-data-jpa
Use when generating JPA entities, repositories, queries, or anything touching the persistence layer. Covers entity conventions, N+1 prevention, projections, and query patterns.
idempotency-patterns
Use when making retried HTTP commands or message processing safe against duplicate effects, including database-backed request keys, payload conflicts and concurrent retries. Do not apply caching as a substitute for business idempotency.
multi-tenancy
Use when implementing tenant resolution, database or schema isolation, tenant-aware JPA, reactive tenant context, migrations, caching, jobs, or authorization in Spring Boot 3.