database-pimp
Active router for ALL database and ORM requests — classifies by database type, use case, or ORM preference and routes to the correct skill. Use when choosing a database, setting up an ORM, or working with any data layer.
| Model | Source |
|---|---|
| sonnet | pack: database |
Full Reference
This is not optional. This is not negotiable. You cannot skip this.
Database Pimp
Section titled “Database Pimp”The orchestration layer for all database expertise. Not documentation — an active router. Every database request flows through this routing table before any response.
Mandatory Announcement — FIRST OUTPUT before anything else:
┏━ 🗄 database-pimp ━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓┃ [one-line description of request/routing] ┃┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛No exceptions. Box frame first, then route.
Quick Context
Section titled “Quick Context”The database pack covers 6 databases + 2 ORMs — serverless Postgres, BaaS, document, cache, vector, and edge storage. Pair with orm pack (Drizzle/Prisma) for type-safe access.
Routing Table
Section titled “Routing Table”Classify the request. Invoke the matching skill. No response before invocation.
| Request Pattern | Skill |
|---|---|
| Serverless Postgres, Neon, branching, connection pooling | neon |
| Supabase, RLS, realtime subscriptions, storage buckets | supabase |
| MongoDB, document modeling, aggregation pipelines | mongodb |
| Redis, Upstash, caching, rate limiting, pub/sub | redis-upstash |
| Vector search, embeddings, pgvector, similarity queries | postgresql-pgvector |
| Edge database, SQLite, libSQL, Turso, local-first, vector search in SQLite, AI agent databases, embedded replicas, branching preview DBs, Turso CLI, Turso pricing | turso |
| Drizzle ORM, type-safe queries, push migrations | drizzle |
| Prisma ORM, schema modeling, prisma migrate | prisma |
| ”Which database should I use?” | Decision matrix below |
Decision Matrix
Section titled “Decision Matrix”When the user asks which database to use, route through this before any skill invocation:
| Use Case | Recommendation |
|---|---|
| Serverless Postgres, new project, Vercel/Cloudflare | Neon — branch-per-PR, autoscale to zero |
| Postgres + auth + storage + realtime in one | Supabase — BaaS, RLS, storage, realtime |
| Document data, flexible schema, nested objects | MongoDB — document modeling, aggregation |
| Caching, sessions, rate limiting, queues | Redis/Upstash — serverless Redis, global edge |
| Semantic search, AI embeddings, similarity | pgvector — postgres extension, vector indexing |
| Edge runtime, SQLite, offline-first, AI agent DBs, vector search in SQLite | Turso — libSQL, distributed edge, embedded replicas, native vector search, per-agent DBs |
| New project, type-safe schema, push workflow | Drizzle — lightweight, SQL-like, no shadow DB |
| Existing Prisma schema, complex relations | Prisma — mature, rich ecosystem, generate types |
Neon vs Supabase: Both are serverless Postgres. Choose Neon for pure database needs (branching, pooling). Choose Supabase when you also need auth, storage, or realtime out of the box.
Drizzle vs Prisma: New projects → Drizzle (faster, lighter, push-based). Existing Prisma schema → stay on Prisma.
State Detection
Section titled “State Detection”Before routing, check project state:
stack.json→ readdatabaseandormkeys, route directlypackage.jsondeps → detect installed DB clients, ORM packagesdrizzle.config.*→ Drizzle is in useschema.prisma→ Prisma is in use.env/.env.example→ check forDATABASE_URL,SUPABASE_URL,TURSO_*,UPSTASH_*
| State | Recommendation |
|---|---|
| No database detected | Ask use case → run decision matrix |
DATABASE_URL with neondb.net | Route to neon |
SUPABASE_URL present | Route to supabase |
TURSO_DATABASE_URL present | Route to turso |
UPSTASH_REDIS_REST_URL present | Route to redis-upstash |
drizzle.config.* present | Route to drizzle |
schema.prisma present | Route to prisma |
Chaining Patterns
Section titled “Chaining Patterns”| User Says | Chain |
|---|---|
| ”Set up my database” | Decision matrix → DB skill → ORM skill |
| ”Add caching to my app” | redis-upstash |
| ”Add search to my app” | postgresql-pgvector (semantic) or mongodb (text) |
| “Set up auth + database” | supabase (handles both) |
| “I need a type-safe ORM” | drizzle (new) or prisma (existing schema) |
| “Set up database for edge” | turso → drizzle (libSQL adapter) |
| “Add vector search to SQLite” | turso (native — no pgvector needed) |
| “Build a RAG app with SQLite” | turso (vector search + AI embeddings) |
| “Per-agent or per-tenant database” | turso (Platform API, one DB per agent) |
Hard Rules
Section titled “Hard Rules”- Never respond about databases before invoking the target skill
- No summarizing, planning to invoke, or explaining what you’re about to do
- If unclear which database, run the decision matrix — ask ONE question if needed
- The skill’s content has the verified facts — always defer to it
- ORM questions that are DB-agnostic → route to
drizzleorprismadirectly - Never recommend a database that conflicts with
stack.jsonwithout flagging it