Migration Safety

Migration Safety is a skill for Claude Code, Codex from niels-emmer/myace. It costs 21 tokens per session (814 once invoked), scanned A, original, MIT.

A safety checklist for database schema migrations, which are changes to tables, columns, indexes, or data rules.

In plain words
What is it for?
Planning and testing migrations, writing and running rollback steps, checking locking risks, and ensuring applied migration files are not edited afterward.
Why use it?
It reduces the risk of production outages, locked tables, failed rollbacks, and irreversible changes that were not clearly identified.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for aider. Also seen: mentions Codex; built for aider; mentions OpenCode.

Good fit Planning and testing migrations, writing and running rollback steps, checking locking risks, and ensuring applied migration files are not edited afterward.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/niels-emmer/myace/migration-safety
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 niels-emmer/myace --skill migration-safety
Clone the repo
git clone --depth 1 https://github.com/niels-emmer/myace

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 Migration Safety

README.md
[![agentmods](https://agentmods.dev/badge/skills/niels-emmer/myace/migration-safety/github.svg)](https://agentmods.dev/skills/niels-emmer/myace/migration-safety)
Your own site
<a href="https://agentmods.dev/skills/niels-emmer/myace/migration-safety"><img src="https://agentmods.dev/badge/skills/niels-emmer/myace/migration-safety/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 Safety

Your own site · 80×15
<a href="https://agentmods.dev/skills/niels-emmer/myace/migration-safety"><img src="https://agentmods.dev/badge/skills/niels-emmer/myace/migration-safety.svg" alt="Reviewed on agentmods" width="80" 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 814 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.00021 $0.00814
Opus 5 $0.00010 $0.00407
Sonnet 5 $0.00004 $0.00163
Haiku 4.5 $0.00002 $0.00081

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

Security

Grade A, and why

Migration Safety 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 11d 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.

collections/additional/backend/skills/migration-safety/SKILL.md · 43 lines

How it starts

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

Purpose

A schema migration is one of the few changes in a backend codebase that's genuinely hard to undo once it's run against production data. This skill is a checklist for writing migrations that are safe to ship: they roll back cleanly, they don't quietly lock a hot table, and they never get hand-edited after the fact.

When to use it

Every time a change requires adding, altering, or removing a table, column, index, or constraint — not just for "big" migrations. Small migrations cause outages just as often as big ones; the discipline should be automatic, not reserved for changes that look risky.

The working-rollback requirement

  • Write downgrade() (or your migration tool's equivalent) at the same time as upgrade(), not as a stub to fill in later.
  • Actually run the rollback locally against a database that has the upgrade applied, and confirm the schema afterward matches pre-migration state. A downgrade() that's never been executed is unverified code, no different from an untested code path anywhere else.
  • If a migration is genuinely irreversible (e.g. it drops a column and the data is gone), say so explicitly in the migration and think hard about whether that's really necessary now, versus deprecating the column first and dropping it in a later, separate migration once you're sure nothing needs it.

Never edit a committed migration

  • Once a migration has been merged (and especially once it's been applied anywhere outside your own branch), treat the file as immutable. If you find a mistake, write a new migration that corrects it — don't go back and change the original.
  • Editing an already-applied migration means the migration history table (whatever tracks "which migrations have run") no longer matches what the file actually says, which silently desyncs anyone who already ran the old version from anyone running the edited one. This is one of the few migration mistakes that's genuinely hard to recover from cleanly.

Locking and performance review

Read the full file on GitHub · 43 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. 11d ago First seen · 43 lines · 21 tokens per session scan A 2cb1c663ef6a

Subscribe to this mod's changes

Migration Safety is a skill published in the GitHub repository niels-emmer/myace (1 stars, last pushed 5d ago), licensed MIT. It adds 21 tokens to every session and 814 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

db-migrations

Use when a schema change must ship without downtime — NOT NULL, rename, type change, or backfilling millions of live rows — for the expand-contract sequence and the lock/batching discipline that keeps each step from freezing prod. NOT lock internals or EXPLAIN (that is postgresdb), NOT drizzle-kit mechanics (that is…

ericrisco/rsc-harness · 90 tokens

drizzle-orm

Use when modeling data or querying with Drizzle ORM in TypeScript — pgTable schema in .ts, type-safe select/insert/relational queries, drizzle-kit migrations. NOT Prisma Client or schema.prisma (that is prisma-orm), NOT ORM-agnostic migration strategy (that is db-migrations), NOT Postgres engine tuning or EXPLAIN…

ericrisco/rsc-harness · 96 tokens

prisma-orm

Use when modeling data or writing type-safe queries with Prisma ORM in TypeScript — schema.prisma, prisma.config.ts, the generated Prisma Client, and Prisma Migrate, including the v6 to v7 upgrade. NOT schema-as-TS with a SQL builder (that is drizzle-orm), NOT ORM-agnostic zero-downtime migration (that is…

ericrisco/rsc-harness · 101 tokens

loom-database-design

Database schema and data model design for relational, NoSQL, time-series, and warehouse systems.

cosmix/loom · 24 tokens

loom-sql-optimization

Analyzes and optimizes SQL queries for performance.

cosmix/loom · 16 tokens

loom-caching

Caching strategies for performance optimization — cache-aside, write-through, write-behind, TTL policies, eviction, and stampede prevention.

cosmix/loom · 31 tokens