OpenClaw
Deploy a managed OpenClaw agent in 60 seconds
Launch on Hostinger →
Hermes Agent
Run your Hermes agent, fully managed
Launch on Hostinger →
Hostinger VPS
Spin up a VPS in one click, 20% off
Launch on Hostinger →
Firecrawl
Crawl and scrape any site into clean data
Try Firecrawl free →
Context.dev
One API to scrape, enrich, and extract the web
Start building free →
Jotform
Forms, workflows, and AI Agents for your team
Try Jotform free →
CodeRabbit
AI code reviews for every PR
Try CodeRabbit free →
Your product here
Reach 100k AI builders a month
Learn more →
Claude Market
Menu
SkillsMCPPluginsMarketplacesNewsletterSubmit MCPSkillPluginMCPMCP, plugin, or skillAdvertise
Claude Market
SkillsMCPPluginsMarketplacesNewsletterSubmit MCPSkillPluginMCPMCP, plugin, or skillAdvertise
Skills/get-convex/agent-skills/convex-migration-helper
convex-migration-helper logo

convex-migration-helper

get-convex/agent-skills
66K installs32 stars
Run it on Hostinger, 20% off →Your friend gets 20% off too, using this linkFree API →|View on GitHub|Create your own skill →

Installation

npx skills add https://github.com/get-convex/agent-skills --skill convex-migration-helper

Summary

Safely migrate Convex schemas and data when making breaking changes.

SKILL.md

Convex Migration Helper

Safely migrate Convex schemas and data when making breaking changes.

When to Use

  • Adding new required fields to existing tables
  • Changing field types or structure
  • Splitting or merging tables
  • Renaming or deleting fields
  • Migrating from nested to relational data

When Not to Use

  • Greenfield schema with no existing data in production or dev
  • Adding optional fields that do not need backfilling
  • Adding new tables with no existing data to migrate
  • Adding or removing indexes with no correctness concern
  • Questions about Convex schema design without a migration need

Key Concepts

Schema Validation Drives the Workflow

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:

  • You cannot add a required field if existing documents don't have it
  • You cannot change a field's type if existing documents have the old type
  • You cannot remove a field from the schema if existing documents still have it

This means migrations follow a predictable pattern: widen the schema, migrate the data, narrow the schema.

Online Migrations

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.

Prefer New Fields Over Changing Types

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.

Don't Delete Data

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.

Safe Changes (No Migration Needed)

Adding Optional Field

// Before
users: defineTable({
  name: v.string(),
});

// After - safe, new field is optional
users: defineTable({
  name: v.string(),
  bio: v.optional(v.string()),
});

Adding New Table

posts: defineTable({
  userId: v.id("users"),
  title: v.string(),
}).index("by_user", ["userId"]);

Adding Index

users: defineTable({
  name: v.string(),
  email: v.string(),
}).index("by_email", ["email"]);

Breaking Changes: The Deployment Workflow

Every breaking migration follows the same multi-deploy pattern:

Deploy 1 - Widen the schema:

  1. Update schema to allow both old and new formats (e.g., add optional new

field)

  1. Update code to handle both formats when reading
  2. Update code to write the new format for new documents
  3. Deploy

Between deploys - Migrate data:

  1. Run migration to backfill existing documents
  2. Verify all documents are migrated

Deploy 2 - Narrow the schema:

  1. Update schema to require the new format only
  2. Remove code that handles the old format
  3. Deploy

Using the Migrations Component

For any non-trivial migration, use the @convex-dev/migrations 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.

Common Migration Patterns

See references/migration-patterns.md for complete patterns with code examples covering:

  • Adding a required field
  • Deleting a field
  • Changing a field type
  • Splitting nested data into a separate table
  • Cleaning up orphaned documents
  • Zero-downtime strategies (dual write, dual read)
  • Small table shortcut (single internalMutation without the component)
  • Verifying a migration is complete

Common Pitfalls

  1. Making a field required before migrating data: Convex rejects the deploy

because existing documents lack the field. Always widen the schema first.

  1. Using .collect() on large tables: Hits transaction limits or causes

timeouts. Use the migrations component for proper batched pagination. .collect() is only safe for tables you know are small.

  1. Not writing the new format before migrating: Documents created during the

migration window will be missed, leaving unmigrated data after the migration "completes."

  1. Skipping the dry run: Use dryRun: true to validate migration logic

before committing changes to production data. Catches bugs before they touch real documents.

  1. Deleting fields prematurely: Prefer deprecating with v.optional and a

comment. Only delete after you are confident the data is no longer needed and no code references it.

  1. Using crons for migration batches: The migrations component handles

batching via recursive scheduling internally. Crons require manual cleanup and an extra deploy to remove.

Migration Checklist

  • [ ] Identify the breaking change and plan the multi-deploy workflow
  • [ ] Update schema to allow both old and new formats
  • [ ] Update code to handle both formats when reading
  • [ ] Update code to write the new format for new documents
  • [ ] Deploy widened schema and updated code
  • [ ] Define migration using the @convex-dev/migrations component
  • [ ] Test with npx convex run migrations:myMigration '{"dryRun": true}'
  • [ ] Run migration directly with npx convex run migrations:myMigration and

monitor status

  • [ ] Verify all documents are migrated
  • [ ] Update schema to require new format only
  • [ ] Clean up code that handled old format
  • [ ] Deploy final schema and code
  • [ ] Remove migration code once confirmed stable

Score

0–100
78/ 100

Grade

B

Popularity30/30

65,805 installs — top-tier adoption.

Completeness27/30

Documented: full SKILL.md body, description, one-line install. Missing: category/license metadata.

Trust15/25

Community skill with a public GitHub source repository you can review.

Freshness6/15

No update timestamp is tracked for this skill in our catalog.

Scored automatically from popularity, completeness, trust, and freshness — computed only from data in our catalog, never fabricated.

Proud of your score? Add this badge to your README.

Paste a snippet into your GitHub README. The badge updates automatically and links back to this page.

Convex Migration Helper skill score badge previewScore badge

Markdown

[![Convex Migration Helper skill](https://www.claudemarket.ai/skills/get-convex/agent-skills/convex-migration-helper/badges/score.svg)](https://www.claudemarket.ai/skills/get-convex/agent-skills/convex-migration-helper)

HTML

<a href="https://www.claudemarket.ai/skills/get-convex/agent-skills/convex-migration-helper"><img src="https://www.claudemarket.ai/skills/get-convex/agent-skills/convex-migration-helper/badges/score.svg" alt="Convex Migration Helper skill"/></a>

Convex Migration Helper FAQ

How do I install the Convex Migration Helper skill?

Run “npx skills add https://github.com/get-convex/agent-skills --skill convex-migration-helper” in your terminal. The skill is added to your agent's skills directory and picked up automatically on the next run — no restart or extra configuration needed.

What does the Convex Migration Helper skill do?

Safely migrate Convex schemas and data when making breaking changes. The full SKILL.md on this page shows the exact instructions the skill gives your agent.

Is the Convex Migration Helper skill free?

Yes. Convex Migration Helper is a free, open-source skill published from get-convex/agent-skills. As with any third-party skill, review the source repository before installing it into an agent with sensitive access.

Does Convex Migration Helper work with Claude Code and OpenClaw?

Yes. Skills use the portable SKILL.md format, so Convex Migration Helper works with Claude Code, OpenClaw, Codex, Hermes, and any other agent that reads SKILL.md skills.

Recommended skills

Browse all →
convex-quickstart logo

convex-quickstart

get-convex/agent-skills

98K installsInstall
convex-create-component logo

convex-create-component

get-convex/agent-skills

98K installsInstall
convex-performance-audit logo

convex-performance-audit

get-convex/agent-skills

94K installsInstall
convex-setup-auth logo

convex-setup-auth

get-convex/agent-skills

94K installsInstall
find-skills logo

find-skills

vercel-labs/skills

2.9M installsInstall
grill-me logo

grill-me

mattpocock/skills

791K installsInstall

Related guides

Hand-picked reading to help you choose, install, and use agent skills.

GuideHow To Use Openclaw Skills For Database MigrationsGuideBest Openclaw Skills 2026GuideHow To Evaluate Openclaw Skill Before Installing

Skills by category

FrontendBackend & APIsTesting & QASecurityDevOps & CI/CDMCP & ToolingAutomationData & Analysis+27 more

MCP servers by category

MCP & ToolingBackend & APIsData & AnalysisDevOps & CI/CDAutomationSecurityDocsTesting & QA+24 more

Plugins by category

AutomationDevOps & CI/CDData & AnalysisDesign & CreativeSecurityBackend & APIsFrontendTesting & QA+16 more

Marketplaces by category

AutomationData & AnalysisDevOps & CI/CDDesign & CreativeFrontendBackend & APIsTesting & QASecurity+21 more

The Agent Stack

Weekly Claude Code, Agent SDK, and MCP moves worth your time — free.

Claude Market

AI agent skills directory, marketplace, and workflow hub for OpenClaw, Hermes Agent, Claude Code, Codex, and MCP-powered operator stacks.

Independent project, not affiliated with Anthropic.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Plugins
  • Browse Marketplaces
  • Newsletter

More

  • Submit a Tool
  • Create a Skill
  • Advertise
  • Free Tools
  • API
  • Shipping
  • Contact
  • Terms
  • Privacy
© 2026 Claude Market · Not affiliated with Anthropic
Fazier badgeFeatured on Twelve ToolsFeatured on Wired BusinessRemote OpenClaw - Featured on AI Agents DirectoryListed on Turbo0Featured on Uneed