drizzle-knowledge-patchlisted
Install: claude install-skill Nevaberry/nevaberry-plugins
# Drizzle ORM Knowledge Patch
## Working method
Use this patch when changing Drizzle queries, schema-derived validation,
or Drizzle Kit execution.
Before editing:
1. Identify the installed `drizzle-orm` and `drizzle-kit` package versions.
2. Identify whether the CLI is launched by Node, Bun, or Deno.
3. Check whether the project imports `drizzle-zod`.
4. Search for dynamic values passed to `sql.identifier()` or `sql.as()`.
5. Read the reference matching the task before choosing a migration.
Keep package versions distinct while reasoning:
- `drizzle-orm` controls query helpers and built-in Zod generators.
- `drizzle-kit` controls CLI module loading.
- `zod` remains a direct application dependency for generated schemas.
Do not infer one package's behavior from another package's version.
## Reference index
| Reference | Topics | Read when |
| --- | --- | --- |
| [queries-and-runtime.md](references/queries-and-runtime.md) | SQL identifier and alias escaping; security review | Building dynamic SQL or auditing `sql.identifier()` and `sql.as()` |
| [migrations-and-kit.md](references/migrations-and-kit.md) | Runtime-aware CLI loading; ESM and CommonJS projects | Running Drizzle Kit or diagnosing module-loading failures |
| [schema-validation.md](references/schema-validation.md) | Built-in Zod entry point; deprecated package; select, insert, and update schemas | Generating or migrating schema-derived validation |
## Quick reference
### Upgrade code that builds identifiers o