# Create And Cleanup Migration

Use for end-to-end ClawHub Convex production migrations, backfills, destructive...

- Repository: https://github.com/openclaw/clawhub (9543 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add openclaw/clawhub --skill create-and-cleanup-migration -g -a claude-code -y`
Codex: `npx skills add openclaw/clawhub --skill create-and-cleanup-migration -g -a codex -y`
Cursor: `npx skills add openclaw/clawhub --skill create-and-cleanup-migration -g -a cursor -y`
Gemini CLI: `npx skills add openclaw/clawhub --skill create-and-cleanup-migration -g -a gemini-cli -y`

## Description

Use for end-to-end ClawHub Convex production migrations, backfills, destructive cleanups, and one-off maintenance functions that must be created, validated, shipped, run, verified, then removed after completion.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Create And Cleanup Migration

Drive a ClawHub Convex migration from implementation through production cleanup,
with explicit operator gates before destructive execution and before removing the
temporary migration code.

## When To Use

- A Convex production data migration, backfill, destructive cleanup, schema
  narrowing, table reshaping, or one-off maintenance function is needed.
- Temporary Convex code must be created, deployed, run, verified, and then
  removed after it is no longer useful.
- The user asks for the full lifecycle: implement migration, PR, deploy, dry run,
  apply, verify, cleanup PR, deploy cleanup.

## Required Companion Guidance

1. Start with `convex-migration-helper`.
2. Read `convex/_generated/ai/guidelines.md` before editing Convex code.
3. Default to `@convex-dev/migrations` for production data changes.
4. If not using `@convex-dev/migrations`, write down why the component is
   unnecessary and provide equivalent:
   - dry-run support
   - cursor batching
   - resumable/progress behavior
   - destructive confirmation token
   - real Convex runtime validation
5. Use `clawhub-convex` for repository-specific file placement and runtime
   targeting. Use `clawhub-production-release` for production deploy phases.

## Safety Rules

The rest: https://github.com/openclaw/clawhub/blob/HEAD/.agents/skills/create-and-cleanup-migration/SKILL.md
