Agent skill

Migrate

by softspark in softspark/ai-toolkit

Run/create DB migrations (Alembic, Prisma, Laravel, Django, Flyway, Drizzle); checks backup.

Apache-2.0Auto-check: notesDatabases

Install Migrate

skills CLI
$ npx skills add softspark/ai-toolkit --skill migrate -a claude-code

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

GitHub CLI
$ gh skill install softspark/ai-toolkit migrate --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/softspark/ai-toolkit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/app/skills/migrate .claude/skills/migrate && 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
migrate
GitHub stars
179
Token cost
~1.3k tokens
SKILL.md length
521 words
Files
2 (incl. scripts)
Skills in repo
112
Repo updated
First seen
Licence
Apache-2.0

At a glance

Run/create DB migrations (Alembic, Prisma, Laravel, Django, Flyway, Drizzle); checks backup.

  • Works in 4 steps: Detect migration tool → Generate migration from model/schema… → Review generated SQL → …
  • Tasks that involve Database migrations
  • SKILL.md covers What This Command Does, Project context, Migration Status Script and Auto-Detection, plus 7 more sections
  • Runs Python scripts from its folder; calls npx, python3 and php

What it does

Migrate is an agent skill from softspark/ai-toolkit. Run/create DB migrations (Alembic, Prisma, Laravel, Django, Flyway, Drizzle); checks backup. Triggers: apply migration, rollback, generate migration.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/migration-status.py`).

It sits in Databases, covering Database migrations, ORMs and data access and Backend development. It works with Prisma, Laravel, Django and SQL. The repository describes itself as: Professional-grade AI coding toolkit: 94 skills, 44 agents, multi-platform (Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider, Augment, Antigravity, Codex CLI… The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Database migrations
  • Tasks that involve ORMs and data access
  • Tasks that involve Backend development

Example prompts

  • “/migrate”

Requirements

  • Python 3
  • Node.js
  • Pre-approved tools (allowed-tools): Bash, Read

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Detect migration tool
  2. Generate migration from model/schema changes
  3. Review generated SQL
  4. Validate syntax

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • npx
    • python3
    • php
    • python

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

  • Network

    No URLs in SKILL.md. Its commands use npx, 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

Migrate loads about 1.3k tokens when it runs. Until then it costs about 39 tokens; SKILL.md has 521 words of instructions outside code blocks.

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

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read

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); the scripts in this folder are not scanned.

SKILL.md

The full file from softspark/ai-toolkit at commit d64db2b, republished under its Apache-2.0 licence (© softspark). 521 words, ~1,275 tokens.

Download SKILL.mdSave it as .claude/skills/migrate/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
migrate
description
Run/create DB migrations (Alembic, Prisma, Laravel, Django, Flyway, Drizzle); checks backup. Triggers: apply migration, rollback, generate migration.
allowed-tools
Bash, Read
effort
medium
disable-model-invocation
true
argument-hint
[direction]
scripts
scripts/migration-status.py

/migrate - Database Migration Workflow

$ARGUMENTS

What This Command Does

Create, run, or manage database migrations with auto-detection of the migration tool.

Project context

  • Migration tools: !ls alembic.ini prisma/ database/migrations/ manage.py 2>/dev/null

Migration Status Script

Detect migration tool and report status:

bash
python3 ${CLAUDE_SKILL_DIR}/scripts/migration-status.py [directory]

Returns JSON with: tool, config_file, migrations_dir, total_migrations, latest, commands{} (status/create/upgrade/downgrade).

Auto-Detection

File FoundToolCommands
alembic.iniAlembicalembic revision, alembic upgrade
prisma/schema.prismaPrismanpx prisma migrate dev
database/migrations/ + artisanLaravelphp artisan migrate
manage.pyDjangopython manage.py migrate
flyway.confFlywayflyway migrate
drizzle.config.tsDrizzlenpx drizzle-kit push

Workflow

Create New Migration
  1. Detect migration tool
  2. Generate migration from model/schema changes
  3. Review generated SQL
  4. Validate syntax
Run Migrations
  1. Show pending migrations
  2. Dry-run if supported (--pretend, --sql)
  3. Backup reminder
  4. Apply with user confirmation
  5. Verify success
Rollback
  1. Show last applied migration
  2. Confirm rollback scope
  3. Execute rollback
  4. Verify state

Safety Checks (MANDATORY)

  • Migration tested on development/staging first
  • Rollback path verified
  • No data loss in forward or backward direction
  • Large table operations use concurrent/online DDL
  • Backup exists or reminder given

Usage Examples

/migrate                     # Show migration status
/migrate create add_users    # Create new migration
/migrate run                 # Apply pending migrations
/migrate rollback            # Rollback last migration
/migrate status              # Show applied/pending migrations

Reference Skill

Use migration-patterns skill for zero-downtime strategies and best practices.

Rules

  • MUST verify a recent backup exists (or confirmed in-progress) before any forward migration on production
  • MUST show the generated SQL (dry-run / --pretend / --sql) before applying — the user approves the diff, not just the command
  • NEVER run destructive migrations (DROP TABLE/COLUMN, NOT NULL on existing column, type change) without a tested rollback path
  • NEVER mix schema changes and data backfill in the same migration — they fail differently and roll back differently
  • CRITICAL: large-table operations use the concurrent/online variant (ALTER TABLE ... ALGORITHM=INPLACE, CREATE INDEX CONCURRENTLY) — table locks in production cause outages, not slowdowns
  • MANDATORY: migrations test on a non-production environment first with representative data volume
Show full SKILL.md (227 more words)Show less

Gotchas

  • alembic upgrade head silently skips migrations with branches if the branch head is not explicit. Multi-head migrations need alembic upgrade <revision>@head or a merge migration first.
  • Prisma's prisma migrate dev auto-generates migrations AND applies them AND reseeds the dev database. Running it on a production-connected config destroys data. Always use prisma migrate deploy in non-dev.
  • Laravel's migrate command without --force refuses to run in APP_ENV=production. Scripts that blindly run migrate hang on interactive prompts in prod — always use artisan migrate --force in automation.
  • Django's migrate --fake marks a migration as applied without running it. Intended for manual data fixes, but accidentally using it skips real schema changes and silently diverges production from code.
  • CREATE INDEX CONCURRENTLY (Postgres) cannot run inside a transaction. Alembic wraps each migration in a transaction by default — concurrent index creation needs op.execute() with autocommit_block() or a manual COMMIT.
  • Rolling back a forward migration that added a NOT NULL column deletes the column; data in that column is gone. "Rollback" is not "undo" if the column held user data during the forward window.

When NOT to Use

  • For zero-downtime schema evolution strategy (expand-contract, double-write) — use /migration-patterns
  • For designing the schema from scratch — use /database-patterns
  • For application-layer rollback (deploying previous code) — use /rollback
  • For CI-triggered migrations — use /ci or /deploy
  • When no migration tool is detected — propose one from /app-builder instead of ad-hoc SQL

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

Files

SKILL.md and 1 other file (scripts) in app/skills/migrate of softspark/ai-toolkit.

  • SKILL.md
  • scripts/migration-status.py

Open the folder on GitHubat commit d64db2b

Compare with similar skills

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

Migrate compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Migrate this skillsoftspark/ai-toolkit179—~1.3kAutomated safety check: NotesApache-2.0
Database Migrationsaffaan-m/ECC275k4 repos~3kAutomated safety check: PassMIT
Database Migrationsaffaan-m/ECC275k3 repos~1.9kAutomated safety check: PassMIT
Database Migrationsaffaan-m/ECC275k1 repos~2.4kAutomated safety check: PassMIT
Safe Database Migration Patternsaffaan-m/ECC275k—~3.3kAutomated safety check: PassMIT
Database Migrationsaffaan-m/ECC275k—~335Automated safety check: PassMIT

Similar skills

  • Safe, reversible database migration patterns: forward-only production changes, expand-contract zero-downtime renames, concurrent indexes, batched backfills, and per-tool workflows for PostgreSQL…

    275k GitHub starsUsed in 4 repos~3k tokens
    DatabasesAuto-check passed
  • 数据库迁移最佳实践,涵盖模式变更、数据迁移、回滚以及零停机部署,适用于PostgreSQL、MySQL及常用ORM(Prisma、Drizzle、Django、TypeORM、golang-migrate)。

    275k GitHub starsUsed in 3 repos~1.9k tokens
    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…

    275k GitHub starsUsed in 1 repo~2.4k tokens
    DatabasesAuto-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.

    275k GitHub stars~3.3k tokensUpdated 3 days ago
    DatabasesAuto-check passed
  • PostgreSQL、MySQL、一般的なORM(Prisma、Drizzle、Kysely、Django、TypeORM、golang-migrate)全体のスキーマ変更、データマイグレーション、ロールバック、ゼロダウンタイムデプロイメントのためのデータベースマイグレーションベストプラクティス。

    275k GitHub stars~335 tokensUpdated 3 days ago
    DatabasesAuto-check passed
  • DB Migrator

    laolaoshiren/claude-code-skills-zh

    数据库迁移助手 - Schema 对比、迁移脚本生成

    878 GitHub stars~677 tokensUpdated 3 days ago
    DatabasesAuto-check passed

More from softspark/ai-toolkit

All 112 skills in this repo
  • Prepare Test Env

    softspark/ai-toolkit

    Prepare or verify a project QA environment with source identity, readiness, browser access, evidence paths and owned cleanup.

    179 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check: notes
  • A11y Validate

    softspark/ai-toolkit

    Accessibility validator: WCAG 2.1 AA, EN 301 549, EAA. An agent skill from softspark/ai-toolkit.

    179 GitHub stars~3.8k tokensUpdated yesterday
    Auto-check: notes
  • Analyze

    softspark/ai-toolkit

    Analyzes code quality, complexity, patterns across codebase.

    179 GitHub stars~1k tokensUpdated yesterday
    Auto-check passed
  • Autonomous Dev

    softspark/ai-toolkit

    Drives a brief, specification, issue or existing PR through implementation, review, tests and QA to a ready PR.

    179 GitHub stars~2.6k tokensUpdated yesterday
    Auto-check: notes
  • Brand Voice

    softspark/ai-toolkit

    Direct technical voice for docs, README, user-facing text. An agent skill from softspark/ai-toolkit.

    179 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • CI

    softspark/ai-toolkit

    Detect/generate/debug CI pipeline config (GitHub Actions, GitLab CI).

    179 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check: notes

Categories

Questions about Migrate

What does Migrate do?

Run/create DB migrations (Alembic, Prisma, Laravel, Django, Flyway, Drizzle); checks backup. Migrate is an agent skill from softspark/ai-toolkit. Run/create DB migrations (Alembic, Prisma, Laravel, Django, Flyway, Drizzle); checks backup.

When should I use Migrate?

Migrate fits situations like: tasks that involve Database migrations; tasks that involve ORMs and data access; tasks that involve Backend development.

How do I install Migrate in Claude Code?

Run `npx skills add softspark/ai-toolkit --skill migrate -a claude-code`. Or copy the skill folder (app/skills/migrate in softspark/ai-toolkit) into .claude/skills/migrate in your project. Claude Code loads it when a task matches its description.

How do I install Migrate in Codex?

Run `npx skills add softspark/ai-toolkit --skill migrate -a codex`. Or copy the skill folder (app/skills/migrate in softspark/ai-toolkit) into .agents/skills/migrate in your project. Codex loads it when a task matches its description.

Can I use Migrate 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 softspark/ai-toolkit --skill migrate -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/migrate, .gemini/skills/migrate, .github/skills/migrate and .opencode/skills/migrate in your project.

What does Migrate need to run?

Going by SKILL.md and its folder, Migrate needs Python for the scripts in its folder and the command-line tools its instructions call (npx, python3, php and python). Our summary lists: Python 3; Node.js. Its frontmatter pre-approves these tools: Bash, Read.

Does Migrate access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Migrate safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Migrate use?

Migrate is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Migrate use?

About 1.3k tokens (SKILL.md is roughly 5.1k 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 Migrate?

Skills that share tags, products or a category with Migrate: Database Migrations (affaan-m/ECC, 275k stars), Database Migrations (affaan-m/ECC, 275k stars), Database Migrations (affaan-m/ECC, 275k stars) and Safe Database Migration Patterns (affaan-m/ECC, 275k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Migrate?

softspark (a GitHub user) maintains it in softspark/ai-toolkit, which has 179 GitHub stars. The repository holds 112 skills in this directory. The repository was last updated on October 7, 2026.

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