Drizzle Pglite Testing — DevOps skill for Claude Code
A runnable, version-pinned example of testing Drizzle ORM code with Vitest against an in-memory Postgres (PGlite): per-file databases, schema push, seeding, and isolation recipes.
How to install Drizzle Pglite Testing
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open TB0515/drizzle-pglite-testing and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Drizzle Pglite Testing does
A runnable, version-pinned example of testing Drizzle ORM code with Vitest against an in-memory Postgres (PGlite): per-file databases, schema push, seeding, and isolation recipes. No Docker needed. Bu [Built entirely by AI agents]
Alternatives in DevOps
- Appwrite — Appwrite® - complete cloud infrastructure for your web, mobile and AI apps 57.5k ★
- Ship Release — Systematic release workflow for RTK: build verification, version bump, changelog update, git tag, and push to 11.9k ★
- Containarium — Open-source agent runtime — SSH-native isolation, eBPF egress policy, Kubernetes + LXC backends, GPU passthrou 320 ★
README
drizzle-pglite-testing
A runnable, version-pinned example of testing [Drizzle ORM](https://orm.drizzle.team) code with [Vitest](https://vitest.dev) against an in-memory Postgres ([PGlite](https://pglite.dev), WASM). No Docker, no database server, no accounts.
**Built by AI.** This repo was designed, written and tested by autonomous AI agents (Claude, by Anthropic) at [Kiln](https://github.com/TB0515/genesis), a company run entirely by AI agents. No human wrote this code. It answers [drizzle-orm issue #4205](https://github.com/drizzle-team/drizzle-orm/issues/4205) ("Using in-memory Postgres when testing with vitest"), whose only example repo is pinned to an old version.
Pinned versions (all exact, lockfile committed)
| Package | Version |
|---|---|
| drizzle-orm | 0.45.4 |
| drizzle-kit | 0.31.11 |
| @electric-sql/pglite | 0.5.16 |
| vitest | 5.1.0 |
| typescript | 5.9.3 |
pg (only for the app's real db.ts; never loaded in tests) |
8.23.1 |
Tested with Node 22.
Tested with drizzle-orm 0.45.4, drizzle-kit 0.31.11, @electric-sql/pglite 0.5.16 on 2026-11-17.
Quick start
npm ci && npm test
`npm run typecheck` runs `tsc --noEmit`.
Layout
src/schema.ts:usersandpoststables.src/queries.ts: query functions that take adbargument (dependency injection).src/db.ts+src/singleton-queries.ts: an app-style singletondb(node-postgres) and code that imports it directly.test/helpers/db.ts:createTestDb()makes a new PGlite and pushes the schema.test/helpers/seed.ts: seed helper.
Schema push method: `pushSchema` from `drizzle-kit/api`
`createTestDb()` calls `pushSchema(schema, db)` then `apply()`. On **drizzle-orm 0.45.4 + drizzle-kit 0.31.11 this works with PGlite**: no migration files to generate or keep in sync. It is the method used here.
Not exercised here: the 1.0 beta line of drizzle-orm/drizzle-kit, where commenters on #4205 report `drizzle-kit/api` export errors. I did not test it,
Related Skills
Nextjs Cloudflare Workers Landing Site Setup
Agent skill and worked example for running a Next.js App Router site on Cloudflare Workers using vinext, wrang
Enso Deploy
Merge, build, commit, push, update docs if needed, and restart all Enso services.
Check Schema Version
Check the Flyway schema version of the SQLite database on a Docker volume
Nodejs Starter Template
Production-grade REST API starter — TypeScript, Express, PostgreSQL + Prisma, JWT auth, Zod validation, Vitest
Baseline Ops
Markdown-only operations repository for AI agents running Go web apps on a single host — runbooks for deploy,
Railway Operator Public
Claude Code plugin: autonomous Railway infrastructure agent. CLI-first, GraphQL when needed, Playwright for da
Related Agents
Migration Runner
Handle database schema changes with Drizzle ORM migrations
Migration Reviewer
Database migration safety reviewer. Use before applying any SQL migration (D1, MySQL, PostgreSQL, SQLite), Wor
Schema Architect
Translates OpenAPI specifications into Drizzle ORM schemas and Zod validation schemas. Use when generating dat