secure-migration-reviewer

Review database migrations for security, rollback, and deploy-order risks.

2|Updated Jul 6, 2026
One-click install
npx skills add https://github.com/nguyenpv1980-wq/Project-Aegis --skill secure-migration-reviewer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: secure-migration-reviewer
Source: https://github.com/nguyenpv1980-wq/Project-Aegis/tree/main/.claude/skills/secure-migration-reviewer
Command: npx skills add https://github.com/nguyenpv1980-wq/Project-Aegis --skill secure-migration-reviewer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill reviews database migrations before they ship, helping you catch security, tenant-isolation, rollback, and deploy-safety issues before they become production incidents.

Core Features & Use Cases

  • Security Review: Checks RLS enablement, policy gaps, privilege changes, grants, roles, and unsafe defaults.
  • Operational Safety: Assesses destructive DDL, rollback adequacy, lock risk, and expand-then-contract deploy order.
  • Tenant-Aware Validation: Verifies backfills and data migrations preserve tenant scope and require negative tests when authorization changes.
  • Use Case: You are adding a tenant-owned table with grants and a backfill; this Skill tells you whether the migration is safe to deploy, what must be fixed, and whether the rollback is actually usable.

Quick Start

Ask the secure-migration-reviewer to evaluate this migration for security, rollback, tenant scope, and deploy-order safety before merge.

Frequently Asked Questions about secure-migration-reviewer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check database migrations for security and rollback risks before deploy?

To check database migrations for security risks before deploy, review schema and DDL changes for RLS enablement, policy gaps, privilege widening, destructiveness, and rollback adequacy. Forward and rollback migration artifacts plus current code context are required to assess tenant scope and deploy-order safety.

What is expand-then-contract deploy order and when do I need it for schema migrations?

Expand-then-contract deploy order is a migration strategy that separates schema changes into additive and destructive phases to maintain compatibility with running systems. You need it during database migration review to prevent lock-prone alterations and operational downtime when altering tables, columns, or policies.

How do I validate tenant isolation and RLS policies during a database backfill?

To validate tenant isolation during a database backfill, verify that data migrations preserve tenant scope and check RLS policy gaps or unsafe defaults. Migration review requires negative tests when authorization changes or grants are involved to ensure tenant-owned tables remain secure.

Does migration review work without forward and rollback migration artifacts?

Migration review does not work without both forward and rollback migration artifacts. Assessing rollback adequacy, operational safety, and privilege changes requires current code and schema context alongside both migration directions to accurately evaluate destructiveness and compatibility.

Why does a destructive DDL operation fail operational safety checks?

Destructive DDL operations fail operational safety checks because they introduce irreversible data loss, lock risk, and inadequate rollback paths. Migration review identifies these destructive alterations and verifies whether the provided rollback migration is actually usable before deploy.

When should I not use an automated migration review for schema changes?

You should not rely solely on automated migration review when schema context or current code is missing, as assessing tenant scope, privilege widening, and deploy-order compatibility requires complete forward and rollback artifacts to accurately validate operational safety.