MCPInstall

postgres-drizzle

Write or review PostgreSQL schemas, queries, migrations, and Drizzle ORM code. Use for Postgres/Drizzle relations, indexing, pooling, or query performance; not for unrelated databases or generic backend work.

Installs
1.5K
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/ccheney/robust-skills --skill postgres-drizzle
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads postgres-drizzle automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

PostgreSQL and Drizzle ORM

Match database work to the project's installed API and deployment context. The user's explicit instructions take precedence over this skill's guidelines.

Establish the database contract

Use the relevant schema/query, migration history, and requested behavior as input. For Drizzle code, inspect installed drizzle-orm/drizzle-kit versions and the driver; for SQL, establish the PostgreSQL version when a version-specific feature matters.

The references cover PostgreSQL 17/18 and distinguish Drizzle's 0.x relations() API from the v1 defineRelations() API. Do not mix them or infer the installed API from an npm dist-tag. When the version is unknown, use imports/lockfiles or ask for the missing version before giving version-dependent code.

Keep changes consistent

  • Declare database foreign keys separately from ORM relation metadata. Match nullability, uniqueness, and delete behavior to the actual relationship.
  • Use the transaction handle for every statement in that transaction; a query through the outer connection can escape it.
  • Diagnose slow queries from plans and workload evidence. Evaluate indexes on referencing columns; PostgreSQL does not create them automatically.
  • Generate and inspect migration SQL for schema changes. Preserve applied migration history; use a new migration for subsequent changes.
  • Establish the target before applying migrations or push. Authoring or reviewing SQL does not itself require executing it against a database. Continue execution when the user has already authorized that target and action.
  • Treat EXPLAIN ANALYZE as query execution, including writes. Use a suitable test target or non-executing plan when execution is outside the task.

Deliver the requested SQL/code, migration, or diagnosis, with compatibility assumptions and relevant verification. If execution is requested but the target is missing, prepare the change and ask only for that missing target.

References

Read the topic required for the current operation.

TaskReference
Tables, types, constraints, indexes, generated columnsSCHEMA.md
Reads, writes, joins, transactions, prepared queriesQUERIES.md
Relationships and version-specific relational query APIsRELATIONS.md
drizzle-kit configuration, migration generation and rolloutMIGRATIONS.md
PostgreSQL features, RLS, partitioning, JSONB, full-text searchPOSTGRES.md
Query plans, indexing, pooling, pagination, bulk workPERFORMANCE.md
Compact syntax or connection setup lookupCHEATSHEET.md

For APIs or support not established by the installed project and references, consult version-matched Drizzle and PostgreSQL documentation.

FAQ

What does the postgres-drizzle skill do?

Write or review PostgreSQL schemas, queries, migrations, and Drizzle ORM code. Use for Postgres/Drizzle relations, indexing, pooling, or query performance; not for unrelated databases or generic backend work.

How do I install postgres-drizzle?

Run npx skills add https://github.com/ccheney/robust-skills --skill postgres-drizzle in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/postgres-drizzle/ (personal) or .claude/skills/postgres-drizzle/ (project).

Which AI agents can use postgres-drizzle?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is postgres-drizzle safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains postgres-drizzle?

It is published by ccheney in ccheney/robust-skills. It has 1,508 recorded installs.

More from ccheney/robust-skills

View all →

clean-ddd-hexagonal

ccheney/robust-skills

Design or review backend domain and dependency boundaries using DDD, Clean Architecture, and ports/adapters. Use for aggregate modeling, bounded contexts, use-case isolation, or architecture refactoring; not routine CRUD changes.

mermaid-diagrams

ccheney/robust-skills

Open the skill to read its SKILL.md instructions.

Docs & Writing465 installs

modern-javascript

ccheney/robust-skills

Open the skill to read its SKILL.md instructions.

257 installs

feature-slicing

ccheney/robust-skills

Open the skill to read its SKILL.md instructions.

238 installs

modern-css

ccheney/robust-skills

Open the skill to read its SKILL.md instructions.

Frontend & Design205 installs

slack-block-kit

ccheney/robust-skills

Open the skill to read its SKILL.md instructions.

Popular data & databases skills

View category →

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 (pgcron, pgmq), vector/semantic search (pgvector), and restoring dumps (pgrestore) 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.

OfficialData & Databases462.2K installs

prisma-client-api

prisma/skills

Prisma Client API reference covering model queries, filters, operators, and client methods. Use when writing database queries, using CRUD operations, filtering data, or configuring Prisma Client. Triggers on "prisma query", "findMany", "create", "update", "delete", "$transaction".

OfficialData & Databases393.5K installs

Deprecated compatibility name for prisma-orm-setup. Use only when a user or existing integration explicitly invokes prisma-database-setup; otherwise select prisma-orm-setup.

OfficialData & Databases392.3K installs

prisma-cli

prisma/skills

Prisma ORM 7 CLI reference for existing Prisma 7 applications or explicitly selected Prisma 7 workflows. Covers prisma init, generate, migrate, db, dev, studio, and mcp. For setup, connection repair, or Prisma 8, use prisma-orm-setup; not the Prisma Platform CLI.

OfficialData & Databases390.8K installs

prisma-postgres

prisma/skills

Deprecated compatibility name for prisma-postgres-setup. Use only when a user or existing integration explicitly invokes prisma-postgres; otherwise select prisma-postgres-setup.

OfficialData & Databases384.4K installs

Required reference for Prisma ORM 7 SQL driver adapter work. Use when implementing or modifying adapters, adding database drivers, or touching SqlDriverAdapter, Transaction, savepoint, result mapping, or DriverAdapterError behavior. Covers current transaction lifecycle, optional savepoint hooks, original database-error preservation, and verification.

OfficialData & Databases378.9K installs