db-migrate
Skill2 starsChanged 4 months agoMITView on GitHub
Generate a database schema migration from a described change — add a table/column, alter a type, add an index or constraint — using the project's migration tool, with a safe up and down. Use when the user says "create a migration", "add a column to the database", "generate a schema migration", "alter this table", "add an index", or "migrate the database schema".
19 other projects use a version of this.
Adopted by
Most recently taken up by
- harmnot/trackfudtheir own version, first seen Nov 15, 2026
- suxrobGM/jobpilottheir own version, first seen Nov 7, 2026
- lablup/backend.aitheir own version, first seen Oct 8, 2026
- linuxfoundation/insightstheir own version, first seen Oct 8, 2026
- Ame-Al/ametheir own version, first seen Oct 8, 2026
- simstudioai/simtheir own version, first seen Oct 8, 2026
Used with
Projects with it also use react-query-best-practices, you-might-not-need-a-callback and 7 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
bibektimilsina00Skillreact-query-best-practices
Audit and fix React Query usage in apps/web — enforce query key factories, signal forwarding, staleTime, and proper mutation patterns. Use when reviewing or fixing server-state code.
Also in 3 projects that use this
bibektimilsina00Skillyou-might-not-need-a-callback
Analyze and fix useCallback anti-patterns in your code
Also in 3 projects that use this
MicrosoftSkillcleanup
Also in 3 projects that use this
AWSSkillship
Finalize dev work on an issue branch — update docs, push, and open a PR.
Also in 7 projects that use this
VercelSkilldeploy
Deploy applications to Vercel. Use when the user says "deploy", "deploy to Vercel", "push to production", "deploy my app", or "go live".
Also in 4 projects that use this
SentrySkillcommit
Create commit messages following Sentry conventions. Use when committing code changes, writing commit messages, or formatting git history. Follows conventional commits with Sentry-specific issue references.
Also in 3 projects that use this
- +3 more from bibektimilsina00
Other versions19 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 19
- simstudioai/sim★ 30ksame name
- lablup/backend.ai★ 681same name
- linuxfoundation/insights★ 292same name
- alexeykrol/claude-code-starter★ 194same name
- suxrobGM/jobpilot★ 113same name
- getsentry/abacus★ 77same name
- lfrodrigues/packt-claude-code-course-auth★ 9same name
- mgiovani/cc-arsenal★ 8same name
- mean-weasel/bullhorn★ 4same name
- pgnzbl-ux/crucible★ 4same name
9 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository68 other files it gives its agents.
- a11ySkill
- api-docsSkill
- audit-logSkill
- benchmarkSkill
- bisectSkill
- cacheSkill
- changelogSkill
- cherry-pickSkill
- ci-setupSkill
- codeownersSkill
- commit-messageSkill
- connection-poolSkill
- contributingSkill
- coverageSkill
- dead-codeSkill
- debugSkill
- depsSkill
- diagramSkill
- dockerizeSkill
- docstringSkill
- e2eSkill
- env-exampleSkill
- error-handlingSkill
- explainSkill
- feature-flagSkill
- flaky-testSkill
- gitignoreSkill
- graceful-shutdownSkill
- graphqlSkill
- healthcheckSkill
- i18nSkill
- idempotencySkill
- licenseSkill
- lint-fixSkill
- loggingSkill
- migrateSkill
- mockSkill
- onboardSkill
- optimizeSkill
- paginationSkill
- pr-descriptionSkill
- pre-commitSkill
- profileSkill
- prune-branchesSkill
- rate-limitSkill
- readmeSkill
- rebaseSkill
- refactorSkill
- regexSkill
- releaseSkill
- resolve-conflictsSkill
- retrySkill
- review-diffSkill
- scaffoldSkill
- secrets-scanSkill
- security-headersSkill
- seedSkill
- soft-deleteSkill
- sqlSkill
- squashSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Always include a working down/rollback, or explicitly flag and explain any irreversible step instead of faking one.
- Very specific: line 31
Treat the target as having production data: no implicit data loss, and surface NOT-NULL/default/backfill and locking concerns.
- Distinctive: line 32
Don't run the migration against any database unless the user explicitly asks — generate the file and give the command to apply it.
- Distinctive: line 33
After writing, summarize the change, the up/down behavior, any data/locking risk, and the model code that must be updated to match.
“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Migration tooling signals
!ls -d migrations db/migrate prisma alembic.ini knexfile.* 2>/dev/null
!grep -rilE "knex|prisma|sequelize|typeorm|alembic|flyway|liquibase|django|ActiveRecord|migrate" package.json pyproject.toml Gemfile 2>/dev/null | head
Instructions
Generate a database migration for the change described in $ARGUMENTS. If the change is ambiguous (which table, nullability, default, type), ask before generating — a wrong migration against a real database is costly to undo.
Method
- Detect the migration tool and convention. From the signals above, identify the framework (Prisma, Knex, TypeORM, Sequelize, Alembic, Django, Rails/ActiveRecord, Flyway, Liquibase) and read an existing migration to match its file naming, timestamp/sequence format, and style. Prefer the tool's own generator (
prisma migrate dev,alembic revision,rails g migration,knex migrate:make) so the file lands correctly — show the command. - Read the current schema for the affected table(s) so the change is consistent with existing columns, types, and constraints. Don't guess the current shape.
- Write both directions. Provide a correct
upand a realdownthat exactly reverses it (drop the column/table/index you added). If a change is genuinely irreversible (dropping a column with data), say so explicitly rather than writing a lossy down silently. - Make it safe to run on a populated table. Adding a
NOT NULLcolumn needs a default or a backfill-then-constrain sequence; renaming/dropping needs a thought-out path. Call out locking/downtime risks on large tables (e.g. index creation) and prefer concurrent/online variants where the database supports them. - Keep code models in sync. Note (or update, if the project co-locates them) the ORM model/entity/type that must change to match — a migration that drifts from the model breaks the app.
Rules
- Generate against the real current schema and the project's actual tool — never hand-write a migration in a format the project doesn't use.
- Always include a working
down/rollback, or explicitly flag and explain any irreversible step instead of faking one. - Treat the target as having production data: no implicit data loss, and surface NOT-NULL/default/backfill and locking concerns.
- Don't run the migration against any database unless the user explicitly asks — generate the file and give the command to apply it.
- After writing, summarize the change, the up/down behavior, any data/locking risk, and the model code that must be updated to match.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

