database-migrations
Skill0 starsChanged 3 months agoMITView on GitHub
Plan, implement, review, and verify database schema or data migrations with engine-aware locking, compatibility, backfill, rollback, and deployment sequencing. Use for migration files and persistent schema/data changes; do not use for ordinary application queries without a migration.
33 other projects use a version of this.
Adopted by
Most recently taken up by
- Lukk17/agent-standardstheir own version, first seen Oct 5, 2026
- JameMy0001/antigravity-skills-hubtheir own version, first seen Oct 2, 2026
- productionx-in/Core-Skillstheir own version, first seen Sep 29, 2026
- lintangknitto/agent-skillstheir own version, first seen Sep 23, 2026
- templetongroup/radianttheir own version, first seen Sep 17, 2026
- MortuisVMain/ai-agent-superpowerstheir own version, first seen Sep 15, 2026
Used with
Projects with it also use deployment-patterns, postgres-patterns 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.
InfopibeSkilldeployment-patterns
Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications.
Also in 6 projects that use this
joneqianSkillpostgres-patterns
PostgreSQL database patterns for query optimization, schema design, indexing, and security. Based on Supabase best practices.
Also in 5 projects that use this
InfopibeSkillautonomous-loops
Patterns and architectures for autonomous Claude Code loops — from simple sequential pipelines to RFC-driven multi-agent DAG systems.
Also in 3 projects that use this
Svenja-devSkille2e-testing
Also in 6 projects that use this
xfstudioSkillpython-patterns
Python development principles and decision-making. Framework selection, async patterns, type hints, project structure. Teaches thinking, not copying.
Also in 4 projects that use this
xfstudioSkillarchitecture-decision-records
Write and maintain Architecture Decision Records (ADRs) following best practices for technical decision documentation. Use when documenting significant technical decisions, reviewing past architectural choices, or establishing decision processes.
Also in 4 projects that use this
- +1 more from Infopibe
Other versions33 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 33
- xu-xiang/everything-claude-code-zh★ 2ksame name
- loulanyue/awesome-claude-notes★ 272same name
- tpavanipradeep/everything-claude-code★ 134same name
- langchain-ai/skills-benchmarks★ 118same name
- templetongroup/radiant★ 113same name
- Jamkris/everything-gemini-code★ 87same name
- skateddu/claude-code-python-setup★ 28same name
- noah-sheldon/ai-dev-kit★ 13same name
- wpank/ai★ 11same name
- vanara-agents/skills★ 9same name
23 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 repository21 other files it gives its agents.
- global/AGENTS.mdAGENTS.md
- api-designSkill
- backend-patternsSkill
- brandSkill
- contract-firstSkill
- engineering-task-workflowSkill
- error-handlingSkill
- fixing-accessibilitySkill
- frontend-designSkill
- frontend-ui-engineeringSkill
- intent-driven-developmentSkill
- react-native-patternsSkill
- react-patternsSkill
- react-testingSkill
- security-best-practicesSkill
- shadcnSkill
- supabase-postgres-best-practicesSkill
- systematic-debuggingSkill
- tdd-workflowSkill
- ui-ux-pro-maxSkill
- verification-before-completionSkill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 12 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 30 edited versions we read keep these.
12
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Treat a migration as a versioned compatibility change across database state, application versions, data volume, and deployment order.
- Distinctive: line 30
Use a single migration only when the change is demonstrably compatible and bounded.
- Distinctive: line 32
Expand: add compatible schema without removing the old contract.
- Distinctive: line 35
Contract: remove obsolete schema only after usage and rollback windows permit it.
- Distinctive: line 51
Never edit a migration known to be applied in a shared environment unless the project explicitly uses a safe reconciliation procedure.
- Distinctive: line 55
Follow the repository's naming and ordering.
- Distinctive: line 56
Keep the migration focused and deterministic.
- Distinctive: line 57
Avoid hidden network calls, production credentials, or environment-dependent data.
- Distinctive: line 58
Add guards only when supported and consistent with migration history.
- Distinctive: line 59
Update application code in the sequence required for compatibility.
- Distinctive: line 60
Document an irreversible step and its recovery path.
- Distinctive: line 69
Staging/production: only with explicit authorization and operational controls.
“Common” is measured: kept by at least 6 in 10 of the 30 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
Database Migrations
Treat a migration as a versioned compatibility change across database state, application versions, data volume, and deployment order.
Discover before designing
Identify:
- database engine and version;
- ORM or migration tool and its pinned version;
- repository migration conventions and applied-history rules;
- table size, write pattern, constraints, indexes, triggers, and dependent code when known;
- whether the target is a local/disposable database, staging, or production;
- rollout and rollback capabilities.
Consult current engine/tool documentation when lock, DDL, transaction, or online-index behavior matters. Do not generalize PostgreSQL syntax or guarantees to other databases.
For PostgreSQL, also use the selected PostgreSQL skill for SQL, RLS, indexing, concurrency, and constraint details.
Choose a safe lifecycle
Use a single migration only when the change is demonstrably compatible and bounded. Use expand/contract when old and new application versions may overlap:
- Expand: add compatible schema without removing the old contract.
- Migrate: backfill in bounded, restartable batches where volume requires it; validate progress and consistency.
- Switch: deploy code that reads the new representation and stops depending on the old one.
- Contract: remove obsolete schema only after usage and rollback windows permit it.
Separate schema and data operations when doing so reduces locks, transaction duration, rollback risk, or operational ambiguity. It is a decision based on the actual engine and tool, not an absolute formatting rule.
Safety questions
- What application versions can run before, during, and after the migration?
- Can the operation lock or rewrite a large table?
- Is a default computed per row or metadata-only in this engine/version?
- Can index or constraint validation be staged?
- Is the backfill idempotent, observable, bounded, and resumable?
- What happens to concurrent writes?
- How is partial failure detected and resumed?
- Is rollback safe, or is roll-forward the correct recovery strategy?
- Are destructive steps delayed until data is no longer needed?
Never edit a migration known to be applied in a shared environment unless the project explicitly uses a safe reconciliation procedure.
Implementation
- Follow the repository's naming and ordering.
- Keep the migration focused and deterministic.
- Avoid hidden network calls, production credentials, or environment-dependent data.
- Add guards only when supported and consistent with migration history.
- Update application code in the sequence required for compatibility.
- Document an irreversible step and its recovery path.
Verification levels
Report exactly which level was achieved:
- Static: syntax, formatting, schema diff, generated SQL, or migration graph inspected.
- Disposable database: apply from the correct prior state, inspect schema/data, run affected tests, and exercise rollback or roll-forward where meaningful.
- Representative-volume test: evaluate locks, duration, batching, and disk/replication impact with representative data.
- Staging/production: only with explicit authorization and operational controls.
Static validation alone does not prove a migration applies successfully. A local empty database does not prove production-scale safety.
Approval boundaries
Preparing migration files and testing in an authorized disposable database are ordinary implementation work. Applying a destructive/breaking migration, changing production data, or using production credentials requires explicit approval immediately before the operation.
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.

