Drizzle
DevelopmentdrizzleDrizzle is an Agent Skill for development published in the a5c-ai/babysitter repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Drizzle ORM patterns, migrations, type-safe queries, and database schema design.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/a5c-ai/babysitter/blob/HEAD/library/specializations/web-development/skills/drizzle/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/drizzle, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Drizzle Skill
Expert assistance for database operations with Drizzle ORM.
Capabilities
- Define type-safe database schemas
- Write performant SQL queries
- Handle migrations
- Implement relations
- Configure multiple database dialects
Schema Definition
import { pgTable, text, timestamp, uuid, varchar } from 'drizzle-orm/pg-core';
import { relations } from 'drizzle-orm';
export const users = pgTable('users', {
id: uuid('id').primaryKey().defaultRandom(),
name: varchar('name', { length: 255 }).notNull(),
email: varchar('email', { length: 255 }).notNull().unique(),
createdAt: timestamp('created_at').defaultNow().notNull(),
});
export const posts = pgTable('posts', {
id: uuid('id').primaryKey().defaultRandom(),
title: varchar('title', { length: 255 }).notNull(),
content: text('content'),
authorId: uuid('author_id').references(() => users.id),
});
export const usersRelations = relations(users, ({ many }) => ({
posts: many(posts),
}));
Queries
// Select with relations
const result = await db.query.users.findMany({
with: { posts: true },
where: eq(users.name, 'John'),
});
// Insert
await db.insert(users).values({ name: 'John', email: '[email protected]' });
// Update
await db.update(users).set({ name: 'Jane' }).where(eq(users.id, id));
Target Processes
- database-setup
- backend-development
- nextjs-full-stack