drizzle-knowledge-patch

Guidance for working with specific Drizzle ORM and Drizzle Kit behaviors. Drizzle is a TypeScript library for defining database tables and queries, while Drizzle Kit is its schema and migration command-line tool.

In plain words
What is it for?
Use it when changing SQL identifiers or aliases, Drizzle Kit loading, or Zod schemas generated from Drizzle tables.
Why use it?
It prevents mistakes caused by treating the ORM, command-line tool, runtime, and generated validation schemas as if they behaved the same way.

Skill for Claude CodeCodex

Part of the knowledge-patch plugin — 57 skills, 1 hook shipped together

Install

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.

agentmods
npx agentmods add skills/nevaberry/nevaberry-plugins/drizzle-knowledge-patch
Any agent
npx skills add Nevaberry/nevaberry-plugins --skill drizzle-knowledge-patch
Clone the repo
git clone --depth 1 https://github.com/Nevaberry/nevaberry-plugins

Made for: Claude Code, Codex.

Or install knowledge-patch, the plugin that ships this one along with the rest of its 57 skills, 1 hook.

Per session 10 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,559 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00010 $0.01559
Opus 5 $0.00005 $0.00779
Sonnet 5 $0.00002 $0.00312
Haiku 4.5 $0.00001 $0.00156

Measured 3d ago against content hash cbf007e3da14, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

drizzle-knowledge-patch 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 3d 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.

plugins/knowledge-patch/patches-claude/drizzle-knowledge-patch/SKILL.md · 203 lines

How it starts

The opening of the file, as written. The whole thing — 203 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Drizzle ORM Knowledge Patch

Use this skill when work touches Drizzle SQL identifiers or aliases, Drizzle Kit module loading, or Zod schemas generated from Drizzle tables.

The relevant behavior is controlled by different packages and, for the CLI, by the runtime used to launch it. Establish those boundaries before changing code or dependencies.

Working method

Before editing:

  1. Read the installed drizzle-orm version.
  2. Read the installed drizzle-kit version separately.
  3. Identify whether Drizzle Kit is launched with Node, Bun, or Deno.
  4. Search for sql.identifier() and sql.as() calls.
  5. Search for imports from drizzle-zod and drizzle-orm/zod.
  6. Confirm whether zod is a direct application dependency.
  7. Open the task-specific reference below before selecting a change.

Do not use the ORM version to infer CLI loader behavior.

Do not use the Drizzle Kit version to infer schema-generator availability.

Do not assume every JavaScript runtime follows the Node loader path.

Reference index

Reference Topics Read when
queries-and-runtime.md Identifier and alias escaping; SQL injection risk Reviewing or changing sql.identifier() or sql.as()
migrations-and-kit.md Runtime-aware Drizzle Kit loading; ESM and CommonJS Running the CLI or diagnosing module-loading failures
schema-validation.md Built-in Zod generators; deprecated package; direct dependency Creating or migrating select, insert, or update schemas

Quick reference

Upgrade code that constructs identifiers or aliases

Current Drizzle ORM releases properly escape values passed to sql.identifier() and sql.as().

Earlier releases could leave those values improperly escaped and expose an application to SQL injection.

If either helper is present, verify the installed ORM and upgrade from an affected release. Treat this as a security change, not routine cleanup.

Read the full file on GitHub · 203 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 3d ago First seen · 203 lines · 10 tokens per session scan A cbf007e3da14

Subscribe to this mod's changes

drizzle-knowledge-patch is a skill published in the GitHub repository Nevaberry/nevaberry-plugins (24 stars, last pushed 6d ago), licensed MIT. It adds 10 tokens to every session and 1,559 once invoked, about $0.0001 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-08-30.