Guide · Agent skill
How to use the Convex Migration Lifecycle Guide agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The create-and-cleanup-migration skill is a set of instructions that tells an AI coding agent how to carry out a production database change in a Convex backend, from design through to removing the temporary code afterwards. It is written for maintainers of the ClawHub Convex repository, and it is most useful to developers who want a checklist-driven process for risky one-off data changes. After reading this guide you will know what the skill makes the agent do, how to install it, how to ask for it in plain language, and what it needs before it will work.
Quick start
- 1Download the skill. Download the ZIP for the create-and-cleanup-migration skill from the directory page.
- 2Unzip into a skills folder. Unzip it into ~/.claude/skills/ for all projects, or into a project's .claude/skills/ folder for that project only.
- 3Or upload it in the Claude apps. In the Claude apps, open Settings, go to Capabilities, and upload the skill under Skills.
- 4Check the prerequisites. Confirm your Convex project uses @convex-dev/migrations, that Bun and the repository scripts are available, and that the three companion skills are present.
- 5Ask for the lifecycle in plain language. Describe the migration, backfill, or cleanup and the target deployment in your request.
- 6Approve each gate. Review the dry-run results and give explicit confirmation before the apply step, then again before cleanup-code removal.
What the skill makes the agent do
A skill is a folder containing a SKILL.md file with instructions that an AI agent loads when a task matches the skill's description. This one covers the full lifecycle of a Convex migration, backfill, destructive cleanup, or one-off maintenance function: design the change, write and validate the code, open a pull request, deploy, run a dry run, wait for approval, apply the change, verify it, and then remove the temporary code.
The skill is built around explicit stop points. The agent is told to wait for explicit user confirmation in the current thread before any destructive production apply step and before it removes the migration code. It also asks the agent to report deployment names, cursors, PR URLs, and final stats in a handoff.
Install the skill
You can install the skill in either of two ways. Download the ZIP from the directory page and unzip it into one of these locations: ~/.claude/skills/ for your user account, or .claude/skills/ inside a project folder if you want it limited to that project.
Alternatively, in the Claude apps, open Settings, go to Capabilities, and upload the skill under Skills.
Trigger the skill with natural requests
You do not need a special command. Ask for the full lifecycle or a specific part of it in plain language, and the agent will match the request against the skill's description. The skill's own description mentions end-to-end migrations, backfills, destructive cleanups, and one-off maintenance functions.
Requests that should match include asking for a complete production backfill with its PR, deploy, dry run, apply, and cleanup, or asking for a cleanup that removes a field or table in production. Be specific about the change and the deployment so the agent can classify the work correctly.
- Implement a backfill that sets the new ownership field on existing records, then run it through the full migration lifecycle.
- Plan and run a destructive cleanup that removes an old table in production, with dry run and apply gates.
- Write a one-off maintenance function for a data repair, then remove it after it has been verified.
What it needs before you start
The skill is not portable. It depends on repository-specific files and skills that are not included in the package, so it will not work as written in other projects. The source lists these requirements: a Convex project using the @convex-dev/migrations component, which the skill recommends; the Bun runtime with repository scripts such as bunx convex codegen, bun run ci:static, and bun run ci:unit; access to Convex production deployments and GitHub pull requests; and three companion skills, convex-migration-helper, clawhub-convex, and clawhub-production-release, which are not included here.
The skill does not run scripts itself and does not use the network according to its listing. It is licensed under MIT.
Safety notes
The skill is designed to pause for a human. Running it without someone reviewing the dry-run and apply results would defeat its safety gates. The agent is also told to pin production commands to the explicit deployment name when that is known, rather than relying on a generic production flag, and to call out any change that could affect visibility, moderation, ownership, billing, installability, or public API output before the apply gate.
Because the skill asks the agent to run production dry runs and applies through the repository's tooling, use it only with credentials and deployment access you are authorised to use, and review each command the agent proposes before approving it.
Tips for getting good results
Name the deployment and the change clearly in your first message. Keep dry runs and applies in bounded batches, as the skill instructs. Keep the resume cursors and run IDs the agent reports, since the handoff relies on them. When the agent says it is waiting for confirmation, check the dry-run counts and sample IDs before you reply.
- Confirm the classification the agent gives (code deploy, function run, import/export, schema narrowing, data cleanup, or cleanup-code removal) before any implementation starts.
- If the agent cannot run real Convex validation locally, ask it to record the blocker and state how the PR compensates.
- Do not approve a cleanup PR until the apply results and verification proof are in the handoff.
What people use it for
- Running a production backfill that populates a new field on existing Convex records, with dry-run and apply gates.
- Carrying out a destructive cleanup that removes an obsolete field or table, with verification that no targets remain.
- Writing a one-off maintenance function, deploying it, running it, and removing it in a follow-up cleanup PR.
- Narrowing a schema after a data migration, with the cleanup PR and deploy handled as separate steps.
Frequently asked questions
How do I install the create-and-cleanup-migration skill?
Download the ZIP from the directory page and unzip it into ~/.claude/skills/ for your user account or into a project's .claude/skills/ folder. You can also upload it in the Claude apps under Settings, then Capabilities, then Skills.
Is the create-and-cleanup-migration skill free to use?
The skill is listed under the MIT licence. The source does not mention pricing, so check the directory page for any other terms.
What do I need to use this skill?
You need a Convex project that uses the @convex-dev/migrations component, the Bun runtime with repository scripts, access to Convex production deployments and GitHub pull requests, and the companion skills convex-migration-helper, clawhub-convex, and clawhub-production-release, which are not included in the package.
Will this skill work in my own Convex project?
Probably not as written. It refers to repository-specific files and skills that are not in this package, so it is built for maintainers of the ClawHub Convex project and may need substantial adaptation elsewhere.
Does the skill run scripts or use the internet?
According to its listing, the skill does not run scripts and does not use the network. The agent still runs commands through your own tools when it follows the instructions, so review those commands before approving them.
What should I use instead if I do not use Convex?
The source does not name alternatives. For a non-Convex project, this skill's process will not apply directly, so you would need a different migration process or a skill written for your database.
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
This skill suits maintainers of the ClawHub Convex project, and developers who want a checklist-driven, approval-gated process for risky one-off Convex data changes. It is a poor fit for projects that do not use Convex or this repository, and for any setup where the agent would run production changes without a person reviewing the dry-run and apply results.
Download the skill