Skip to main content

Command menu

Jump to a page or search the catalog

AI Tools & Scripts

Prisma Schema Check

Check Prisma projects before you ship: database passwords in the schema or prisma.config.ts, $queryRawUnsafe built from strings, migrate reset or db push --accept-data-loss on deploy, req.body passed as data, and schema mistakes.

$5.00

What you get: 1 file · 42.42 KB · ZIP

See purchase options

Product description

prisma.$queryRawUnsafeSELECT * FROM "Order" WHERE status = '${status}') looks like the safe tagged template but puts the value straight into the SQL, and a build script with prisma db push --accept-data-loss drops columns on the next deploy. This skill finds those and twelve other Prisma mistakes before they ship, and tells you how to fix each one.

Your agent runs a scanner on your Prisma schema (schema.prisma or a multi-file prisma/schema folder), prisma.config.ts, the JavaScript and TypeScript code that uses Prisma Client, and package.json scripts. It skips comments, tells the tagged $queryRaw template apart from a template string passed to $queryRawUnsafe, follows a SQL variable back to where the file builds it, follows npm run from one script to another, and reads relationMode from the schema file that holds the datasource block. It never runs Prisma, connects to a database or runs your code. It returns BLOCK, REVIEW, or NOT FLAGGED, with the file, line, reason, and a safer approach. Passwords and API keys are never printed.

What it checks

BLOCK (fix before shipping)

  • P01: a database password or Accelerate api_key for a remote host written in the schema, prisma.config.ts or a PrismaClient or driver adapter connection string

  • P02: $queryRawUnsafe or $executeRawUnsafe with SQL built from ${...}, + or +=, and Prisma.raw() on built strings or request values

  • P03: prisma migrate reset, db push --force-reset or db push --accept-data-loss in a build, start, deploy or install script

  • P04: req.body, req.query or await request.json() passed whole as data, where, orderBy, include or select in a route with no validator

REVIEW (check before release)

  • P11: money fields (price, amount, total, balance) stored as Float

  • P12: password fields whose name does not say they hold a hash

  • P13: relation fields without an index when relationMode = "prisma"

  • P14: String ids without a @default

  • P15: email without @unique on user, account and customer models

  • P16: onDelete: Cascade from a user or organization to orders, invoices, payments or audit records

  • P17: raw SQL from a value the file does not show to be a fixed string, or built SQL whose values go in as $1 parameters

  • P18: prisma migrate dev or db push in a deploy script

  • P19: a whole request object in a query in a route that runs a validator first (check that the query uses the validated result)

  • P20: a database password for localhost written in a file, such as a DATABASE_URL fallback

What's included

  • The scanner (Python 3.9+, standard library only)

  • A rules guide with the reason and safer approach for each rule

  • A risky and a safe example Prisma 7 project (schema, prisma.config.ts, Express routes, package.json), and the real report the scanner produces on the risky one

Limits

It reads each file as written: SQL built in one file and run in another, .env files, migration SQL, Dockerfiles and CI files are not followed, and test files, seed scripts and generated Prisma Client folders are skipped. The live database is not checked. NOT FLAGGED is not a guarantee.

Contents

One ZIP file with 18 files: SKILL.md, the scanner in scripts/ (5 Python files), references/rules.md (every rule with its reason and safer approach), and examples/ (10 example files plus report.md, the real scanner output on the risky example).

How to use: This is an agent skill: a folder with a SKILL.md file and Python scripts that an AI coding agent such as Claude Code, Cursor, or Codex CLI can run. Unzip it into your agent's skills folder (for Claude Code: ~/.claude/skills/), then ask your agent to check your project. The scripts also run on their own with Python 3.9 or newer, with nothing to install. They read your files only: no network access, and nothing is sent anywhere.

What you get

1 file · 42.42 KB

  • prisma-schema-check-1.0.0.zipZIP · 42.42 KB

Included in Getly ProGet Pro

LicenseCommercial use allowed
PublishedNov 11, 2026
File size42.42 KB
File formatZIP
Versionv1.0

Tags

prismaormdatabasesql-injectionsecurityai agent skill
R
RR HH

Frequently asked questions

Do I get access instantly?

Yes. This is a digital product - you can download it right after checkout, straight from your library.

Can I use it for commercial projects?

Yes. Commercial use is allowed: use it in your own business and in things you sell. You may not resell or redistribute the file itself.

What's your refund policy?

You can request a refund within 30 days. If something isn't right, request it from your order and the Getly team reviews it.

What file formats and sizes will I get?

You'll download 1 file - ZIP - 42.42 KB in total.

Do I get free updates?

Yes - when the seller ships a new version, you can re-download the latest files from your library at no extra cost. Check the changelog for recent updates.

Price

$5.00