Skip to content

ericrisco/rsc-harness / skills/drizzle-orm

drizzle-orm

Verified

Use when modeling data or querying with Drizzle ORM in TypeScript — `pgTable` schema in `.ts`, type-safe select/insert/relational queries, `drizzle-kit` migrations. NOT Prisma Client or `schema.prisma` (that is `prisma-orm`), NOT ORM-agnostic migration strategy (that is `db-migrations`), NOT Postgres engine tuning or EXPLAIN (that is `postgresdb`).

FileKindSize
SKILL.mdskill md10.4 KB
evals/README.mdmarkdown963 B
evals/cases.yamlconfig2.7 KB
references/relations-and-drivers.mdmarkdown5.0 KB
scripts/verify.shexecutablescript5.5 KB

evals/cases.yaml

View on GitHub
skill: drizzle-orm

should_trigger:
  - prompt: "Set up Drizzle ORM with Postgres and write the users schema"
    why: Core setup — install, drizzle.config.ts, pgTable schema; the skill's primary job.
  - prompt: "drizzle-kit generate is producing a conflicting migration, how do I resolve it?"
    why: Migration-conflict / commutativity detection is drizzle-kit-specific; squarely this skill.
  - prompt: "My db.query.posts.findMany returns posts without the author relation"
    why: Non-obvious — the fix is relations + `with` + passing { schema }/{ relations } to drizzle().
  - prompt: "Should I use drizzle push or generate+migrate for production?"
    why: Non-obvious workflow decision the skill resolves (push=prototyping only).
  - prompt: "Vull definir l'esquema amb Drizzle i tipus type-safe a TypeScript"
    why: Catalan trigger for schema-as-code + $inferSelect/$inferInsert types.
  - prompt: "Migrar de Prisma a Drizzle porque quiero algo más ligero para edge"
    why: Spanish; boundary-adjacent but still Drizzle (target ORM is Drizzle, edge driver choice).
  - prompt: "How do I wire Drizzle to Neon over HTTP from a Cloudflare Worker?"
    why: Driver entrypoint selection (neon-http, edge caveats) is in this skill's scope.

should_not_trigger:
  - prompt: "Generate a Prisma client from schema.prisma"
    route_to: prisma-orm
    why: Prisma DSL + codegen client is the rival ORM, not Drizzle.
  - prompt: "Plan a zero-downtime expand/contract migration strategy"
    route_to: db-migrations
    why: ORM-agnostic migration strategy, not Drizzle's drizzle-kit workflow.
  - prompt: "Tune Postgres indexes and read an EXPLAIN ANALYZE plan"
    route_to: postgresdb
    why: Engine-level indexing/plan reading; Drizzle only expresses these from TS.
  - prompt: "Set up my Neon project and configure connection pooling"
    route_to: neon
    why: Platform/account setup, not the Drizzle ORM layer.
  - prompt: "Write a raw SQL window-function query for a report"
    route_to: sql
    why: Raw SQL authoring unattached to Drizzle's query builder.

capability:
  - scenario: >
      Add a `posts` table related to `users`, write a type-safe query loading each user with their
      posts, and produce the migration to apply it.
    must_include:
      - "pgTable for posts with a foreign key (.references(() => users.id))"
      - "relations defined via relations() OR defineRelations()"
      - "{ schema } (v1) or { relations } (v2) passed to drizzle()"
      - "db.query.users.findMany({ with: { posts: true } })"
      - "drizzle-kit generate then migrate (NOT push) for the migration"
      - "row types derived with $inferSelect / $inferInsert"
      - "matching dialect 'postgresql' in drizzle.config.ts and pgTable helper"
deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall