Drizzle for Openclaw

A high-performance ORM skill for building type-safe database queries using Drizzle ORM patterns and migration tools.

ivangdavila
v1.0.0
Feb 10, 2026
2
2k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install drizzle

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install drizzle using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Drizzle?

Drizzle is a lightweight and performant TypeScript ORM designed to feel like writing SQL while providing full type safety and developer productivity. This implementation of Openclaw Skills enables developers to define schemas with precision, manage complex relational data, and ensure driver-specific compatibility across PostgreSQL, MySQL, and SQLite. By separating schema definitions from relations and focusing on explicit query functions, it eliminates the common abstractions that lead to runtime errors in traditional ORMs.

Using these Openclaw Skills, developers can bridge the gap between their application logic and the database layer. The skill emphasizes best practices like schema inference for select and insert types, ensuring that database interactions are robust and predictable. Whether you are building a small project or a large-scale enterprise application, Drizzle provides the tools necessary for efficient data modeling and high-speed execution.

Drizzle Use Cases

  • Defining type-safe database schemas for PostgreSQL, MySQL, and SQLite.
  • Managing automated database migrations and schema synchronization using drizzle-kit.
  • Executing complex relational queries with type-safe filtering and joins.
  • Implementing performance-critical database transactions and prepared statements.
  • Preventing schema drift and runtime errors in production environments through strict configuration.

How Drizzle Works

  1. Initialize the schema by exporting tables from dedicated schema files using driver-specific core functions.
  2. Define table relations in a separate call to maintain a clean separation between data structure and relational logic.
  3. Utilize type inference tools like $inferSelect and $inferInsert to ensure data integrity during inputs and outputs.
  4. Build queries using functional conditions such as eq(), and(), and or() to mirror SQL logic within TypeScript.
  5. Manage the database lifecycle by generating migrations with drizzle-kit and pushing changes to the development or production server.
  6. Optimize high-frequency queries by preparing them to bypass query building overhead during execution.

Drizzle Setup

To integrate these Openclaw Skills into your workflow, ensure you have the necessary CLI tools installed. Start by configuring your database connection and schema paths in drizzle.config.ts.

npx drizzle-kit generate
npx drizzle-kit push

Ensure that strict: true is set in your configuration file to catch potential schema drift before deployment.

Drizzle Data Schema & Taxonomy

Component Description
Schema Files Drivers imported from drizzle-orm/pg-core, mysql-core, or sqlite-core.
Relations Defined via the relations() function to map entity associations.
Inference Types Uses $inferSelect for query results and $inferInsert for creation data.
Query Logic Functional conditions (eq, gt, etc.) used within select and where clauses.
Migrations SQL migration files and hashes generated and managed by drizzle-kit.

Drizzle Advanced Features

  • Multi-driver support enabling seamless transitions between different SQL dialects using Openclaw Skills.
  • Transaction wrapping to ensure atomicity for complex, multi-step database operations.
  • Prepared statement support to drastically reduce overhead for frequently executed queries.
  • Relational query builder (db.query) for simplified deep-nesting without manual join management.
  • Production-safe migration workflows that utilize SQL generation and hashing to prevent data loss.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*