database-migration-assistant
FreeRuns bundled scriptsNot checkedPostgreSQL migration assistant that plans, applies, and rolls back schema changes with drift detection for safe AI-agent execution.
by jiayaoqijia★ 81 GitHub starsAbout this skill
Database Migration Assistant with Rollback
A PostgreSQL migration assistant that makes schema changes safe and repeatable.
It provides plan/apply/rollback workflows with drift detection, and exposes stable CLI tools for AI agents to call.
Designed for production safety: preview first, confirm, then execute.
Quick Start
from spoon_ai.agents import SpoonReactSkill
agent = SpoonReactSkill(
name="db_migration_agent",
skill_paths=["./ai-productivity"],
scripts_enabled=True
)
result = await agent.run("Plan database migrations for this project")
print(result)
Scripts
| Script | Purpose |
|---|---|
| plan_migrations.py | Build a migration plan and detect drift |
| apply_migrations.py | Apply pending up migrations (supports dry-run) |
| rollback_migrations.py | Roll back the latest migration or to a target version |
| generate_migration.py | Generate a new migration SQL template |
Environment Variables
| Variable | Required | Description |
|---|---|---|
DB_URL |
Yes | PostgreSQL connection string, e.g. postgresql://user:pass@host:5432/db |
Best Practices
- Always run
planand review the output beforeapply. - In production, require explicit confirmation and a recent backup.
- Treat migration files as append-only; never edit applied migrations.
Install database-migration-assistant in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
FAQ
What does the database-migration-assistant skill do?
PostgreSQL migration assistant that plans, applies, and rolls back schema changes with drift detection for safe AI-agent execution.
How do I install the database-migration-assistant skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the database-migration-assistant skill run scripts?
Yes, this skill bundles executable scripts. Review the source before installing.
Related skills
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
by Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
by Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropic