Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/get-convex/convex-agent-plugins/migrate-rehearsegit clone --depth 1 https://github.com/get-convex/convex-agent-pluginsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/get-convex/convex-agent-plugins/migrate-rehearse)<a href="https://agentmods.dev/commands/get-convex/convex-agent-plugins/migrate-rehearse"><img src="https://agentmods.dev/badge/commands/get-convex/convex-agent-plugins/migrate-rehearse.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00034 | $0.01045 |
| Opus 5 | $0.00017 | $0.00522 |
| Sonnet 5 | $0.00007 | $0.00209 |
| Haiku 4.5 | $0.00003 | $0.00104 |
Grade A, and why
migrate-rehearse scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 27 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rehearse a schema change on a preview before prod
A schema push on Convex validates every existing document against the new schema and FAILS the push if any row doesn't conform — a real data-conformance gate. The safe way to use that gate is to let it fail on a rehearsal copy, not on prod. This capability turns a preview deployment into that copy: seed it with a prod snapshot, push the new schema + run the backfill there, watch the gate, and only promote once it's green. It composes deploy-guard (target classification), migrate (the optional-then-tighten pattern), and @convex-dev/migrations (the batched, resumable backfill).
Steps
- PRECONDITION: preview deployments need a Preview Deploy Key (dashboard → Project Settings → Deploy Keys → Preview) exported as
CONVEX_DEPLOY_KEYbefore any--preview-create/--preview-namedeploy — a plainnpx convex loginsession cannot create previews, and this is a paid-tier feature. If no preview key is available, fall back to rehearsing on the personal dev deployment seeded with the snapshot, and say so. - GUARD: deploy-guard — classify + announce the SOURCE (prod, being read) and the eventual TARGET (prod, being changed); get the fresh explicit yes for the prod promote up front and confirm the plan.
- SNAPSHOT the source data read-only:
npx convex export --path snapshot.zip(from the deployment holding the real data; add--include-file-storageonly if the migration touches files). This is a read; it changes nothing. - CREATE the preview FROM THE PRE-CHANGE CODE — do this BEFORE editing schema.ts, so the preview starts on the schema the snapshot data already conforms to:
npx convex deploy --preview-create migrate-<slug>(needs the preview key; auto-expires ~5 days). Seed it:npx convex import snapshot.zip --deployment migrate-<slug>(import targets a deployment by NAME with--deployment; there is no--preview-nameflag on import). The import succeeds because the data still matches the old schema. - REHEARSE on the preview, in the migrate order — each push is
npx convex deploy --preview-name migrate-<slug>(re-deploys to the SAME preview, keeping its data; NOTconvex dev, which targets personal dev): (a) make the new/changed field OPTIONAL and deploy — if existing rows violate it the push FAILS HERE on the copy with the offending shape; fix and re-push until green. (b) write a @convex-dev/migrations backfill and run it against the preview; verify every row is now valid. (c) tighten the validator (required / narrowed union) and deploy again — the gate now passes because the backfill ran. - VERIFY on the preview: run the app's functions against the migrated data (MCP
run/runOneoffQuerypointed at the preview, or a smoke query) to confirm behavior and shape. - PROMOTE only on the fresh explicit yes from step 1: apply the SAME sequence to prod (optional schema → backfill → tighten). Because it already succeeded on prod-shaped data, the prod push repeats a proven run. Keep the snapshot as the rollback artifact (
npx convex import snapshot.zip --replace --prod); state plainly that data written after the snapshot is lost, so keep the promote window short. - CLEAN UP: the preview auto-expires; delete the local snapshot when done (it holds real data — treat it as sensitive, never commit it).
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 27 lines · 34 tokens per session scan A e79785bb8508
migrate-rehearse is a command published in the GitHub repository get-convex/convex-agent-plugins (112 stars, last pushed 8d ago), licensed MIT. It adds 34 tokens to every session and 1,045 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
review-renovate
Review and merge renovate PRs with automerge configuration updates.
monitor-ci
Monitors pull request CI checks until they are resolved (pass or fail).
plan-regression-tests
Plan regression tests for existing code with it.skip statements.
init
Initialize configurations for Supabase local development.
volume-admin-set-status
Changes the operational status of a named volume.
database-setup
Use when a project needs to store data and has no database yet. Setting up Supabase, creating tables, writing queries, and connecting them to the frontend. Written for designers.