drizzle-orm

drizzle-orm is a skill for Claude Code, Codex from neverinfamous/memory-journal-mcp. It costs 65 tokens per session (711 once invoked), scanned A, original, MIT.

Guidance for Drizzle ORM, a TypeScript library that maps application code to database tables and queries.

In plain words
What is it for?
Use it when designing schemas, writing queries, and managing ORM migrations with SQLite or Cloudflare D1, after choosing the database engine.
Why use it?
It helps keep the TypeScript schema as the source of truth, generate migrations consistently, and avoid unnecessarily broad database queries.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when designing schemas, writing queries, and managing ORM migrations with SQLite or Cloudflare D1, after choosing the database engine.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/neverinfamous/memory-journal-mcp/drizzle-orm
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add neverinfamous/memory-journal-mcp --skill drizzle-orm
Clone the repo
git clone --depth 1 https://github.com/neverinfamous/memory-journal-mcp

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for drizzle-orm

README.md
[![agentmods](https://agentmods.dev/badge/skills/neverinfamous/memory-journal-mcp/drizzle-orm/github.svg)](https://agentmods.dev/skills/neverinfamous/memory-journal-mcp/drizzle-orm)
Your own site
<a href="https://agentmods.dev/skills/neverinfamous/memory-journal-mcp/drizzle-orm"><img src="https://agentmods.dev/badge/skills/neverinfamous/memory-journal-mcp/drizzle-orm/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for drizzle-orm

Your own site · 80×15
<a href="https://agentmods.dev/skills/neverinfamous/memory-journal-mcp/drizzle-orm"><img src="https://agentmods.dev/badge/skills/neverinfamous/memory-journal-mcp/drizzle-orm.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 711 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00065 $0.00711
Opus 5.5 $0.00026 $0.00284
Sonnet 5.5 $0.00013 $0.00142
Haiku 4.5 $0.00006 $0.00071

Measured 1mo ago against content hash 6d963d8ed86d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

drizzle-orm scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/drizzle-orm/SKILL.md · 83 lines

How it starts

The opening of the file, as written. The whole thing — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Drizzle ORM Guidelines

This skill provides opinionated standards for using Drizzle ORM, optimized for TypeScript and edge databases like Cloudflare D1.

1. Core Principles

  • Single Source of Truth: Define your database schema in TypeScript. Let Drizzle generate the SQL migrations.
  • Explicit Returns: Always explicitly select the columns you need using .select({ id: table.id }). Avoid select * in production queries to minimize payload size and improve performance.
  • Relational Queries: Use Drizzle's Relational Query API (db.query) for complex joined data fetching, but use the Core API (db.select().from()) for mutations and simple lookups.
  • Type Inference: Use typeof schema.table.$inferSelect and $inferInsert to generate application types directly from the schema.

2. Schema Definition

Always define schemas with precise types and constraints.

import { sqliteTable, text, integer } from 'drizzle-orm/sqlite-core'

export const users = sqliteTable('users', {
  id: integer('id').primaryKey({ autoIncrement: true }),
  email: text('email').notNull().unique(),
  name: text('name').notNull(),
  createdAt: integer('created_at', { mode: 'timestamp' })
    .notNull()
    .$defaultFn(() => new Date()),
})

export type User = typeof users.$inferSelect
export type NewUser = typeof users.$inferInsert

3. Querying Patterns

Inserts and Returning

const result = await db
  .insert(users)
  .values({ email: '[email protected]', name: 'Test' })
  .returning() // Supported in D1

Relational Queries (Read-Heavy)

Ensure you define relations in your schema file:

export const usersRelations = relations(users, ({ many }) => ({
  posts: many(posts),
}))

Fetch deeply nested data easily:

const userWithPosts = await db.query.users.findFirst({
  where: eq(users.id, 1),
  with: {
    posts: true,
  },
})

4. Migrations (Cloudflare D1)

Always generate migrations locally and apply them via Wrangler. Never execute db.execute() with raw migration SQL at runtime.

Read the full file on GitHub · 83 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 83 lines · 65 tokens per session scan A 6d963d8ed86d

Subscribe to this mod's changes

drizzle-orm is a skill published in the GitHub repository neverinfamous/memory-journal-mcp (20 stars, last pushed 3mo ago), licensed MIT. It adds 65 tokens to every session and 711 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

drizzle-orm-expert

Expert in Drizzle ORM for TypeScript — schema design, relational queries, migrations, serverless DB integration. Use when building type-safe database layers with Drizzle, migrating from Prisma, or optimizing edge runtime DB access.

RaNDoM6913/claude-code-superkit · 50 tokens

supabase-schema-generator

An SRE-grade automation skill to parse SQL schemas and auto-generate safe TypeScript interfaces for the frontend and Row Level Security (RLS) policies for Supabase.

aragaobruno/toolbelt · 0 tokens

psl-ast-layers

How to use the PSL syntax tree layers (green tree, red tree, strongly-typed AST classes) correctly. Use for any PSL-related work: PSL interpreters (contract-psl), helpers inside the psl-parser package, the language server, formatters, or anything else that consumes parse() output from @internal/psl-parser.

prisma/orm · 78 tokens

ast-visitor-pattern

Use the frozen-class/visitor pattern for discriminated unions that have multiple dispatch sites. Use when creating a new set of variants (commands, IR nodes, factory calls) that will be switched over in 2+ places, or when refactoring an existing union type that has grown multiple switch sites.

prisma/orm · 65 tokens

no-bare-casts

Writing as in TypeScript or TSX production code, modifying a file that contains a bare as cast, silencing a type error with a cast, encountering as unknown as, or reviewing a cast site.

prisma/orm · 52 tokens

bumping-biome

Bumps biome package versions (e.g. @biomejs/biome) using pnpm, aligns biome.jsonc files with the new version/s across the repository and runs biome-related checks. Use when required to update biome to a newer version - explicitly or implicitly (e.g. after running pnpm up, pnpm update, pnpm upgrade without specific…

prisma/orm · 96 tokens