migrate

migrate is a command for coding agents from RaNDoM6913/claude-code-superkit. It costs 12 tokens per session (2,161 once invoked), scanned A, original, MIT.

Apply or rollback database migrations — auto-detects migration tool.

Command

Install

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.

agentmods
npx agentmods add commands/random6913/claude-code-superkit/migrate
Clone the repo
git clone --depth 1 https://github.com/RaNDoM6913/claude-code-superkit

Wrote 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.

agentmods badge for migrate

README.md
[![agentmods](https://agentmods.dev/badge/commands/random6913/claude-code-superkit/migrate.svg)](https://agentmods.dev/commands/random6913/claude-code-superkit/migrate)
Your own site
<a href="https://agentmods.dev/commands/random6913/claude-code-superkit/migrate"><img src="https://agentmods.dev/badge/commands/random6913/claude-code-superkit/migrate.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,161 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00012 $0.02161
Opus 5 $0.00006 $0.01081
Sonnet 5 $0.00002 $0.00432
Haiku 4.5 $0.00001 $0.00216

Measured today against content hash 0b047810d5d0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

migrate 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 today.

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.

packages/core/commands/migrate.md · 147 lines

How it starts

The opening of the file, as written. The whole thing — 147 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Database Migrations

Role: apply, roll back, or report the status of database migrations, auto-detecting the project's migration tool. Rollbacks destroy data — every destructive step is gated behind explicit user confirmation.

Hard Rules

  1. Destructive-action gate: before running ANY command that can destroy data (down, rollback, downgrade, reset, drop, any --force flag), STOP and ask the user for confirmation AT THAT STEP. Show the exact command and exactly what will be lost (which migrations revert; which tables/columns they drop, from reading the migration files). Run only after the user explicitly agrees.
  2. NEVER run npx prisma migrate reset (or any tool's reset/drop-and-recreate) as a routine rollback — it drops the ENTIRE database. Offer it only as a clearly labeled last resort, and only run it after the user explicitly accepts total data loss.
  3. NEVER guess a database connection string. Locate it (Step 2) or report where you looked and ask the user.
  4. Run the tool's read-only status command before any up or down, whenever the tool has one.
  5. If no migration tool is detected, report that and stop. If the detected tool has no true rollback (Prisma, Drizzle), follow its down branch in Step 4 — present only the options listed there, auto-run none of them, and do not improvise a workaround.
  6. For down N with N > 1: in the confirmation (Rule 1), restate N and list the N migrations that will be reverted; if the user's answer does not clearly cover N migrations, do not run.
  7. Prefer Makefile migration targets over raw tool commands — they may include environment setup.

Arguments

Requested action: $ARGUMENTS

Argument Action
(empty) up
up apply all pending migrations
down rollback 1 migration (confirmation-gated)
down N rollback N migrations (confirmation-gated, Rule 6)
status read-only status report
anything else report Unknown action: <arg> with the list above, stop

Read the full file on GitHub · 147 lines

Changes

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.

  1. today First seen · 147 lines · 12 tokens per session scan A 0b047810d5d0

Subscribe to this mod's changes

migrate is a command published in the GitHub repository RaNDoM6913/claude-code-superkit (2 stars, last pushed 1mo ago), licensed MIT. It adds 12 tokens to every session and 2,161 once invoked, about $0.0001 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-09-03.