hyperdrive-drizzle
SkillDev toolsA skill for dev tools by theprimeagen.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the hyperdrive-drizzle skill
What this skill tells your AI
The instructions your AI receives, as published by theprimeagen/skills in skills/hyperdrive-drizzle/SKILL.md and read by ahel’s review.
hyperdrive-drizzle
Rules
- Create the Postgres/Drizzle client inside each Worker invocation (
fetch,queue,scheduled, or Durable Object method) usingenv.HYPERDRIVE.connectionString; never create global pools or long-lived shared clients. - Migrations must ALWAYS run through Drizzle (
drizzle-kit generate,drizzle-kit migrate, or projectbun run db:*scripts); never hand-roll migration SQL or apply schema changes manually. - Keep schema and migrations in lockstep: change
schema.ts, generate a migration, and run the migration before deploying code that depends on it.
Example 1: Drizzle in a Worker (Hyperdrive connection)
import { Client } from "pg";
import { drizzle } from "drizzle-orm/node-postgres";
import { users } from "./db/schema";
export default {
async fetch(_request, env): Promise<Response> {
const client = new Client({
connectionString: env.HYPERDRIVE.connectionString,
});
await client.connect();
const db = drizzle(client);
const result = await db.select().from(users).limit(1);
return Response.json(result[0] ?? null);
},
} satisfies ExportedHandler<{ HYPERDRIVE: Hyperdrive }>;
Example 2: Migration scripts (Drizzle-only workflow)
{
"scripts": {
"db:generate": "drizzle-kit generate",
"db:migrate:local": "drizzle-kit migrate --config drizzle.local.config.ts",
"db:migrate:remote": "drizzle-kit migrate --config drizzle.remote.config.ts"
}
}
Signals
- GitHub stars
- 233
- Forks
- 5
- Last commit
- Feb 2026
Advanced
- Catalog kind
- skill
- Gateway key
hyperdrive-drizzle- Source
- github.com/theprimeagen/skills