One of 30 skills in the get-convex/agent-skills package — works on its own, and pairs well with its siblings.
WHEN YOUR AGENT SHOULD USE IT
USE FOR
- Add a required field to a table that already has data.
- Rewrite old records into a new shape with a backfill.
- Compare row counts before and after the change.
DO NOT USE FOR
- Rehearsing on a copy of production first: that is the migrate-rehearse skill.
Documents
This is the playbook your agent receives when the skill activates — you don't need to read it to use the skill, but it's here to audit before installing.
Migrate the schema / data on a live app
Change a deployed schema without breaking existing data: stage the schema change, install @convex-dev/migrations, write a backfill that makes old rows valid, run it, and verify before tightening the validator.
Workflow
- Make the new field optional first (so deploy doesn't reject existing rows).
- Install @convex-dev/migrations; write a migration that backfills/transforms existing rows.
- Run the migration; verify all rows are valid.
- Tighten the validator (make the field required) once the backfill is complete.
Rules
- Never tighten a validator before the backfill completes — it rejects existing rows and breaks the live app.
- Add new fields as optional first, migrate, then require.
- Verify row counts before and after.
Installation
npx skills add get-convex/agent-skills --skill "convex-migrate" --full-depthRun this in your project — your agent picks the skill up automatically.
License
Licensed under Apache-2.0— you can use, modify, and redistribute it under that license's terms.
View the full license file on GitHub →