Agent skill

Create And Cleanup Migration

by openclaw in openclaw/clawhub

A skill your agent uses for end-to-end ClawHub Convex production migrations, backfills, destructive cleanups, and one-off maintenance functions that must be created, validated, shipped, run…

MITAuto-check passed

Install Create And Cleanup Migration

skills CLI
$ npx skills add openclaw/clawhub --skill create-and-cleanup-migration -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install openclaw/clawhub create-and-cleanup-migration --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/openclaw/clawhub.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/create-and-cleanup-migration .claude/skills/create-and-cleanup-migration && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
create-and-cleanup-migration
GitHub stars
9.5k
Token cost
~1.7k tokens
SKILL.md length
895 words
Files
1
Skills in repo
55
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses for end-to-end ClawHub Convex production migrations, backfills, destructive cleanups, and one-off maintenance functions that must be created, validated, shipped, run…

  • Works in 7 steps: Design The Migration → Implement → Local Validation → …
  • End-to-end ClawHub Convex production migrations
  • SKILL.md covers When To Use, Required Companion Guidance, Safety Rules and Phase 1: Design The Migration, plus 7 more sections
  • Calls bunx and bun

What it does

Create And Cleanup Migration is an agent skill from openclaw/clawhub. 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.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Skill + Plugin Registry for OpenClaw. The licence is MIT.

When your agent uses it

  • End-to-end ClawHub Convex production migrations
  • Destructive cleanups
  • One-off maintenance functions that must be created
  • Then removed after completion

Example prompts

  • “/create-and-cleanup-migration”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Design The Migration
  2. Implement
  3. Local Validation
  4. PR, Review, Merge, Deploy
  5. Production Dry Run
  6. Production Apply
  7. Cleanup PR

What it can do on your machine

Read from SKILL.md and the folder at commit d044664. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • bunx
    • bun

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use bunx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Create And Cleanup Migration loads about 1.7k tokens when it runs. Until then it costs about 60 tokens; SKILL.md has 895 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~60
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from openclaw/clawhub at commit d044664, republished under its MIT licence (© openclaw). 895 words, ~1,748 tokens.

Download SKILL.mdSave it as .claude/skills/create-and-cleanup-migration/SKILL.md (or your agent's skills folder).
name
create-and-cleanup-migration
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.

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

  • Never run a destructive production apply step until after presenting dry-run results and receiving explicit user confirmation in the current thread.
  • Before implementing anything, classify the requested "migration" as one of: code deploy, existing Convex function run, operator import/export command, schema narrowing, data cleanup, or cleanup-code removal. Do not invent a new Convex migration function when the issue or PR specifies an operator command such as convex import --replace.
  • Never remove migration code until after presenting apply/verification results and receiving explicit user confirmation in the current thread.
  • Keep production commands pointed at the explicit deployment name when known; do not rely on generic --prod if this repo's guidance says to verify the actual deployment.
  • If the migration can affect visibility, moderation, ownership, billing, installability, or public API output, call that out before the apply gate.
  • Preserve resume cursors, run IDs, PR URLs, deploy URLs, and final stats in the handoff.

Phase 1: Design The Migration

  1. Identify the intended data change and whether it is:
    • schema widen/migrate/narrow
    • field cleanup
    • table cleanup
    • ownership/relationship repair
    • recurring maintenance
  2. Choose the implementation:
    • Prefer @convex-dev/migrations for non-trivial production data.
    • Use a hand-rolled internal function only for a clearly small or special case, and document the exception.
  3. Define done criteria:
    • dry-run expected counts
    • apply expected counts
    • verification query/result proving no remaining targets
    • cleanup PR scope

Phase 2: Implement

  1. Add or update the Convex migration/maintenance code.
  2. Include argument validators for every Convex function.
  3. Include dry-run support.
  4. Include batching and resume/progress state.
  5. Include a confirmation token for destructive writes.
  6. Keep apply logic idempotent where practical.
  7. Add targeted tests for business logic and safety gates.
  8. Add real Convex runtime validation for Convex semantics such as pagination, validators, internal/public function boundaries, scheduler behavior, and action/query/mutation interactions.

Phase 3: Local Validation

Run the smallest meaningful set first, then broaden before PR handoff:

  • targeted unit tests for the migration logic
  • bunx convex codegen when Convex API/schema changed
  • bunx tsc --noEmit or the repo's Convex deploy typecheck path
  • bun run ci:static
  • bun run ci:unit for source/test changes unless explicitly waived
  • a real local Convex validation path, such as bunx convex dev --once, convex run, HTTP smoke, or local-auth Playwright, covering the changed Convex behavior

If local real Convex validation is blocked, record the blocker and make the PR or deployment plan explicitly compensate with an equivalent runtime proof.

Show full SKILL.md (346 more words)Show less

Phase 4: PR, Review, Merge, Deploy

  1. Open a focused PR containing the migration implementation.
  2. Include:
    • summary
    • migration strategy
    • dry-run/apply safety gates
    • tests and runtime validation
    • cleanup plan
  3. Run the repo's review/CI workflow required by AGENTS.md.
  4. Address actionable review findings.
  5. Merge only after required checks are green or the user explicitly accepts a documented risk.
  6. Deploy the relevant production target from main.
  7. Wait for deployment success before running the production dry run.

Phase 5: Production Dry Run

  1. Run the production dry run with bounded batch settings.
  2. Resume until either:
    • isDone: true, or
    • a clearly documented safety cap is reached.
  3. Present results to the user before apply:
    • deployment name
    • command shape
    • dryRun
    • isDone
    • done/progress fields
    • scanned/matched/patched/deleted stats
    • sample IDs
    • resume cursors if incomplete
    • known user-visible or operational implications
  4. Stop and wait for explicit user confirmation before applying.

Phase 6: Production Apply

  1. Run only after explicit user confirmation of the dry-run results.
  2. Use the destructive confirmation token.
  3. Resume in bounded batches until complete or until a documented safety cap.
  4. Present apply results:
    • patched/deleted counts
    • skipped/missing counts if tracked
    • final cursors/progress
    • any errors or partial completion
  5. Run verification:
    • dry run or status command should show zero remaining targets, or
    • explain why remaining targets are expected.
  6. Stop and wait for explicit user confirmation before cleanup-code removal.

Phase 7: Cleanup PR

  1. Remove temporary migration functions, tests, docs, scripts, and generated API entries that are no longer needed.
  2. Keep durable specs/docs only if they explain lasting behavior or invariants.
  3. Run targeted validation plus the repo-required gates for the touched surface.
  4. Open a cleanup PR with:
    • apply results
    • verification proof
    • explanation of removed temporary code
  5. Merge after checks/review.
  6. Deploy the cleanup PR if removing Convex functions or schema/code that affects production.

Final Handoff

Report:

  • implementation PR URL and merge SHA
  • production deploy run URL and deployed SHA
  • dry-run result
  • apply result
  • verification result
  • cleanup PR URL, merge SHA, and deploy run URL
  • any remaining follow-up tasks or intentional retained migration code

© openclaw, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/create-and-cleanup-migration of openclaw/clawhub.

Open the folder on GitHubat commit d044664

Compare with similar skills

Create And Cleanup Migration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Create And Cleanup Migration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Create And Cleanup Migration this skillopenclaw/clawhub9.5k—~1.7kAutomated safety check: PassMIT
Clawhubopenclaw/openclaw392k—~724Automated safety check: PassMIT
Database Migrationsaffaan-m/ECC276k4 repos~3kAutomated safety check: PassMIT
Reversible MigrationJuliusBrussee/caveman111k1 repos~196Automated safety check: PassApache-2.0
Safe Database Migration Patternsaffaan-m/ECC276k—~3.3kAutomated safety check: PassMIT
Database Migrationsaffaan-m/ECC276k1 repos~2.4kAutomated safety check: PassMIT

Similar skills

  • Clawhub

    openclaw/openclaw

    Search ClawHub for plugins by default, or skills when explicitly requested; install, verify, update, uninstall, publish, or sync skills.

    392k GitHub stars~724 tokensUpdated today
    Auto-check passed
  • Safe, reversible database migration patterns: forward-only production changes, expand-contract zero-downtime renames, concurrent indexes, batched backfills, and per-tool workflows for PostgreSQL…

    276k GitHub starsUsed in 4 repos~3k tokens
    DatabasesAuto-check passed
  • Reversible Migration

    JuliusBrussee/caveman

    Implement reversible compatibility-safe transitions. Use for schema, data, API, protocol, configuration, or dependency migrations requiring rollback and…

    111k GitHub starsUsed in 1 repo~196 tokens
    DevelopmentAuto-check passed
  • Rules and examples for safe, reversible schema changes in production: zero-downtime column and index changes, large data backfills and ORM migration workflows.

    276k GitHub stars~3.3k tokensUpdated 4 days ago
    DatabasesAuto-check passed
  • Şema değişiklikleri, veri migration'ları, rollback'ler ve PostgreSQL, MySQL ve yaygın ORM'ler (Prisma, Drizzle, Django, TypeORM, golang-migrate) arasında sıfır kesinti deployment'ları için…

    276k GitHub starsUsed in 1 repo~2.4k tokens
    DatabasesAuto-check passed
  • Convex

    davila7/claude-code-templates

    Convex reactive backend expert: schema design, TypeScript functions, real-time subscriptions, auth, file storage, scheduling, and deployment.

    32k GitHub starsUsed in 3 repos~6.4k tokens
    DatabasesAuto-check: notes

More from openclaw/clawhub

All 55 skills in this repo
  • Creates and manages Axiom monitors and notifiers end to end through the v2 API, with scripts for each CRUD operation and a recommended create-validate-tune workflow.

    9.5k GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Axiom Dashboard Builder

    openclaw/clawhub

    Designs and deploys Axiom dashboards through the API, choosing chart types and writing APL or metrics queries, with templates and migration notes for Splunk and Grafana.

    9.5k GitHub stars~4.9k tokensUpdated today
    Auto-check passed
  • Axiom Cost Control

    openclaw/clawhub

    Finds unused data in Axiom by analyzing query patterns, then deploys a cost dashboard and ingest monitors to keep spend under the contract limit.

    9.5k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Axiom Metrics Query

    openclaw/clawhub

    Explores and queries OpenTelemetry metrics in Axiom MetricsDB, listing datasets, metrics and tags first and picking the right aggregation for each metric's type.

    9.5k GitHub stars~2.6k tokensUpdated today
    Auto-check passed
  • Axiom SRE Investigator

    openclaw/clawhub

    Investigates incidents and production problems with hypothesis-driven debugging, queries Axiom observability data when available, and keeps secrets out of commands and output.

    9.5k GitHub stars~7.1k tokensUpdated today
    Auto-check passed
  • Axiom Eval Writer

    openclaw/clawhub

    Scaffolds evaluation suites for the Axiom AI SDK: eval files, scorers, flag schemas and axiom.config.ts, generated from plain descriptions of an AI capability.

    9.5k GitHub stars~4.1k tokensUpdated today
    Auto-check: warnings

Questions about Create And Cleanup Migration

What does Create And Cleanup Migration do?

A skill your agent uses for end-to-end ClawHub Convex production migrations, backfills, destructive cleanups, and one-off maintenance functions that must be created, validated, shipped, run…. Create And Cleanup Migration is an agent skill from openclaw/clawhub. 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.

When should I use Create And Cleanup Migration?

Create And Cleanup Migration fits situations like: end-to-end ClawHub Convex production migrations; destructive cleanups; one-off maintenance functions that must be created; then removed after completion.

How do I install Create And Cleanup Migration in Claude Code?

Run `npx skills add openclaw/clawhub --skill create-and-cleanup-migration -a claude-code`. Or copy the skill folder (.agents/skills/create-and-cleanup-migration in openclaw/clawhub) into .claude/skills/create-and-cleanup-migration in your project. Claude Code loads it when a task matches its description.

How do I install Create And Cleanup Migration in Codex?

Run `npx skills add openclaw/clawhub --skill create-and-cleanup-migration -a codex`. Or copy the skill folder (.agents/skills/create-and-cleanup-migration in openclaw/clawhub) into .agents/skills/create-and-cleanup-migration in your project. Codex loads it when a task matches its description.

Can I use Create And Cleanup Migration in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add openclaw/clawhub --skill create-and-cleanup-migration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/create-and-cleanup-migration, .gemini/skills/create-and-cleanup-migration, .github/skills/create-and-cleanup-migration and .opencode/skills/create-and-cleanup-migration in your project.

What does Create And Cleanup Migration need to run?

Going by SKILL.md and its folder, Create And Cleanup Migration needs the command-line tools its instructions call (bunx and bun).

Does Create And Cleanup Migration access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Create And Cleanup Migration safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Create And Cleanup Migration use?

Create And Cleanup Migration is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Create And Cleanup Migration use?

About 1.7k tokens (SKILL.md is roughly 7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Create And Cleanup Migration?

Skills that share tags, products or a category with Create And Cleanup Migration: Clawhub (openclaw/openclaw, 392k stars), Database Migrations (affaan-m/ECC, 276k stars), Reversible Migration (JuliusBrussee/caveman, 111k stars) and Safe Database Migration Patterns (affaan-m/ECC, 276k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Create And Cleanup Migration?

openclaw (a GitHub organization) maintains it in openclaw/clawhub, which has 9,500 GitHub stars. The repository holds 55 skills in this directory. The repository was last updated on October 8, 2026.

Source: openclaw/clawhub on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.