/engineering-practices:drizzle-orm-patternsfrom engineering-practices
Provides Drizzle ORM patterns for schema definition, CRUD operations, relations, queries, transactions, and migrations across PostgreSQL, MySQL, SQLite, MSSQL, and CockroachDB.
Ships in engineering-practices. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Expert guide for building type-safe database applications with Drizzle ORM. Covers schema definition, relations, queries, transactions, and migrations for all supported databases.
| Database | Table Function | Import |
|---|---|---|
| PostgreSQL | pgTable() | drizzle-orm/pg-core |
| MySQL | mysqlTable() | drizzle-orm/mysql-core |
| SQLite | sqliteTable() | drizzle-orm/sqlite-core |
| MSSQL | mssqlTable() | drizzle-orm/mssql-core |
| Operation | Method | Example |
|---|---|---|
| Insert | db.insert() | db.insert(users).values({...}) |
| Select | db.select() | db.select().from(users).where(eq(...)) |
| Update | db.update() | db.update(users).set({...}).where(...) |
| Delete | db.delete() | db.delete(users).where(...) |
| Transaction | db.transaction() | db.transaction(async (tx) => {...}) |
relations() or defineRelations()import { pgTable, serial, text } from 'drizzle-orm/pg-core';
import { drizzle } from 'drizzle-orm/node-postgres';
import { eq } from 'drizzle-orm';
export const users = pgTable('users', {
id: serial('id').primaryKey(),
name: text('name').notNull(),
email: text('email').notNull().unique(),
});
const db = drizzle(process.env.DATABASE_URL);
const [user] = await db.select().from(users).where(eq(users.id, 1));
import { eq } from 'drizzle-orm';
// Insert
const [newUser] = await db.insert(users).values({
name: 'John',
email: '[email protected]',
}).returning();
// Update
await db.update(users)
.set({ name: 'John Updated' })
.where(eq(users.id, 1));
// Delete
await db.delete(users).where(eq(users.id, 1));
await db.transaction(async (tx) => {
const [from] = await tx.select().from(accounts)
.where(eq(accounts.userId, fromId));
if (from.balance < amount) {
tx.rollback();
}
await tx.update(accounts)
.set({ balance: sql`${accounts.balance} - ${amount}` })
.where(eq(accounts.userId, fromId));
});
See references/transactions.md for advanced transaction patterns.
$inferInsert / $inferSelectgenerate + migrate in production, push for developmentdeletedAt timestamp instead of hard deletes when possible.limit() and .where() to fetch only needed data() => table.column to avoid circular dependency issuestx.rollback() throws an exception - use try/catch if needed.returning() - check your dialect compatibilityreferences/best-practices.md (opens in a new tab)references/common-patterns.md (opens in a new tab)references/examples.md (opens in a new tab)references/migrations.md (opens in a new tab)references/patterns.md (opens in a new tab)references/queries-joins-aggregations.md (opens in a new tab)references/relations.md (opens in a new tab)references/schema-definition.md (opens in a new tab)references/transactions.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub ai-agentic-engineering-neo/dev-digest-ai-marketplace --plugin engineering-practices12 skills in this plugin
/fastify-best-practicesGuides development of Fastify Node.js backend servers and REST APIs using TypeScript or JavaScript. Use when building, configuring, or debugging a Fastify application — including defining routes, implementing plugins, setting up JSON Schema validation, handling errors, optimising performance, managing authentication, configuring CORS and security headers, integrating databases, working with WebSockets, and deploying to production. Covers the full Fastify request lifecycle (hooks, serialization, logging with Pino) and TypeScript integration via strip types. Trigger terms: Fastify, Node.js server, REST API, API routes, backend framework, fastify.config, server.ts, app.ts./frontend-architectureCode organization and architecture decisions for React 19 + Next.js 15 App Router (TypeScript). WHERE code lives, not HOW to write it. Covers: project folder structure, feature-based organization, component splitting rules, constants/utils/helpers/services placement, business logic separation, naming conventions, state colocation, and Next.js Server/Client Component boundary decisions. TRIGGER when: "where to put", "folder structure", "project structure", "how to organize", "where does X live", "code organization", "feature folder", "colocation", "business logic", "utils vs helpers", "constants", "component splitting", "Server Component or Client Component", "Server Action or Route Handler", "where do I place". Does NOT cover: React hooks API, component implementation style, Next.js caching/metadata features, state management APIs (use react-best-practices, next-best-practices, or typescript-expert for those).
9 plugins ship this exact skill · first indexed Jul 20, 2026
Showing 6 of 9 plugins, one per repository first
Other plugins' skills for the same job