DB Migration Check
Testing & Qualitydb-migration-checkDB Migration Check is an Agent Skill for testing & quality published in the tgoai/tgo repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Verify that SQLAlchemy model changes have corresponding Alembic migration files. Trigger when any file under models/*.py or models/**/*.py is modified — checks git diff for model changes and confirms matching alembic/versions/*.py files exist, failing if a service has model changes without a migration.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/tgoai/tgo/blob/HEAD/.skills/db-migration-check/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/db-migration-check, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
db-migration-check
Purpose
Verify that model/schema changes have corresponding Alembic migration files.
Trigger
When models/ directory files are modified.
What it does
- Checks
git diffformodels/*.pyormodels/**/*.pychanges - Checks for new
alembic/versions/*.pyormigrations/versions/*.pyfiles - Reports error if model changes exist without corresponding migration
Usage
bash .skills/db-migration-check/scripts/check.sh