roninforge/roninforge-drizzle/drizzle-validate
Claude Code and agent skill by roninforge/roninforge-drizzle
- community
Checking that the SKILL.md file is still in the repository.
Scan a Drizzle codebase for tracked anti-patterns. ~17 are reliably grep-detectable (Prisma include/select/nested-where leakage, removed casing API, old pgArray import path, deprecated drizzle-kit generate:pg, SQL injection via execute concatenation, .returning() on MySQL, missing await on builders, drizzle-kit push in production, relations() in same file as schema, drizzle-orm <0.45.2 SQL injection CVE). The remaining few (selectDistinct vs select, join nested-vs-flat shape, drizzle-kit pull skipped on existing DBs) need manual review.
Install
npx vskill@latest install roninforge/roninforge-drizzle/drizzle-validateSKILL.md
The same SKILL.md was published earlier as roninforge/roninforge-drizzle/drizzle-validate.
Validate Drizzle Codebase
When to Use
When auditing AI-generated Drizzle code, reviewing a PR, or preparing a Drizzle project for production handoff. Output is a list of locations with severity tags.
Instructions
Run each grep against the project root. Severity tags map to the reviewer agent's output (CRITICAL / ERROR / WARN). Each hit is a candidate; review case by case.
CRITICAL: SQL injection via string concatenation in db.execute
Every hit is exploitable. Replace with sql\...\${var}...\``.
CRITICAL: drizzle-orm < 0.45.2 (sql.identifier injection CVE)
If this matches, bump to ^0.45.2. The CVE is in sql.identifier() and sql.as() escaping.
CRITICAL: drizzle-kit push in production deploy scripts
push writes the schema diff with no migration history. Replace with migrate.
ERROR: Prisma include / select / nested-where leakage
The first two will not type-check. The third is a heuristic - manual triage required.
ERROR: Deprecated drizzle-kit subcommand
Replace generate:pg etc with generate (dialect from config) or generate --dialect=postgresql (explicit).
ERROR: Old pgArray import path (when on v1.x)
Path moved to /array in 1.0-rc.1.
ERROR: Casing API on drizzle() (when on v1.x)
Removed in 1.0-rc.1. Use per-table builders.
ERROR: Wrong dialect import for schema
Schema imports come from pg-core / mysql-core / sqlite-core. The driver namespaces export drizzle only.
ERROR: .returning() on MySQL or SQLite-D1
RETURNING is Postgres-only at the SQL level (also better-sqlite3 supports it; D1 does not yet).
ERROR: Missing await on builder chains
GNU grep with PCRE (Linux, or brew install grep on macOS):
Portable fallback (works on stock macOS BSD grep - no PCRE):
Stock macOS/usr/bin/grepdoes NOT support-P. Withoutgnu-grepinstalled, the PCRE form silently exits withgrep: invalid option -- P. Use the fallback or installbrew install grepand call it asggrep.
False positives on assignment to a const followed by .then(...) are real but rare. Manual triage.
ERROR: v0 returned-object index shape
From 0.31 onward the third arg returns an array. Manually triage the matches - => ({ can also be a normal arrow returning an object that has nothing to do with pgTable.
WARN: relations() in the same file as the schema (circular import risk)
Move relations() to a sibling relations.ts that imports from the schema index.
WARN: Transaction callback uses outer db
Drizzle transactions use the tx argument from the callback. Any db.* call inside the callback body escapes the transaction silently.
WARN: pgEnum used as a TypeScript type
Declare the union manually, brand the column with $type<T>().
WARN: serial() instead of identity column
Identity columns (integer().primaryKey().generatedAlwaysAsIdentity()) are SQL-standard and don't burn the sequence on insert conflicts.
WARN: timestamp without timezone
Prefer timestamp({ withTimezone: true }). Date-only fields can stay non-timestamptz.
WARN: HTTP driver in code that calls db.transaction
HTTP drivers do not support transactions across requests; each query is its own request.
Output Format
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/drizzle-validate/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/roninforge/roninforge-drizzle/drizzle-validate)