← Back to Skills Marketplace
ivangdavila

Drizzle

by Iván · GitHub ↗ · v1.0.0
linuxdarwinwin32 ✓ Security Clean
1258
Downloads
2
Stars
9
Active Installs
1
Versions
Install in OpenClaw
/install drizzle
Description
Build type-safe database queries with Drizzle ORM patterns.
README (SKILL.md)

Schema Definition

  • Export every table from schema file — queries fail silently if table isn't exported
  • Use $inferSelect for query return types, $inferInsert for insert input — they differ (select has defaults filled, insert has optionals)
  • Define relations() in a separate call, not inline with table — Drizzle separates schema from relations

Query Syntax Traps

  • Conditions use functions, not objects: where: eq(users.id, 5) not where: { id: 5 } — Prisma syntax doesn't work
  • Combine conditions with and() / or(): where: and(eq(users.active, true), gt(users.age, 18))
  • db.query.users.findMany() for relational queries with with:, db.select().from(users) for SQL-like — mixing them causes type errors

Migrations

  • drizzle-kit push is dev-only (destructive) — production needs drizzle-kit generate then drizzle-kit migrate
  • Schema changes require regenerating migrations — editing generated SQL breaks the migration hash
  • Set strict: true in drizzle.config.ts to catch schema drift before it hits production

Driver-Specific

  • PostgreSQL: use pgTable, imports from drizzle-orm/pg-core
  • MySQL: use mysqlTable, imports from drizzle-orm/mysql-core
  • SQLite: use sqliteTable, imports from drizzle-orm/sqlite-core
  • Mixing imports across drivers compiles but fails at runtime with cryptic errors

Performance

  • Wrap multi-query operations in db.transaction(async (tx) => {}) — Drizzle doesn't auto-batch
  • Use .prepare() for queries executed repeatedly — skips query building overhead
  • Add .limit() to every findMany() / select() — no default limit means full table scans

Common Mistakes

  • Forgetting await on queries returns a Promise, not results — TypeScript doesn't catch this if you ignore the return
  • returning() is required to get inserted/updated rows back — without it you get { rowCount } only
  • JSON columns: PostgreSQL uses jsonb(), MySQL uses json() — wrong function = wrong serialization
Usage Guidance
This is a documentation-only skill about Drizzle ORM and appears coherent. Before installing: ensure npx is available; do not let the agent run migration commands against production databases — migration commands (especially drizzle-kit push) can be destructive; be prepared to provide DB credentials when you actually run CLI commands (the skill itself doesn't request them); review any commands the agent proposes to execute and run them manually in a safe/dev environment first.
Capability Analysis
Type: OpenClaw Skill Name: drizzle Version: 1.0.0 The provided files, `_meta.json` and `SKILL.md`, contain metadata and documentation for using Drizzle ORM. The `SKILL.md` file provides best practices and common pitfalls, and while it declares `npx` as a required binary in its metadata, it does not contain any instructions for malicious execution, prompt injection attempts, data exfiltration, or other harmful behaviors. The content is purely informative and aligns with the stated purpose of assisting with Drizzle ORM patterns.
Capability Assessment
Purpose & Capability
Name/description align with content: SKILL.md contains Drizzle ORM patterns, migration notes, driver specifics and performance tips. Declaring npx as a required binary is appropriate for an npm-based CLI workflow.
Instruction Scope
The instructions are scoped to schema, queries, migrations and driver-specific behavior (expected for an ORM helper). They mention CLI commands (drizzle-kit push/generate/migrate) and config files (drizzle.config.ts, schema file). These are relevant, but the mention of destructive commands (drizzle-kit push) means an agent that actually executes these could alter or destroy databases — the doc itself warns about dev vs production, but exercising the skill in an environment with live DB credentials would be risky.
Install Mechanism
Instruction-only skill with no install spec and no code files. This is the lowest-risk install posture. Required binary npx is declared and appropriate.
Credentials
Skill declares no environment variables or credentials, which matches the guidance-only nature. Note: actual use of Drizzle CLI against a database will require DB connection credentials — the skill doesn't request them, but an agent using the skill may need them to run migrations or queries.
Persistence & Privilege
always is false and the skill doesn't request persistent system changes or modify other skills. Autonomous invocation is allowed (platform default) but not combined with other concerning privileges.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install drizzle
  3. After installation, invoke the skill by name or use /drizzle
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release
Metadata
Slug drizzle
Version 1.0.0
License
All-time Installs 11
Active Installs 9
Total Versions 1
Frequently Asked Questions

What is Drizzle?

Build type-safe database queries with Drizzle ORM patterns. It is an AI Agent Skill for Claude Code / OpenClaw, with 1258 downloads so far.

How do I install Drizzle?

Run "/install drizzle" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Drizzle free?

Yes, Drizzle is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Drizzle support?

Drizzle is cross-platform and runs anywhere OpenClaw / Claude Code is available (linux, darwin, win32).

Who created Drizzle?

It is built and maintained by Iván (@ivangdavila); the current version is v1.0.0.

💬 Comments