Skip to content
Back to skills

Api Migration Verifier

ASecurity

Verifies database migrations are safe, reversible, don't lose data, include proper indexes, and follow multi-tenancy patterns

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
databasessqlapidatabaseperformance

Works with

  • api

Security analysis

A100/100

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill api-migration-verifier --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Api Migration Verifier?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Api Migration Verifier
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-api-migration-verifier/badge)](https://www.skillsdirectory.com/skills/david-li0406-api-migration-verifier)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: api-migration-verifier
description: Verifies database migrations are safe, reversible, don't lose data, include proper indexes, and follow multi-tenancy patterns
allowed-tools:
  - Read
  - Grep
  - Glob
---

## Purpose

Verifies database migrations are safe, reversible, don't lose data, include proper indexes, and follow multi-tenancy patterns.

## Responsibilities

1. **Safety Checks**
   - Check for destructive operations (DROP, ALTER)
   - Verify rollback SQL is present
   - Check for data loss risks
   - Validate foreign key dependencies

2. **Performance Analysis**
   - Check for missing indexes
   - Identify slow operations
   - Suggest index additions
   - Validate composite indexes for tenant queries

3. **Multi-Tenancy Checks**
   - Verify `organization_id` in new tables
   - Check tenant-scoped indexes
   - Validate tenant isolation

4. **Migration Order**
   - Check for circular dependencies
   - Validate migration sequence
   - Check for breaking changes

## Checks Performed

### Safety Checks

- [ ] No DROP TABLE on existing tables
- [ ] No DROP COLUMN on existing columns
- [ ] Rollback SQL present
- [ ] Rollback is reversible
- [ ] Data migration included for ALTER COLUMN
- [ ] Foreign key dependencies satisfied

### Performance Checks

- [ ] Indexes on new table columns
- [ ] Composite indexes on (organization_id, column)
- [ ] No sequential scans expected
- [ ] Indexes for foreign keys

### Multi-Tenancy Checks

- [ ] organization_id column present
- [ ] organization_id is NOT NULL
- [ ] Index on organization_id
- [ ] Composite indexes for tenant queries

### Data Integrity Checks

- [ ] NOT NULL constraints
- [ ] FOREIGN KEY constraints
- [ ] UNIQUE constraints include organization_id
- [ ] CHECK constraints for data validation

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…