Plans Convex schema and data migrations with widen-migrate-narrow and @convex-dev/migrations. Use for breaking schema changes, backfills, table reshaping, or zero-downtime rollouts.
npx skills add https://github.com/get-convex/templates --skill convex-migration-helper
Safely migrate Convex schemas and data when making breaking changes.
Convex will not let you deploy a schema that does not match the data at rest.
This is the fundamental constraint that shapes every migration:
This means migrations follow a predictable pattern: **widen the schema, migrate
the data, narrow the schema**.
Convex migrations run online, meaning the app continues serving requests while
data is updated asynchronously in batches. During the migration window, your
code must handle both old and new data formats.
When changing the shape of data, create a new field rather than modifying an
existing one. This makes the transition safer and easier to roll back.
Unless you are certain, prefer deprecating fields over deleting them. Mark the
field as v.optional and add a code comment explaining it is deprecated and why
it existed.
// Before
users: defineTable({
name: v.string(),
});
// After - safe, new field is optional
users: defineTable({
name: v.string(),
bio: v.optional(v.string()),
});
posts: defineTable({
userId: v.id("users"),
title: v.string(),
}).index("by_user", ["userId"]);
users: defineTable({
name: v.string(),
email: v.string(),
}).index("by_email", ["email"]);
Every breaking migration follows the same multi-deploy pattern:
Deploy 1 - Widen the schema:
field)
Between deploys - Migrate data:
Deploy 2 - Narrow the schema:
For any non-trivial migration, use the
component. It handles batching, cursor-based pagination, state tracking, resume
from failure, dry runs, and progress monitoring.
See references/migrations-component.md for installation, setup, defining and
running migrations directly with npx convex run migrations:myMigration, dry
runs, status monitoring, and configuration options.
See references/migration-patterns.md for complete patterns with code examples
covering:
because existing documents lack the field. Always widen the schema first.
.collect() on large tables: Hits transaction limits or causestimeouts. Use the migrations component for proper batched pagination.
.collect() is only safe for tables you know are small.
migration window will be missed, leaving unmigrated data after the migration
"completes."
dryRun: true to validate migration logicbefore committing changes to production data. Catches bugs before they touch
real documents.
v.optional and acomment. Only delete after you are confident the data is no longer needed and
no code references it.
batching via recursive scheduling internally. Crons require manual cleanup
and an extra deploy to remove.
@convex-dev/migrations componentnpx convex run migrations:myMigration '{"dryRun": true}'npx convex run migrations:myMigration andmonitor status
Integration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io functionality into workflows. Applicable for protocol discovery, collaborative protocol development, experiment tracking, lab protocol management, and scientific documentation.
Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances
Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.
Build and distribute Expo development clients locally or via TestFlight
Use when you have a written implementation plan to execute in a separate session with review checkpoints
Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.
Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.
Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.
Take get-convex/templates-convex-migration-helper from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference npx.
Without those the skill loads but fails at the first command.