drizzle
Skill by triggerdotdev
Guides an AI assistant through writing Drizzle ORM schemas, queries and drizzle-kit migrations for the dashboard agent's database package. Built for developers working in this monorepo. It enforces rules such as foreign-key-free tables and pooler-safe connections.
Install drizzle
Built from the published package, never by AI.
git clone --depth 1 https://github.com/triggerdotdev/trigger.dev /tmp/trigger.dev && mkdir -p ~/.claude/skills && cp -r /tmp/trigger.dev/.claude/skills/drizzle ~/.claude/skills/drizzleRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/triggerdotdev/trigger.dev /tmp/trigger.dev && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/trigger.dev/.claude/skills/drizzle ~/.gemini/antigravity-cli/skills/drizzleAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill guides an AI assistant through writing and changing Drizzle ORM code in one package: internal-packages/dashboard-agent-db. That package is the dashboard agent's conversation datastore. The skill covers pg-core schema definition with pgSchema, a postgres-js client, drizzle-kit migrations, and a query layer that scopes user queries by organizationId or userId.
The skill also sets the repo's rules. Tables live in a dedicated Postgres schema named trigger_dashboard_agent. Foreign keys are not used, because the database is separate from the main one. Connections use prepare: false for transaction-mode poolers, and relative imports use .js extensions. It states that Drizzle is not the main database, which is Prisma. It is meant for developers and assistants editing this package.
Written from the project's SKILL.md and checked against it.
What it can do
- Schema definitionWrites pg-core tables under pgSchema, with typed jsonb columns and partial indexes.
- Client setupCreates a postgres-js and Drizzle client with a small pool and prepare set to false.
- Scoped queriesWrites list, insert, upsert, join and transaction queries that filter by organization or user.
- MigrationsExplains how to generate and apply migrations with drizzle-kit, including schemaFilter setup.
- Repo conventionsApplies rules such as no foreign keys, explicit column selection and caret version ranges.
What you need
- Access to the internal-packages/dashboard-agent-db package in this monorepo
- pnpm for installing dependencies
- drizzle-orm ^0.45 and drizzle-kit ^0.31
- A Postgres database URL to run db:migrate
Try asking
- Add a new column to the chats table in the dashboard agent schema
- Write a scoped query that lists a user's chats, newest first
- Generate a drizzle-kit migration for my schema change and check it
Good to know
- Applies only to the dashboard-agent-db package, not the main Prisma database
- Foreign keys are not used by design, so joins are enforced in app code
- db:migrate needs a real database URL, while db:generate works offline
- Connections must use prepare: false when a transaction-mode pooler is used
Security check
B- Allowed to use Write, Edit, Bash without limitsIn
SKILL.md
Checked automatically: .claude/skills/drizzle/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
Allowed tools: ReadWriteEditGlobGrepBash
-
SKILL.md11 KB
Alternatives to drizzle
All alternatives →Creates, configures and manages datasets on the Hugging Face Hub, including SQL-based querying and transformation. Built for people who edit dataset content and metadata directly, alongside the HF MCP server.
Diagnoses and repairs gbrain's Postgres access when a command or MCP result shows a GBRAIN_DB_ACCESS marker, or when the operator reports the brain database is down. It runs the hardcoded gbrain db-repair ladder and verifies the result with a re-probe.
Manages clusters, instances, and backups for AlloyDB for PostgreSQL. Built for creating, configuring, and administering AlloyDB databases, not general PostgreSQL or Cloud SQL instances.
Writes, reviews and migrates Supabase logs queries against the ClickHouse logs table served by the logs.all.otel endpoint. Built for developers who write Logs Explorer SQL or convert older BigQuery logs queries.
Diagnoses and fixes slow Paperclip PostgreSQL queries using Cloud and Neon evidence, local benchmarks, regression tests, and a pull request with passing checks. Built for engineers working on Paperclip.
Guides AI assistants through Prisma 8 projects built on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo. It covers data contracts, migrations, typed queries and runtime setup for developers on Prisma 8.
Compare with hugging-face-datasets, db-repair or alloydb-basics
drizzle: common questions
Does this skill work for the main Trigger.dev database?
No. The source says Drizzle is only used in the dashboard agent's package, and the main database is Prisma.
Why are there no foreign keys in the schema?
The source says the agent database is a separate PlanetScale database in cloud, so it cannot reference the main database with foreign keys. Main entities are referenced by id only.
Can I generate migrations without a database?
Yes. The source says db:generate is offline and only reads schema.ts, while db:migrate needs a real database URL.
How do I install drizzle?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is drizzle free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is drizzle safe to use?
It scores 88 of 100. Grades: maintenance A, licence A, quality A. Security check: grade B (allowed to use write, edit, bash without limits). Review the code before you install. How grades work.
What are alternatives to drizzle?
Similar skills: hugging-face-datasets, db-repair, alloydb-basics, clickhouse-logs-queries.
