migrate

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

A command that detects the project's database migration tool and applies migrations, rolls them back, or reports their status. A migration is a recorded database change, such as adding a table or column.

In plain words
What is it for?
Use it to check pending database changes, apply them, or reverse selected migrations after reviewing what data or schema will be affected.
Why use it?
It avoids guessing which migration tool or database settings the project uses. Rollbacks are treated as potentially destructive and require confirmation before running.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to check pending database changes, apply them, or reverse selected migrations after reviewing what data or schema will be affected.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/random6913/claude-code-superkit/migrate
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.

Clone the repo
git clone --depth 1 https://github.com/RaNDoM6913/claude-code-superkit

Made for: Claude Code.

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for migrate

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
Origin original 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.1 $0.00012 $0.02161
Opus 5.5 $0.00005 $0.00864
Sonnet 5.5 $0.00002 $0.00432
Haiku 4.5 $0.00001 $0.00216

Measured 1mo ago against content hash 0b047810d5d0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

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. 1mo ago 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 (3 stars, last pushed 3d ago), licensed MIT. It adds 12 tokens to every session and 2,161 once invoked, about $0.0000 per session on Opus 5.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.