Skip to content

Guide · Agent skill

How to use the Convex Schema Migration agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The convex-migrate skill is an agent skill that guides an AI agent through changing the structure of a database in a deployed Convex app without breaking existing records. It is for developers who maintain a live Convex app and need to add or change a required field. After reading this guide you will know what the skill does, how to install it, how to ask for it in plain language, and what to check before and after a migration.

Convex Schema Migrationopenclaw/clawhub · MIT

Quick start

  1. 1Download the ZIP. Download the convex-migrate ZIP from this page. It contains SKILL.md.
  2. 2Unzip into a skills folder. Unzip into ~/.claude/skills/ for a personal install or into your project's .claude/skills/ folder.
  3. 3Prepare your Convex project. Confirm you have a deployed Convex app with existing data and access to run Convex functions against it.
  4. 4Ask for the schema change. Describe the field or table change in plain language and mention that the app is live with existing rows.
  5. 5Review and run the migration. Check the migration the agent writes with @convex-dev/migrations, then let it run and verify all rows are valid.
  6. 6Make the field required. After verification passes and row counts match, ask the agent to tighten the validator to required.

What the convex-migrate skill makes the agent do

Agent skills are folders of instructions that an AI agent loads when a task matches them. This one covers schema changes on a deployed Convex app that already has data. Its core rule is that a validator should never be tightened before the backfill has finished, because a stricter validator would reject existing rows and break the live app.

The skill's workflow has four ordered steps: make the new field optional, install the @convex-dev/migrations package and write a migration that backfills or transforms old rows, run the migration and verify that all rows are valid, then make the field required.

  • Make the new field optional first so the deploy does not reject existing rows.
  • Install @convex-dev/migrations and write a backfill that makes old rows valid.
  • Run the migration and verify all rows are valid.
  • Tighten the validator to required only after the backfill is complete.
  • Compare row counts before and after the change.

Install the convex-migrate skill

The skill ships as a ZIP download with a single file, SKILL.md. Download the ZIP from this page and unzip it into one of two locations. Use ~/.claude/skills/ to make the skill available across your projects, or use a project's .claude/skills/ folder to limit it to that project.

If you use the Claude apps instead, you can upload the ZIP under Settings → Capabilities → Skills.

  • Personal install: unzip into ~/.claude/skills/ so the skill is available everywhere.
  • Project install: unzip into the project's .claude/skills/ folder so it applies only to that repository.
  • Claude apps: upload the ZIP under Settings → Capabilities → Skills.

Trigger the skill with a natural request

You do not need a special command. Describe the schema change you want in plain language and mention that the app is live or has existing data. The agent should match the request to this skill when the task is a schema change or backfill on a deployed Convex app.

Good requests name the table, the field and the reason for the change. Mentioning the existing data helps the agent choose the staged process rather than a single all-at-once edit.

  • "I need to add a required field 'plan' to the users table in my live Convex app. Some users already exist, so migrate them safely."
  • "Backfill the new 'slug' field on our posts table and then make it required."
  • "Change the type of the 'price' field on orders and keep existing rows valid."

What you need before you start

The skill assumes a Convex project with a deployed app, the @convex-dev/migrations npm package, and access to run Convex functions against the deployment. The source does not describe other setup, so do not expect the skill to configure your deployment for you.

  • A Convex project with a deployed app that contains existing data.
  • The @convex-dev/migrations npm package, which the agent installs as part of the workflow.
  • Access to run Convex functions against your deployment.

Safety notes: scripts and network use

This skill runs scripts and uses the network. The agent will run migration code against your deployment, so review the migration it writes before running it, and run it against a non-production deployment first if you have one. Keep a record of row counts so you can confirm the outcome.

The skill's rules say to verify row counts before and after the change, and to verify that all rows are valid before tightening the validator. Treat those checks as required, not optional.

  • Review every migration script before it runs.
  • Test against a non-production deployment first when one is available.
  • Check row counts before and after the change.
  • Do not make the field required until verification passes.

Tips for a clean migration

Keep each schema change small so each migration is easy to review. Ask the agent to report the counts it observed rather than assuming the backfill worked. If a migration fails partway, check the data before running it again instead of tightening the validator to force the deploy through.

  • Change one field or one table at a time.
  • Ask the agent to report row counts before and after.
  • Do not skip the optional stage, even when the backfill looks simple.

What people use it for

  • Adding a required field to a users table on a live app and filling it for existing users.
  • Changing the type of a field and transforming old rows to the new format.
  • Backfilling a newly added slug or status field on existing records before making it required.
  • Checking row counts before and after a schema change to confirm nothing was lost.

Frequently asked questions

What is the convex-migrate skill?

It is an agent skill, a folder of instructions containing SKILL.md, that guides an AI agent through changing a deployed Convex schema without breaking existing data. It uses the @convex-dev/migrations package to backfill or transform old rows.

How do I install the convex-migrate skill?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for all projects or into a project's .claude/skills/ folder for one project. In the Claude apps, you can upload the ZIP under Settings → Capabilities → Skills.

What do I need to use it?

You need a Convex project with a deployed app, the @convex-dev/migrations npm package, and access to run Convex functions against the deployment. The skill runs scripts and uses the network.

Is the convex-migrate skill free and what is its licence?

The skill is listed under the MIT licence. The source does not describe pricing beyond that, so check the listing for current terms.

Does this skill work for projects that are not on Convex?

No. The instructions only cover Convex and its migrations library, so apps built on other platforms are outside its scope.

Should I use this skill for a brand-new Convex project?

Probably not. The staged process protects existing rows, so it adds little value when a project has no data yet. It is most useful on live apps with rows that could be invalidated by a stricter validator.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use convex-migrate if you maintain a live Convex app and need to add or change a required field without breaking existing records. Skip it for new Convex projects with no data, or for apps built on anything other than Convex, since the instructions only cover that stack.

Download the skill