$npx skillfedfor your agent

drizzle-orm-d1

drizzle-orm-d1 equips you with a complete type-safe ORM layer for Cloudflare D1 databases, handling schema definition, migration generation via Drizzle Kit, and D1-specific patterns like batch operations instead of traditional transactions. It includes templates for common queries, relations, and prepared statements, plus an error catalog addressing D1-specific issues like binding errors and foreign key constraints.

drizzle-orm-d1 provides type-safe ORM setup for Cloudflare D1 databases with migrations and batch transactions.

AI-generated summary based on this skill's SKILL.md

196 29 MITupdated by secondsky

Decision gist · record as of 2026-07-25

drizzle-orm-d1 provides type-safe ORM setup for Cloudflare D1 databases with migrations and batch transactions. drizzle-orm-d1 equips you with a complete type-safe ORM layer for Cloudflare D1 databases, handling schema definition, migration generation via Drizzle Kit, and D1-specific patterns like batch operations instead of traditional transactions. It includes templates for common queries, relations, and prepared statements, plus an error catalog addressing D1-specific issues like binding errors and foreign key constraints.

manual: git clone https://github.com/secondsky/claude-skills → cp -r claude-skills/plugins/drizzle-orm-d1/skills/drizzle-orm-d1 ~/.claude/skills/drizzle-orm-d1
plugins/drizzle-orm-d1/skills/drizzle-orm-d1/SKILL.md · version 150162a3

Use it when

  • drizzle-orm-d1 uses Drizzle Kit to manage D1 database migrations.
  • drizzle-orm-d1 lets you define schemas and relations using Drizzle's declarative API.

Verify before relying

Read SKILL.md below before installing (20 files). Open directory: indexed for reading, not audited.

Same gist for agents: .md · .json

Install

secondsky/claude-skills/drizzle-orm-d1 · repository language: TypeScript

Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do you use drizzle with Cloudflare D1?

drizzle-orm-d1 provides a complete type-safe ORM layer for Cloudflare D1 databases. Set up drizzle-orm with the D1 driver, define your schemas using Drizzle's schema API, and generate migrations via Drizzle Kit. drizzle-orm-d1 handles D1-specific patterns like batch operations instead of traditional transactions, includes templates for common queries and relations, and offers prepared statement support for type-safe SQL execution.

What is drizzle kit migrations setup for D1?

drizzle-orm-d1 uses Drizzle Kit to manage D1 database migrations. Define your schema in TypeScript, then run Drizzle Kit's generate command to create migration files. These migrations are applied to your D1 database, enabling version control over schema changes. drizzle-orm-d1 provides guidance on structuring migrations and integrating them into your Cloudflare Workers workflow.

How does drizzle schema definition handle relations?

drizzle-orm-d1 lets you define schemas and relations using Drizzle's declarative API. Create tables with columns, set primary keys, and establish foreign key relationships. drizzle-orm-d1 includes templates for common relation patterns and supports type inference across joined queries, ensuring your TypeScript types automatically reflect your database structure and relationships.

How do you resolve D1 errors and transaction handling?

drizzle-orm-d1 includes an error catalog addressing D1-specific issues like binding errors, foreign key constraint violations, and transaction errors. Since D1 doesn't support traditional transactions, drizzle-orm-d1 guides you through the batch API for executing multiple statements atomically. The error reference helps diagnose common problems and provides solutions for proper error handling.

Can drizzle-orm-d1 build type-safe SQL queries?

Yes. drizzle-orm-d1 enables type-safe SQL queries and prepared statements for D1. Use Drizzle's query builder to construct SELECT, INSERT, UPDATE, and DELETE statements with full TypeScript type checking. Prepared statements prevent SQL injection and improve performance, while the query builder ensures compile-time validation of your database operations.

What does drizzle-orm-d1 include for D1 setup?

drizzle-orm-d1 provides everything needed to set up type-safe ORM for Cloudflare D1 development: schema definition templates, Drizzle Kit migration workflows, query builder examples, prepared statement patterns, batch operation guidance, and a D1-specific error catalog. It equips you with best practices for D1-specific constraints like batch-only execution and foreign key handling.

SKILL.md

Rendered from the published skill. Quoted content, verbatim.

Drizzle ORM for Cloudflare

(truncated - see the full file via the links below)

File tree — 15 files
plugins/drizzle-orm-d1/skills/drizzle-orm-d1/SKILL.md
plugins/drizzle-orm-d1/skills/drizzle-orm-d1/references/common-errors.md
plugins/drizzle-orm-d1/skills/drizzle-orm-d1/references/error-catalog.md
plugins/drizzle-orm-d1/skills/drizzle-orm-d1/references/links-to-official-docs.md
plugins/drizzle-orm-d1/skills/drizzle-orm-d1/references/migration-workflow.md
plugins/drizzle-orm-d1/skills/drizzle-orm-d1/references/query-builder-api.md
plugins/drizzle-orm-d1/skills/drizzle-orm-d1/references/schema-patterns.md
plugins/drizzle-orm-d1/skills/drizzle-orm-d1/references/wrangler-setup.md
plugins/drizzle-orm-d1/skills/drizzle-orm-d1/scripts/check-versions.sh
plugins/drizzle-orm-d1/skills/drizzle-orm-d1/templates/basic-queries.ts
plugins/drizzle-orm-d1/skills/drizzle-orm-d1/templates/basic-schema.ts
plugins/drizzle-orm-d1/skills/drizzle-orm-d1/templates/client.ts
plugins/drizzle-orm-d1/skills/drizzle-orm-d1/templates/cloudflare-worker-integration.ts
plugins/drizzle-orm-d1/skills/drizzle-orm-d1/templates/drizzle.config.ts
plugins/drizzle-orm-d1/skills/drizzle-orm-d1/templates/migrations/0001_example.sql

Let your AI agent find skills like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.

wish › “Set up type-safe ORM for Cloudflare D1 database development”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

database-design
by srstomp · srstomp/pokayokay

Build well-structured database schemas from requirements through deployment. This skill guides you through normalization, relationship design, index optimization, and reversible migrations—covering relational databases like PostgreSQL and MySQL, document stores like MongoDB, and ORMs including Prisma, Drizzle, and TypeORM.

MITupdated Jul 2026
★ 9repo stars
drizzle-migrations
by curiositech · curiositech/some_claude_skills

This skill guides you through Drizzle ORM's migration workflow for SQLite databases, covering schema definition, column types, and common changes like adding tables or indexes. Learn production-ready strategies for generating migrations, applying them in code, and managing relations between tables.

MITfor claude-codeupdated Jul 2026
★ 164repo stars
drizzle-best-practices
by honra-io · honra-io/drizzle-best-practices

Comprehensive reference for building PostgreSQL applications with Drizzle ORM, covering schema design, query patterns, and relational modeling across eight prioritized categories. Includes version-specific guidance for both v1 RC and legacy 0.45.x APIs, with correct and incorrect code examples for each pattern.

MITupdated May 2026
★ 18repo stars
drizzle-orm
by Mindrally · Mindrally/skills

Drizzle ORM is a lightweight, type-safe TypeScript ORM that treats SQL as a first-class citizen. This skill covers schema definition, database connections across PostgreSQL, SQLite, and Turso, relational queries, and performance patterns like proper indexing and pagination.

Apache-2.0updated Jun 2026
★ 202repo stars
Drizzle Orm
by pedronauck · pedronauck/skills

This skill covers Drizzle ORM fundamentals for building type-safe database layers, including schema organization, prepared statements, and transaction patterns. Learn performance-first practices like indexing strategies, N+1 prevention, and safe migration workflows using package scripts. Covers common pitfalls and validation steps to ensure robust database code.

no license declared → metadata onlyupdated Jul 2026
★ 541repo stars
drizzle-sqlite-scaffold
by pproenca · pproenca/dot-skills

Drizzle SQLite Scaffold automates project initialization and table scaffolding for Drizzle + SQLite, emitting driver-specific config, singleton client, schema files with inferred types, and CRUD repository modules. Supports better-sqlite3, libsql/Turso, and bun:sqlite with built-in conventions for pragmas, relations, timestamps, and soft deletes.

MITupdated Jul 2026
★ 182repo stars

More skills Nuxthub (unlicensed) · postgres-drizzle (MIT) · drizzle (MIT) · tanstack-start (MIT) · Drizzle (Apache-2.0) · better-auth (MIT) · cloudflare-d1 (MIT)

Tags
sqlite-abstractioncloudflare-integrationtype-safety-layermigration-toolingbatch-operationsschema-first-designrelational-mappingquery-compositiond1-specific-patternsworker-database