Skip to content

mgiovani/ai-arsenal / skills/db-migrate

db-migrate

Verified

Creates, checks the status of, and validates database migrations by auto-detecting the project's migration framework (Alembic, Prisma, Knex, Django, Rails/ActiveRecord, Flyway, Atlas, TypeORM, Sequelize, SQLx, golang-migrate, Liquibase) from marker files, then driving that framework's own CLI. Use when the user wants to create a new migration, check pending vs. applied migration status, or validate a migration for a missing rollback script, a missing foreign-key index, or a destructive operation like DROP TABLE / TRUNCATE / DELETE FROM. Trigger phrases include "create a migration", "check migration status", "any pending migrations", "validate this migration", "does this migration have a rollback". Not for designing the schema change itself or writing ORM model code (use implement-feature), this skill only manages migration files and framework tooling once the schema change is already decided.

FileKindSize
SKILL.mdskill md8.4 KB
evals/evals.jsonconfig3.9 KB
evals/trigger-eval.jsonconfig2.1 KB
references/framework-commands.mdmarkdown6.7 KB

evals/trigger-eval.json

View on GitHub
[
  { "query": "Create a new database migration for adding a phone_number column to users", "should_trigger": true },
  { "query": "Check if there are any pending migrations on this project", "should_trigger": true },
  { "query": "Validate this migration file for a missing rollback script", "should_trigger": true },
  { "query": "Does this migration have a matching down/rollback function?", "should_trigger": true },
  { "query": "Generate an alembic revision for the new orders table", "should_trigger": true },
  { "query": "Run npx prisma migrate status and tell me what's outstanding", "should_trigger": true },
  { "query": "I need a knex migration that adds an index on users.email", "should_trigger": true },
  { "query": "Check this migration for DROP TABLE statements before I apply it", "should_trigger": true },
  { "query": "What's the current schema version according to our migration tool?", "should_trigger": true },
  { "query": "Create a rails migration to add a foreign key from orders to users", "should_trigger": true },
  { "query": "Design the schema for a new orders and line_items feature end to end", "should_trigger": false },
  { "query": "Implement the checkout feature, including whatever DB tables it needs", "should_trigger": false },
  { "query": "This migration is throwing a foreign key constraint error at runtime, fix it", "should_trigger": false },
  { "query": "Refactor the User model to split it into User and UserProfile", "should_trigger": false },
  { "query": "Write a Dockerfile and docker-compose.yml with a Postgres service for local dev", "should_trigger": false },
  { "query": "Sync .env.example with the DATABASE_URL and other env vars this app reads", "should_trigger": false },
  { "query": "Review this PR for correctness bugs and error handling issues", "should_trigger": false },
  { "query": "Generate a GitHub Actions workflow that runs our test suite on push", "should_trigger": false },
  { "query": "Write an ADR documenting why we chose Postgres over MongoDB", "should_trigger": false },
  { "query": "Add unit tests covering the new UserRepository class", "should_trigger": false }
]
deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall