migration-assistant

migration-assistant is an agent for Claude Code from ruchernchong/claude-kit. It costs 25 tokens per session (899 once invoked), scanned A, original, MIT.

A database-migration planning guide for Drizzle Kit and PostgreSQL. A database migration is a recorded change to the structure of stored data, such as adding a column or changing a table.

In plain words
What is it for?
Use it to modify Drizzle schemas, generate and apply migration files, plan safe upgrades, and review development-only schema changes.
Why use it?
It helps apply database-structure changes in a controlled order while reducing the risk of losing data or breaking the application.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Use it to modify Drizzle schemas, generate and apply migration files, plan safe upgrades, and review development-only schema changes.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/ruchernchong/claude-kit/migration-assistant
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.

Clone the repo
git clone --depth 1 https://github.com/ruchernchong/claude-kit

Made for: Claude Code.

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 migration-assistant

README.md
[![agentmods](https://agentmods.dev/badge/agents/ruchernchong/claude-kit/migration-assistant/github.svg)](https://agentmods.dev/agents/ruchernchong/claude-kit/migration-assistant)
Your own site
<a href="https://agentmods.dev/agents/ruchernchong/claude-kit/migration-assistant"><img src="https://agentmods.dev/badge/agents/ruchernchong/claude-kit/migration-assistant/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 migration-assistant

Your own site · 80×15
<a href="https://agentmods.dev/agents/ruchernchong/claude-kit/migration-assistant"><img src="https://agentmods.dev/badge/agents/ruchernchong/claude-kit/migration-assistant.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 899 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.00025 $0.00899
Opus 5.5 $0.00010 $0.00360
Sonnet 5.5 $0.00005 $0.00180
Haiku 4.5 $0.00003 $0.00090

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

Security

Grade A, and why

migration-assistant 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.

agents/migration-assistant.md · 188 lines

How it starts

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

You are an expert at planning and executing database migrations with Drizzle Kit.

Drizzle Kit Setup

Configuration

// drizzle.config.ts
import { config } from 'dotenv';
import { defineConfig } from 'drizzle-kit';

config({ path: '.env' });

export default defineConfig({
  schema: './src/db/schema.ts',
  out: './drizzle',
  dialect: 'postgresql',
  dbCredentials: {
    url: process.env.DATABASE_URL!,
  },
});

Commands

# Generate migration from schema changes
pnpm drizzle-kit generate

# Apply migrations to database
pnpm drizzle-kit migrate

# Push schema directly (dev only)
pnpm drizzle-kit push

# Open Drizzle Studio
pnpm drizzle-kit studio

Migration Workflow

1. Modify Schema

// Before
export const users = pgTable('users', {
  id: serial('id').primaryKey(),
  name: text('name'),
});

// After - add email column
export const users = pgTable('users', {
  id: serial('id').primaryKey(),
  name: text('name'),
  email: text('email'), // New column (nullable first)
});

2. Generate Migration

pnpm drizzle-kit generate

Creates a migration file in ./drizzle/:

-- 0001_add_email_to_users.sql
ALTER TABLE "users" ADD COLUMN "email" text;

3. Apply Migration

pnpm drizzle-kit migrate

Safe Migration Patterns

Adding a Required Column

  1. Add as nullable first
  2. Backfill existing rows
  3. Add NOT NULL constraint
// Step 1: Add nullable column
email: text('email'),

// Step 2: After backfill, make required
email: text('email').notNull(),

Renaming a Column

  1. Add new column
  2. Copy data
  3. Drop old column
-- Migration
ALTER TABLE "users" ADD COLUMN "full_name" text;
UPDATE "users" SET "full_name" = "name";
ALTER TABLE "users" DROP COLUMN "name";

Adding an Index

export const posts = pgTable('posts', {
  id: serial('id').primaryKey(),
  authorId: integer('author_id').notNull(),
}, (table) => [
  index('posts_author_idx').on(table.authorId),
]);

Read the full file on GitHub · 188 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 · 188 lines · 25 tokens per session scan A 9e38a3b205f6

Subscribe to this mod's changes

migration-assistant is an agent published in the GitHub repository ruchernchong/claude-kit (0 stars, last pushed 5mo ago), licensed MIT. It adds 25 tokens to every session and 899 once invoked, about $0.0001 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-09-01.

Related

Other agents, from other repositories

Neon Performance Analyzer

Identify and fix slow Postgres queries automatically using Neon's branching workflow. Analyzes execution plans, tests optimizations in isolated database branches, and provides clear before/after performance metrics with actionable code fixes.

github/awesome-copilot · 46 tokens

Oracle-to-PostgreSQL Migration Expert

Agent for Oracle-to-PostgreSQL application migrations. Educates users on migration concepts, pitfalls, and best practices; makes code edits and runs commands directly.

github/awesome-copilot · 41 tokens

Neon Migration Specialist

Safe Postgres migrations with zero-downtime using Neon's branching workflow. Test schema changes in isolated database branches, validate thoroughly, then apply to production—all automated with support for Prisma, Drizzle, or your favorite ORM.

github/awesome-copilot · 50 tokens

PostgreSQL Database Administrator

Work with PostgreSQL databases using the PostgreSQL extension.

github/awesome-copilot · 17 tokens

qwery-agent

Expert database query agent with schema awareness. Converts natural language to SQL, validates queries against database schema, and provides efficient query execution. Supports schema versioning and time-travel queries. Uses GFS branching for safe destructive operations.

Guepard-Corp/gfs · 49 tokens

database-reviewer

Use when writing SQL queries, creating migrations, or troubleshooting database performance in Supabase/PostgreSQL projects. Reviews indexes, RLS policies, schema types, N+1 patterns. Read-only reviewer with EXPLAIN ANALYZE capability.

sangrokjung/claude-forge · 52 tokens