Prisma ORM is a Node.js and TypeScript database toolkit that lets applications work with databases through a programming interface instead of writing every query directly in SQL. Developers use it with databases including PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB, and CockroachDB. The catalogue add-ons provide agent rules, skills, hooks, agents, and other workflows for using Prisma.
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.
git clone --depth 1 https://github.com/prisma/ormWrote 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/prisma/orm/directory-layout)<a href="https://agentmods.dev/rules/prisma/orm/directory-layout"><img src="https://agentmods.dev/badge/rules/prisma/orm/directory-layout/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/rules/prisma/orm/directory-layout"><img src="https://agentmods.dev/badge/rules/prisma/orm/directory-layout.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.00000 | $0.00903 |
| Opus 5.5 | $0.00000 | $0.00361 |
| Sonnet 5.5 | $0.00000 | $0.00181 |
| Haiku 4.5 | $0.00000 | $0.00090 |
Grade A, and why
directory-layout 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 11d 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- directory-layout — 86% identical, 97 lines differ
How it starts
The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Directory Layout — Numbered Prefixes, Domains, Layers, and Planes
Numbered prefixes in directory names show dependency direction: a lower number may be imported by a higher one, never the reverse.
Directory Structure
packages/
1-framework/ # Domain 1: Framework (target-agnostic)
0-foundation/ 1-core/ 2-authoring/ 3-tooling/
2-sql-family/ # Domain 2: SQL family
1-core/ 2-authoring/ 3-tooling/ 4-lanes/ 5-runtime/ 9-family/
2-mongo-family/ # Domain 2: Mongo family
3-targets/ # Domain 3: Targets, one folder per database
postgres/
1-target/ # @internal/target-postgres
2-adapter/ # @internal/adapter-postgres
3-driver/ # @internal/driver-postgres
4-codec-testkit/ # @internal/postgres-codec-testkit
9-facade/ # @internal/postgres
sqlite/ mongo/ # the same shape
mysql/
1-mysql/ # MySQL: 1-target, 2-adapter, 3-driver, 9-facade
2-mariadb/ # MariaDB: 1-target, 2-adapter, 3-driver, 9-facade (ADR 325)
3-live-tests/ # @internal/mysql-live-tests: ORM suites run against both servers
3-extensions/ # Domain 3: Extension packs
pgvector/
Planes (shared, migration, runtime) are not directories. architecture.config.json assigns them per file glob.
Families vs Targets
- Family code (
packages/2-<family>-family/**): contract types, operations, emitter hooks, lanes, family runtime. It never names a concrete database. - Target code (
packages/3-targets/<db>/**): everything one database needs. A new database adds one folder with the same numbered packages; a database without a codec testkit skips4-. See ADR 278. - Extension packs (
packages/3-extensions/**) stay outside the target folders, including packs that work with only one database.
Registering a target package
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.
- 11d ago Changed · +1 lines 54a8544def6b
- 19d ago Changed · +3 lines 6f452b57371e
- 1mo ago Changed · -43 lines 72fe25e1cb2e
- 3mo ago First seen · 95 lines · 0 tokens per session scan A acf969f71fb8
directory-layout is a cursor rule published in the GitHub repository prisma/orm (47,810 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 903 tokens. 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-08-30.
directory-layout compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| directory-layoutprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |
| prismabernierllc/agents-environment-config | Cursor rule | 11 | yesterday | MIT | A | 0 | Cursor |
| typescript-stylebobbylkchao/ai-phone-agent | Cursor rule | 110 | 5d ago | MIT | A | 0 | Cursor |
| drizzle-patternsopenstory-so/openstory | Cursor rule | 730 | today | MIT | A | 0 | Cursor |
| security-archivevltpkg/vltpkg | Cursor rule | 578 | 3d ago | BSD-2-Clause-Patent | A | 0 | Cursor |
| code-validation-workflowvltpkg/vltpkg | Cursor rule | 578 | 3d ago | BSD-2-Clause-Patent | A | 0 | Cursor |
| release-ts-sdkaptos-labs/aptos-ts-sdk | Cursor rule | 118 | 4d ago | none | A | 42 | Cursor |