database-migrations

database-migrations is a skill for Claude Code, Codex from jxoesneon/Ciel. It costs 18 tokens per session (526 once invoked), scanned A, original, Apache-2.0.

A guide for changing a live database structure and updating its data without planned downtime. It covers safe schema changes, gradual renaming, indexes, and batched backfills.

In plain words
What is it for?
Use it when adding or renaming columns, creating indexes, migrating large tables, or handling complex Django, Prisma, or Drizzle migrations.
Why use it?
It reduces the risk of locked tables, failed deployments, and inconsistent data during database changes.

Skill for Claude CodeCodex

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

Good fit Use it when adding or renaming columns, creating indexes, migrating large tables, or handling complex Django, Prisma, or Drizzle migrations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jxoesneon/ciel/database-migrations
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 jxoesneon/Ciel --skill database-migrations
Clone the repo
git clone --depth 1 https://github.com/jxoesneon/Ciel

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 database-migrations

README.md
[![agentmods](https://agentmods.dev/badge/skills/jxoesneon/ciel/database-migrations/github.svg)](https://agentmods.dev/skills/jxoesneon/ciel/database-migrations)
Your own site
<a href="https://agentmods.dev/skills/jxoesneon/ciel/database-migrations"><img src="https://agentmods.dev/badge/skills/jxoesneon/ciel/database-migrations/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 database-migrations

Your own site · 80×15
<a href="https://agentmods.dev/skills/jxoesneon/ciel/database-migrations"><img src="https://agentmods.dev/badge/skills/jxoesneon/ciel/database-migrations.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 526 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.00018 $0.00526
Opus 5 $0.00009 $0.00263
Sonnet 5 $0.00004 $0.00105
Haiku 4.5 $0.00002 $0.00053

Measured 8d ago against content hash f48294c9fdcf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

database-migrations 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 8d 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/database-migrations/SKILL.md · 55 lines

What it actually says

CIEL ADAPTATION: Database Migrations (Schema Safety)

This skill formalizes the process for making reversible, zero-downtime database changes. It prioritizes table safety over implementation speed.

Core Mandates

  1. Forward-Only: In production, rollbacks use a NEW forward migration.
  2. Downtime Prevention:
    • Adding Column: Must be nullable or have a default (Postgres 11+).
    • Adding Index: Use CREATE INDEX CONCURRENTLY (Postgres).
    • Renaming: Use the Expand-Contract Pattern (Add new -> Backfill -> Read/Write Both -> Contract).
  3. Data/Schema Split: Never mix DDL (Schema) and DML (Data) in a single migration.

Batch Data Migration

For large tables (>10M rows), the Orchestrator MUST use a batching loop:

  • Update in chunks of 5,000-10,000 rows.
  • Use FOR UPDATE SKIP LOCKED where appropriate.
  • Log progress and include a manual halt mechanism.

Tool-Specific Standards

  • Prisma: Use prisma migrate dev for schema; manual SQL for CONCURRENTLY.
  • Drizzle: Generate migrations into dedicated files; verify ordering.
  • Django: Use SeparateDatabaseAndState to decouple model state from DB state during complex drops.

Anti-Patterns

  • Inline Table Rewrites: Adding a NOT NULL column without a default to an existing large table.
  • Manual SQL: Executing DDL directly in production without a migration file.
  • Amnesiac Rollbacks: Marking a migration as irreversible without documenting the specific reason.
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. 8d ago First seen · 55 lines · 18 tokens per session scan A f48294c9fdcf

Subscribe to this mod's changes

database-migrations is a skill published in the GitHub repository jxoesneon/Ciel (1 stars, last pushed 4d ago), licensed Apache-2.0. It adds 18 tokens to every session and 526 once invoked, about $0.0001 per session on Opus 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-03.

Related

Other skills, from other repositories

supabase-cli

This skill should be used when user asks to "use supabase CLI", "supabase init", "supabase start", "run migrations", "deploy edge functions", "manage Supabase project", or works with the supabase command-line tool for local development and project management.

fcakyon/claude-codex-settings · 60 tokens

supabase-js

This skill should be used when user asks to "use supabase-js", "query Supabase database", "supabase auth", "supabase storage", "supabase realtime", "supabase edge functions", or works with the @supabase/supabase-js JavaScript/TypeScript SDK.

fcakyon/claude-codex-settings · 64 tokens

polar-local-environment

This skill should be used when setting up or managing Polar local development environment with Docker.

fcakyon/claude-codex-settings · 22 tokens

claimable-postgres

Provision instant temporary Postgres databases via Claimable Postgres by Neon (pg.new). No login or credit card required. Use for quick Postgres environments and throwaway DATABASEURL for prototyping.

tmolavi/mcp-agent-skills-hub · 44 tokens

postgresql-optimization

PostgreSQL database optimization workflow for query tuning, indexing strategies, performance analysis, and production database management.

tmolavi/mcp-agent-skills-hub · 26 tokens

cloud-sql-postgres-health

Use these skills when you need to audit database health, identify storage bloat, find invalid indexes, analyze table statistics, and manage maintenance configurations like autovacuum.

tmolavi/mcp-agent-skills-hub · 40 tokens