Migration & Progressive Rollout Safety Audit
Reads your database migrations and rollout setup for the changes that turn a normal deploy into an outage.
What it examines
- Renames and drops that break the version still running
- Index builds and updates that lock a large table
- Migrations that run from every instance at start-up
- Rollouts that stop every instance at once
- Feature flags nobody owns
- Whether anything checks the release after it ships
What you get back
A findings file. Each item has the evidence, how serious it is, and a fix.
Dependencies
- An AI coding agent that reads SKILL.md files, such as Claude Code, Codex or Gemini CLI
- Read access to the repository: migration files and the framework that runs them, start-up and entrypoint scripts, and feature flag configuration and the code that reads it
- The deployment definitions: Kubernetes manifests, Helm charts, ECS or serverless definitions, and the pipeline that rolls them out
- Optional: table sizes and row counts, from a read-only query or an export. Without them the audit says which statements depend on table size.
- Python 3 with the jsonschema package, to check findings.json before fixing anything
How it works
The audit only reads. It never runs a migration, deploys or toggles a flag.
It finds the migration tool, the database engine and the rollout mechanism afresh, then runs every check on how changes reach production.
Without table sizes it cannot say whether a risky statement is slow in practice. It names those statements instead of guessing.
You get findings.json and findings.md. The remediate skill reads findings.json, makes the safe changes and plans the larger ones.
Setup
- Unzip the download, then copy the audit and remediate folders into your agent's skills folder (for Claude Code, .claude/skills/) in the repository you want to check.
- If you can, export table sizes and row counts for the largest tables.
- Open the repository in your agent and ask it to run the i4-safe-delivery-migrations-audit skill.
- Check the result with the validator: pip install jsonschema, then python3 schema/validate.py findings.json.
- Ask your agent to run the i4-safe-delivery-migrations-remediate skill using findings.json.
Run it with your agent
Copy the prompt, fill in the parts in square brackets, and paste it into your agent.
Run the i4-safe-delivery-migrations-audit skill on this repository. Table sizes and row counts: [path, or none]. Never run a migration or deploy. Mode: audit only. Do not change any code. Write findings.json and findings.md in the repository root.
Run the i4-safe-delivery-migrations-remediate skill using findings.json. Work through the findings I choose, and leave the rest open.