home / skills / tlabs-xyz / tbtc-v2-performance / backend--migrations
/.codex/skills/backend--migrations
This skill helps you apply the Agent OS standard for backend migrations, ensuring consistent practices across databases and deployment environments.
npx playbooks add skill tlabs-xyz/tbtc-v2-performance --skill backend--migrationsReview the files below or copy the command above to add this skill to your agents.
---
name: backend--migrations
description: Apply the Agent OS standard for backend migrations.
tags: [agent-os, standard, backend]
---
# Backend Migrations
Use this skill when working on backend migrations in this repo.
## Instructions
- Follow the standard in `agent-os/standards/backend/migrations.md`.
## References
- `agent-os/standards/backend/migrations.md`
This skill applies the Agent OS standard for backend migrations to ensure database changes are consistent, reversible, and auditable. It guides developers through best practices for writing, testing, and deploying migrations in TypeScript backends. The goal is predictable schema evolution and minimal production risk.
The skill inspects migration code and metadata to verify adherence to the Agent OS migration standard, checking naming conventions, up/down or reversible operation patterns, and required tests or checks. It flags missing rollbacks, unsafe operations, and gaps in deployment steps, and provides concrete remediation suggestions. It also validates migration ordering and compatibility with the deployment pipeline.
What should a migration include to be considered safe?
A safe migration has an explicit rollback or reversible pattern, avoids long locks, includes data backfill steps when needed, and is covered by tests that exercise both apply and rollback.
How do I handle large data transformations?
Perform transformations out of band using background jobs or chunked processes, keep schema changes small and reversible, and coordinate with feature flags to minimize user impact.