drizzle-docs

Drizzle docs workflow for Drizzle ORM and drizzle-kit work: schemas, queries, migrations, Drizzle Kit config, dialect imports, relations, transactions, raw SQL, indexes, constraints, and native PostgreSQL/MySQL/SQLite. Avoid provider-specific docs unless requested.

abyrd9/skills1 installsMITSynced Aug 26

Works with

Claude CodeCursorCodex CLIGitHub CopilotGemini CLI
---
name: drizzle-docs
description: Drizzle docs workflow for Drizzle ORM and drizzle-kit work: schemas, queries, migrations, Drizzle Kit config, dialect imports, relations, transactions, raw SQL, indexes, constraints, and native PostgreSQL/MySQL/SQLite. Avoid provider-specific docs unless requested.
license: MIT
---

# Drizzle Docs

## Source Policy

Use official Drizzle docs first: `https://orm.drizzle.team/docs/...`.

Avoid provider-specific pages unless the user explicitly asks for them. This skill supports native Drizzle docs for:

- Core Drizzle ORM and Drizzle Kit.
- Native PostgreSQL.
- Native MySQL.
- Native/local SQLite.

Skip provider/runtime pages by default, including Neon, Supabase, Vercel Postgres, PlanetScale, TiDB, SingleStore, AWS Data API, Turso Cloud, SQLite Cloud, Cloudflare D1, Durable Objects, Expo SQLite, OP SQLite, and React Native SQLite.

## Core Workflow

1. Identify the task lane:
   - General schema/query/migration work -> [references/core.md](references/core.md).
   - PostgreSQL -> [references/postgresql.md](references/postgresql.md).
   - MySQL -> [references/mysql.md](references/mysql.md).
   - SQLite -> [references/sqlite.md](references/sqlite.md).
2. Open the relevant official docs live before giving detailed guidance or editing code.
3. Match imports to the dialect:
   - PostgreSQL: `drizzle-orm/pg-core`.
   - MySQL: `drizzle-orm/mysql-core`.
   - SQLite: `drizzle-orm/sqlite-core`.
4. Match the runtime driver to native docs:
   - PostgreSQL: `node-postgres` or `postgres.js`.
   - MySQL: `mysql2`.
   - SQLite: `node:sqlite`, `bun:sqlite`, or `better-sqlite3` unless the project already uses another supported native/local option.
5. Check `drizzle.config.ts` against the docs for the selected dialect before running or changing migrations.
6. Prefer Drizzle’s SQL-like APIs for straightforward queries and relational query builder docs for nested relation loading.
7. Use `sql`` only as an escape hatch for dialect-specific expressions, custom snippets, or unsupported query constructs.
8. Completion: the implementation or answer follows the selected dialect docs, and any provider-specific guidance is either requested by the user or explicitly excluded.

## Migration Guidance

Choose the migration workflow deliberately:

- Use `drizzle-kit generate` plus `drizzle-kit migrate` for source-controlled migrations.
- Use `drizzle-kit push` for rapid prototyping or controlled direct schema sync.
- Use `drizzle-kit pull` for database-first introspection.
- Read `drizzle.config.ts` docs before changing dialect, credentials, schema paths, output paths, casing, migration table/schema, filters, strictness, or verbose settings.

## Review Checklist

When implementing or reviewing Drizzle code:

- Confirm the dialect-specific imports match the database.
- Confirm schema files are exported and included by Drizzle Kit config.
- Confirm relations metadata is not confused with SQL foreign key constraints.
- Confirm migration workflow matches the project’s deployment model.
- Confirm inserts/updates/deletes use dialect-supported returning/upsert behavior.
- Confirm raw SQL fragments are typed where useful and safely parameterized.
- Confirm transactions use the transaction-scoped `tx` object.
- Confirm provider-specific docs are not being followed for native database setups.

More Database skills

azure-upgrade

microsoft/azure-skills

Assess and upgrade Azure workloads between plans, tiers, or SKUs, or modernize Azure SDK dependencies in source code. WHEN: upgrade Consumption to Flex Consumption, upgrade Azure Functions plan, change hosting plan, function app SKU, migrate App Service to Container Apps, modernize legacy Azure Java SDKs (com.microsoft.azure to com.azure), migrate Azure Cache for Redis (ACR/ACRE) to Azure Managed Redis (AMR).

413.0k

supabase-postgres-best-practices

supabase/agent-skills

Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pg_cron, pgmq), vector/semantic search (pgvector), and restoring dumps (pg_restore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection exhaustion, locking, bloat, or rows visible to the wrong user or tenant. This is not just a performance guide — schema, migration, security, and SQL authoring tasks need these rules too, even for a one-column change or a single query.

377.3k

prisma-database-setup

prisma/skills

Guides for configuring Prisma with different database providers (PostgreSQL, MySQL, SQLite, MongoDB, etc.). Use when setting up a new project, changing databases, or troubleshooting connection issues. Triggers on "configure postgres", "connect to mysql", "setup mongodb", "sqlite setup".

247.3k

← All Database skills

Check your AI visibility

One URL in, a 0–100 score and the exact fixes out.

RUN THE CHECK

Browse all the tools

15 tools across six categories
13 of them never send your data anywhere

Free · No signup · No trial clock

SEE THE DIRECTORY