database-migrations

database-migrations is a skill for Claude Code, Codex from New1Direction/korgex. It costs 21 tokens per session (364 once invoked), scanned A, original, MIT.

Guidance for changing a database schema—the structure of stored data—while a live application continues running. It covers ordered, reversible migrations, backfills, and staged removal of old fields.

In plain words
What is it for?
Use it when adding, changing, renaming, or removing database tables and columns in a production system.
Why use it?
A bad schema change can lose shared data or interrupt the service. These practices reduce that risk and leave a safer path to retry or roll back changes.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/new1direction/korgex/database-migrations
Any agent
npx skills add New1Direction/korgex --skill database-migrations
Clone the repo
git clone --depth 1 https://github.com/New1Direction/korgex

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/new1direction/korgex/database-migrations.svg)](https://agentmods.dev/skills/new1direction/korgex/database-migrations)
Your own site
<a href="https://agentmods.dev/skills/new1direction/korgex/database-migrations"><img src="https://agentmods.dev/badge/skills/new1direction/korgex/database-migrations.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 364 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00021 $0.00364
Opus 5 $0.00010 $0.00182
Sonnet 5 $0.00004 $0.00073
Haiku 4.5 $0.00002 $0.00036

Measured 3d ago against content hash d442c0df3d31, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 3d 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.

src/skills_builtin/database-migrations/SKILL.md · 30 lines

What it actually says

A schema change touches persistent, shared, irreplaceable data. Slow down: a bad migration can't be "just reverted" once data is lost.

  1. Migration as code. Use the project's migration tool; never hand-edit production schema. Each migration is small, ordered, version-controlled, and has a tested down/rollback path where possible.
  2. Additive first (expand/contract). To change something live:
    • Expand: add the new column/table (nullable / with a default), deploy code that writes BOTH old and new.
    • Backfill existing rows in batches (not one giant locking update).
    • Migrate reads to the new shape, verify.
    • Contract: only after everything uses the new shape, drop the old. This keeps old and new code working simultaneously → zero downtime, safe rollback.
  3. Never destructive in one step. Don't drop/rename a column in the same release that stops using it — you can't roll back without data loss.
  4. Guard the data. Back up (or snapshot) before a risky migration. Test the migration on a copy with realistic volume — lock duration and timeouts bite at scale.
  5. Make it idempotent + resumable where the tooling allows, so a half-run migration can be safely retried.

Red flag: an irreversible DROP/ALTER shipped together with the code change, or a backfill that locks a big table in a single statement.

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. 3d ago First seen · 30 lines · 21 tokens per session scan A d442c0df3d31

Subscribe to this mod's changes

database-migrations is a skill published in the GitHub repository New1Direction/korgex (5 stars, last pushed 2mo ago), licensed MIT. It adds 21 tokens to every session and 364 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-08-31.

Related

Other skills, from other repositories

vibe-database

Use this skill to design database schemas, tables, and relationships.

xushuodasd/VIBE-Claude-Plugin · 18 tokens

memory-layer

Standalone persistent memory for Pi — smart search, symbol clustering, dedup, auto-recovery, trust scoring. Zero Python dependency.

GeneGulanesJr/LaPis · 29 tokens

cache

Cache. Redis, Memcached, Varnish, CDN, cache invalidation, TTL, write-through, cache stampede, thundering herd.

arbazkhan971/godmode · 33 tokens

persistence-drift

Governs the on-device Drift/SQLite data layer: package:drift and package:sqlite3 confined to lib/data/ behind DAOs that map rows to immutable value objects (no Drift symbol leaks past the repository), invariants pushed into the schema (STRICT tables, CHECK/FK/partial-UNIQUE indexes), foreignkeys/WAL pragmas…

zakariaf/Flutter-Skills · 218 tokens

data-export-and-restore

Enforces user-facing data portability in an offline-first app — backup/restore (exact, machine round-trippable) kept strictly separate from export/report (human, lossy, never a restore source); a versioned envelope carrying formatVersion, schemaVersion, appVersion, exportedAtUtc and a payload checksum so a restore…

zakariaf/Flutter-Skills · 219 tokens

run-migration

Runs the forward-only Drift/SQLite schema-migration ritual — the most dangerous deterministic operation in an offline-first app: a bad migration silently destroys on-device rows that exist nowhere else. Enforces the exact ordered sequence: take a pre-migration file snapshot before the database is opened, bump…

zakariaf/Flutter-Skills · 197 tokens