migration-safety-checker

migration-safety-checker is a skill for Claude Code from smicolon/ai-kit. It costs 59 tokens per session (2,136 once invoked), scanned A, original, MIT.

A checker for database migrations, which are controlled changes to tables and columns as an application evolves.

In plain words
What is it for?
Use it when creating or running migrations, changing model fields, renaming columns, or altering database tables.
Why use it?
It helps identify schema changes that could be unsafe in production, where real users and data are active.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the django plugin — 8 skills shipped together

Good fit Use it when creating or running migrations, changing model fields, renaming columns, or altering database tables.

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

Made for: Claude Code.

Or install django, the plugin that ships this one along with the rest of its 8 skills.

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-checker

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/smicolon/ai-kit/migration-safety-checker"><img src="https://agentmods.dev/badge/skills/smicolon/ai-kit/migration-safety-checker.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,136 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Anti-Refusal · line 366
    Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
    Fix: Remove instructions that suppress warnings, disclaimers, or ethical commentary. Let the agent surface safety-relevant caveats to the user.
How audits are shown
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.00059 $0.02136
Opus 5 $0.00030 $0.01068
Sonnet 5 $0.00012 $0.00427
Haiku 4.5 $0.00006 $0.00214

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

Security

Grade A, and why

migration-safety-checker 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 9d 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.

packs/django/skills/migration-safety-checker/SKILL.md · 376 lines

How it starts

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

Migration Safety Checker

Validates Django migrations are production-safe before they cause data loss.

Activation Triggers

This skill activates when:

  • Running makemigrations
  • Modifying model fields
  • Mentioning "migration", "schema", "alter table"
  • Adding/removing/renaming fields
  • Changing field types
  • Creating or modifying migration files

Safety Requirements

All migrations MUST be:

  • Reversible - Can roll back safely
  • No data loss - Preserve existing data
  • Tested - Run on staging first
  • Safe for production - No downtime operations
  • Documented - Explain what changes and why

High-Risk Operations

These operations require special attention:

🔴 CRITICAL RISK - Data Loss Possible

  1. Dropping columns without data migration
  2. Renaming fields without data migration
  3. Changing field types (data conversion issues)
  4. Adding non-nullable fields without default
  5. Removing tables with data

🟡 MEDIUM RISK - Requires Careful Planning

  1. Adding indexes on large tables (use CONCURRENTLY)
  2. Adding unique constraints (check for duplicates first)
  3. Changing max_length (data truncation risk)

🟢 LOW RISK - Generally Safe

  1. Adding nullable fields
  2. Adding fields with defaults
  3. Creating new tables
  4. Adding non-unique indexes

Validation Process

Step 1: Analyze Migration File

When migration is created:

# Generated migration
class Migration(migrations.Migration):
    operations = [
        migrations.RemoveField(
            model_name='user',
            name='old_email',  # 🔴 DATA LOSS RISK!
        ),
    ]

Step 2: Identify Risks

Detect:

  • Operation type: RemoveField
  • Field: old_email
  • Risk: 🔴 CRITICAL - Dropping column loses data!

Step 3: Block Unsafe Migration

⛔ UNSAFE MIGRATION DETECTED

Operation: RemoveField(model_name='user', name='old_email')

Risk: 🔴 CRITICAL - Data loss!

Problem:

  • Drops old_email column immediately
  • All existing email data will be PERMANENTLY LOST
  • Cannot be rolled back after data is gone

Safe Approach: Use 3-step migration pattern:

  1. Data migration: Archive old_email data
  2. Wait for deployment
  3. Drop column in separate migration

Should I generate the safe migration sequence?

Read the full file on GitHub · 376 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. 9d ago First seen · 376 lines · 59 tokens per session scan A 2f6f007d8e53

Subscribe to this mod's changes

migration-safety-checker is a skill published in the GitHub repository smicolon/ai-kit (6 stars, last pushed 6d ago), licensed MIT. It adds 59 tokens to every session and 2,136 once invoked, about $0.0003 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

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens

optimize

Analyze and suggest performance improvements for code, queries, or systems.

FlorianBruniaux/claude-code-ultimate-guide · 15 tokens

database-schema-changes

Guide for making database schema changes in Platypus using Drizzle ORM — editing the schema, pushing to a dev database, and generating the migration that ships.

willdady/platypus · 37 tokens

pg-migration

PostgreSQL schema migration safety reviewer and DDL generator. ALWAYS use when writing, reviewing, or planning PostgreSQL schema changes — ALTER TABLE, CREATE/DROP INDEX, column type changes, constraint additions, RLS policy changes, or any DDL touching production tables. Covers lock-level analysis, CREATE INDEX…

johnqtcg/awesome-skills · 135 tokens

mongo-migration

MongoDB schema migration safety reviewer and migration script generator. ALWAYS use when writing, reviewing, or planning MongoDB schema changes — field additions/removals, index builds, schema validator changes, document type migrations, shard key modifications, or any bulk update touching production collections.…

johnqtcg/awesome-skills · 140 tokens

mysql-migration

MySQL schema migration safety reviewer and DDL generator. ALWAYS use when writing, reviewing, or planning MySQL schema changes — ALTER TABLE, CREATE/DROP INDEX, column type changes, charset conversions, data backfills, or any DDL touching production tables. Covers online DDL algorithm selection (INSTANT/INPLACE/COPY)…

johnqtcg/awesome-skills · 132 tokens