From cc-arsenal
Create, validate, and manage database migrations across any framework. Auto-detects Alembic, Prisma, Knex, Django, Flyway, Rails, and more.
npx claudepluginhub mgiovani/cc-arsenal --plugin cc-arsenal-teamsThis skill is limited to using the following tools:
> **Cross-Platform AI Agent Skill**
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Cross-Platform AI Agent Skill This skill works with any AI agent platform that supports the skills.sh standard.
Create, validate, and run database migrations across any framework. Auto-detects the migration tool from project files.
CRITICAL: Migration operations can be irreversible in production:
--dry-run mode when supported by the frameworkScan for marker files to identify the migration framework:
# Check for common marker files
ls alembic.ini 2>/dev/null
ls prisma/schema.prisma 2>/dev/null
ls knexfile.* 2>/dev/null
ls flyway.conf 2>/dev/null
ls db/migrate/ 2>/dev/null
ls manage.py 2>/dev/null
ls atlas.hcl 2>/dev/null
Also check:
package.json for knex, db-migrate, sequelize, typeorm dependenciespyproject.toml / requirements.txt for alembic, sqlalchemyGemfile for activerecordIf multiple frameworks detected, ask user which one to use. If none detected, ask user to specify.
Refer to references/framework-commands.md for the full detection table and per-framework commands.
Determine operation mode from $ARGUMENTS:
create (or no argument): Create a new migration filestatus: Show pending and applied migrationsvalidate: Check rollback scripts, naming conventions, index coverageIf --name <name> provided, use it for migration name. Otherwise ask for a descriptive name.
If --dry-run provided, show what would be created/run without executing.
migrations/, db/migrate/) — infer patterndate +%Y%m%d%H%M%SAfter creation, remind user to:
Run the framework's status command and display:
Check the following:
up migration has a down script (warn if missing)REFERENCES or foreign key declarations without corresponding CREATE INDEXDROP TABLE, DROP COLUMN, TRUNCATE — flag each oneAlways run these before finalizing a create operation:
Destructive operation detection:
grep -iE "DROP TABLE|DROP COLUMN|TRUNCATE|DELETE FROM" <migration_file>
If found: warn user, require explicit confirmation to proceed.
Missing index check:
grep -iE "REFERENCES|foreign_key|FK_" <migration_file>
If foreign keys present, check for corresponding index creation.
Rollback verification:
Display a summary of what was created or checked:
<command>, rollback with <command>)create: Create a new migration (default if no subcommand given)status: Show migration statusvalidate: Validate existing migrations--name <name>: Migration description for the filename--dry-run: Show what would happen without executingDATABASE_URL is not production# Create a new migration
/db-migrate create --name add_users_table
# Check pending migrations
/db-migrate status
# Validate migration quality
/db-migrate validate
# Create without executing (preview)
/db-migrate create --name drop_legacy_column --dry-run