drizzle

A guide to Drizzle, a TypeScript tool that lets application code work with SQL databases such as PostgreSQL, MySQL, and SQLite.

In plain words
What is it for?
Setting up Drizzle, connecting it to supported databases or edge services, and choosing between it and tools such as Prisma.
Why use it?
It helps developers write database queries and manage database structure in TypeScript while keeping the generated SQL visible and avoiding extra runtime overhead.

Skill for Claude CodeCodex

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/ashish7802/awesome-api-skills/drizzle
Any agent
npx skills add ashish7802/awesome-api-skills --skill drizzle
Clone the repo
git clone --depth 1 https://github.com/ashish7802/awesome-api-skills

Made for: Claude Code, Codex.

Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 752 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.00000 $0.00752
Opus 5 $0.00000 $0.00376
Sonnet 5 $0.00000 $0.00150
Haiku 4.5 $0.00000 $0.00075

Measured yesterday against content hash 33f7ad54ec78, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

drizzle 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 yesterday.

The scan reads SKILL.md. This mod also ships 2 executable files (examples/query.ts, examples/schema.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/drizzle/SKILL.md · 79 lines

How it starts

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

Drizzle ORM Skill

Next generation TypeScript ORM.

Ecosystem Graph Preview

graph LR
  drizzle["drizzle"]:::core
  classDef core fill:#f9f,stroke:#333,stroke-width:4px;
  cloudflare-workers -- "integrates with" --> drizzle
  drizzle -- "integrates with" --> postgresql
  drizzle -- "integrates with" --> mysql
  drizzle -- "integrates with" --> sqlite
  drizzle -- "alternative to" --> prisma
  drizzle -- "works well with" --> neon
  drizzle -- "works well with" --> turso
  postgresql -- "integrates with" --> drizzle
  prisma -- "alternative to" --> drizzle
  sqlite -- "integrates with" --> drizzle
  • prisma (Score: 0.92) Why: Direct relationship, Both are Databases, Shared ecosystem (typescript), Can deploy to vercel, Similar network profile
  • sqlite (Score: 0.81) Why: Direct relationship, Both are Databases, Can deploy to cloudflare, Similar network profile
  • cloudflare-workers (Score: 0.8) Why: Direct relationship, Both are Developer Tools, Can deploy to cloudflare

Quick Start

Drizzle is a headless TypeScript ORM. It generates pure SQL with zero runtime overhead, making it incredibly fast and compatible with Edge environments (Vercel Edge, Cloudflare Workers).

npm i drizzle-orm

Production Patterns

Relational Queries vs SQL-Like

Drizzle supports both traditional SQL-like querying and a Prisma-like db.query syntax. Use the db.query API for deeply nested relational fetches, but stick to the SQL-like syntax for complex aggregations and joins for maximum performance.

Architecture & Scaling

Zero Dependencies

Unlike Prisma, Drizzle does not require downloading a Rust binary engine. It is just JavaScript, meaning it natively supports serverless and edge functions without massive cold starts.

Error Recovery

Always wrap multiple inserts/updates in a db.transaction(). If the underlying database driver throws an error, Drizzle will automatically issue the rollback.

Read the full file on GitHub · 79 lines

Files

What ships with it

3 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. yesterday First seen · 79 lines · 0 tokens per session scan A 33f7ad54ec78

Subscribe to this mod's changes

drizzle is a skill published in the GitHub repository ashish7802/awesome-api-skills (13 stars, last pushed 13d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 752 tokens. 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.

Related

Other skills, from other repositories

create-canvas-extension

Create or register a canvas extension in the awesome-copilot repository. Use when asked to scaffold a new canvas extension, create its plugin.json, add a reusable extension to one or more plugins, or migrate extension metadata. Extensions are reusable source under extensions/; shippable plugin manifests belong under…

github/awesome-copilot · 66 tokens

presentation

Turn a tech-spec directory into an interactive, marketing-grade web presentation — built so engineers understand the design, the reader is convinced of the why, and the result is shareable in public. Use when someone wants a spec turned into a deck.

iii-hq/iii · 51 tokens

iii-core-primitives

Use when registering iii functions, binding triggers, selecting sync/void/enqueue invocation, creating workers, inspecting the live worker registry, installing registry workers, authoring custom triggers, moving channel data, or adapting external HTTP functions across TypeScript, Python, and Rust.

iii-hq/iii · 58 tokens

iii-sandbox

Ephemeral microVM sandboxes for running untrusted or agent-generated code in isolation — a one-call run path, a create/exec/stop lifecycle, and a set of filesystem operations.

iii-hq/iii · 42 tokens

iii-architecture-patterns

Use when composing iii primitives into backend architectures: durable workflows, reactive backends, agentic pipelines, event-driven CQRS, effect pipelines, and trigger-transform-action automation.

iii-hq/iii · 40 tokens

iii-error-handling

Handle iii engine and SDK errors across Node, Python, Rust, and browser workers. Use when interpreting error codes, retryability, RBAC denial, timeouts, handler failures, or SDK-specific exception surfaces.

iii-hq/iii · 47 tokens