convex-migration-helper
Plans and executes safe Convex schema and data migrations using the widen-migrate-narrow workflow and the @convex-dev/migrations component. Use this skill when a deployment fails schema validation, existing documents need backfilling, fields need adding or removing or changing type, tables need splitting or merging, or a zero-downtime migration strategy is needed. Also use when the user mentions breaking schema changes, multi-deploy rollouts, or data transformations on existing Convex tables.
Security Assessment
About convex-migration-helper
The convex-migration-helper skill is designed to streamline and safely execute schema and data migrations within Convex applications. It provides an easy-to-follow process for managing breaking changes to the database schema, ensuring smooth transitions even when the changes are complex. By utilizing the widen-migrate-narrow workflow, this skill prevents disruptions in the application, offering a reliable approach to backfilling documents, modifying field types, and managing table structures. The skill addresses the inherent challenges posed by schema validation constraints in Convex, such as adding required fields, changing field types, or deleting fields, all of which are common migration pain points in evolving systems.
Key capabilities include running migrations online with zero downtime, where the app continues to serve requests during data updates. The skill prioritizes safe migrations by recommending new field additions rather than altering existing field types and emphasizes data preservation by advocating the deprecation of fields instead of deletion. By leveraging the @convex-dev/migrations component, the skill supports automated batching, progress monitoring, and resuming migrations from failures, making it a robust solution for handling complex migrations with minimal risk. It is intended for developers working with Convex who need to execute migrations for schema evolution, including tasks such as adding required fields, merging or splitting tables, and transforming existing data structures.
This skill is best suited for developers managing applications that rely on Convex as their backend, especially when those applications require complex data transformations or schema updates. It provides a reliable workflow for safely migrating large datasets and adapting to evolving schema requirements without risking downtime or data loss. Use this skill when dealing with breaking changes, multi-deploy rollouts, or data transformation tasks on existing Convex tables.
FAQ
When should I use the convex-migration-helper skill?
You should use this skill when making breaking schema changes, such as adding required fields, changing field types, renaming or deleting fields, or when migrating from nested to relational data. It is particularly useful for handling schema validation issues, multi-deploy rollouts, and data transformations.
What types of changes does this skill support?
The skill supports adding new required fields, changing field types, splitting or merging tables, renaming or deleting fields, and migrating from nested data structures to relational data. It also works for migrations that require zero downtime.
Can I use this skill for greenfield schemas or simple schema additions?
No, this skill is not designed for greenfield schemas with no existing data or for simple schema additions like optional fields that don't require backfilling. It is meant for handling more complex, breaking changes to existing schemas and data.
Does this skill handle migrations with zero downtime?
Yes, convex-migration-helper runs migrations online, allowing your application to continue serving requests while the data is being updated asynchronously in batches. The skill ensures that both old and new data formats are handled during the migration window.
How does the @convex-dev/migrations component work with this skill?
The @convex-dev/migrations component is used to manage the migration process, including batching, cursor-based pagination, state tracking, and progress monitoring. It also supports resuming migrations from failure and conducting dry runs, which ensures the migration process is as smooth and reliable as possible.
Install convex-migration-helper
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
get-convex/agent-skills