Build zero-downtime database migrations — forward SQL, rollback SQL, deployment sequence.

MITAuto-check: notesDatabases

Install Flux Migrate

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill flux-migrate -a claude-code

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

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace flux-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/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/ai-agency/tonone/skills/flux-migrate .claude/skills/flux-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
flux-migrate
GitHub stars
2.8k
Token cost
~1.9k tokens
SKILL.md length
520 words
Files
2
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Build zero-downtime database migrations — forward SQL, rollback SQL, deployment sequence.

  • Works in 5 steps: Detect the Stack → Understand the Change → Classify the Operation → …
  • Asked to write migration
  • SKILL.md covers Steps and Delivery
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Flux Migrate is an agent skill from jeremylongshore/tons-of-skills-marketplace. Build zero-downtime database migrations — forward SQL, rollback SQL, deployment sequence. Use when asked to "write migration", "schema change", "add column", "rename table", "drop column", or "migrate safely".

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `.claude-plugin/plugin.json`).

It sits in Databases, covering Database migrations, SQL and Deployment. It works with SQL and Prisma. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Asked to write migration
  • Tasks that involve Database migrations
  • Tasks that involve SQL

Example prompts

  • “write migration”
  • “schema change”
  • “add column”
  • “/flux-migrate”

Requirements

  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, Task, TodoWrite, AskUserQuestion

Workflow steps

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

  1. Detect the Stack
  2. Understand the Change
  3. Classify the Operation
  4. Write the Migration Files
  5. Output the Deployment Plan

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. 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:

    • Read
    • Write
    • Edit
    • Bash
    • Glob
    • Grep
    • WebFetch
    • WebSearch
    • Task
    • TodoWrite

    …and 1 more on the same allowed-tools line.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are sql).

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

  • Network

    No URLs in SKILL.md.

    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

Flux Migrate loads about 1.9k tokens when it runs. Until then it costs about 56 tokens; SKILL.md has 520 words of instructions outside code blocks.

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

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: Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, Task, TodoWrite, AskUserQuestion

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 jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 520 words, ~1,904 tokens.

Download SKILL.mdSave it as .claude/skills/flux-migrate/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
flux-migrate
description
Build zero-downtime database migrations — forward SQL, rollback SQL, deployment sequence. Use when asked to "write migration", "schema change", "add column", "rename table", "drop column", or "migrate safely".
allowed-tools
Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, Task, TodoWrite, AskUserQuestion
version
0.6.4
author
tonone-ai <hello@tonone.ai>
license
MIT

Build Zero-Downtime Migration

You are Flux — the data engineer on the Engineering Team. Produce a complete migration: executable SQL for the forward change, executable SQL for the rollback, and a clear deployment sequence. Not a list of things to consider — actual files.

Follow the output format defined in docs/output-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose.

Steps

Step 0: Detect the Stack

Check for the project's migration tooling:

  • ORM configs: prisma/schema.prisma, alembic.ini, drizzle.config.ts, ormconfig.ts, knexfile.js
  • Migration directories: prisma/migrations/, alembic/versions/, migrations/, db/migrate/
  • Connection strings to confirm the database engine
  • Check the naming and numbering convention of existing migrations

If no tooling is detectable, default to raw SQL migration files.

Step 1: Understand the Change

Read the current schema. Establish:

  • What is being added, removed, or modified?
  • Does existing data need to be preserved or transformed?
  • What application code depends on the current schema? (Check models, queries, ORM definitions)
  • Can migrations run before the application deploys, or must they be coordinated?
  • Is this table empty, small, or carrying live production traffic? This determines the safety requirements.
Step 2: Classify the Operation

Determine whether this is a safe or risky operation:

OperationRiskStrategy
Add nullable columnSafeSingle migration
Add NOT NULL column with defaultSafeSingle migration with DEFAULT
Add NOT NULL column without defaultRiskyExpand/contract — 3 steps
Add indexRisky (locks on naive CREATE INDEX)CREATE INDEX CONCURRENTLY
Drop columnRiskyRemove code references first, drop in separate deploy
Rename columnRiskyExpand/contract — add new, backfill, update code, drop old
Change column typeRiskyExpand/contract — add new column, backfill with cast, update code, drop old
Add NOT NULL constraint to existing columnRiskyADD CONSTRAINT ... NOT VALID, then VALIDATE CONSTRAINT separately
Drop tableRiskyRemove all references first, drop in separate deploy
Large backfillRiskyBatched update with row-rate limiting

For any risky operation, the migration is a sequence of steps across multiple deploys — not a single file.

Show full SKILL.md (198 more words)Show less
Step 3: Write the Migration Files

Write complete, executable SQL. No placeholders. No "fill in your table name here."

For safe single-step migrations, write one file with forward and rollback:

sql
-- migrate:up

ALTER TABLE [table] ADD COLUMN [col] [type] [constraints];

-- migrate:down

ALTER TABLE [table] DROP COLUMN [col];

For expand/contract migrations, write one file per step:

Step 1 — Expand (deploy before code change):

sql
-- migrate:up
-- Add the new column, nullable, no constraints yet
ALTER TABLE [table] ADD COLUMN [new_col] [type];

-- migrate:down
ALTER TABLE [table] DROP COLUMN [new_col];

Step 2 — Backfill (run as a separate job or migration after Step 1 is deployed):

sql
-- migrate:up
-- Backfill in batches to avoid locking
-- Run this via a script with rate limiting if the table is large
UPDATE [table] SET [new_col] = [expression] WHERE [new_col] IS NULL;

-- migrate:down
-- No rollback needed; the column can be left null

Step 3 — Contract (deploy after code is updated to use new column):

sql
-- migrate:up
ALTER TABLE [table] ALTER COLUMN [new_col] SET NOT NULL;
ALTER TABLE [table] DROP COLUMN [old_col];

-- migrate:down
ALTER TABLE [table] ALTER COLUMN [new_col] DROP NOT NULL;
ALTER TABLE [table] ADD COLUMN [old_col] [type];
-- Note: old_col data is gone; restore from backup if rollback is needed

For indexes on live tables, always use CONCURRENTLY:

sql
-- migrate:up
CREATE INDEX CONCURRENTLY idx_[table]_[col] ON [table]([col]);

-- migrate:down
DROP INDEX CONCURRENTLY idx_[table]_[col];

Note: CREATE INDEX CONCURRENTLY cannot run inside a transaction block. If using a migration tool that wraps in a transaction, disable it for this migration.

For NOT NULL constraints on existing columns, use the two-phase approach:

sql
-- Step 1 migrate:up
ALTER TABLE [table] ADD CONSTRAINT [table]_[col]_not_null CHECK ([col] IS NOT NULL) NOT VALID;

-- Step 1 migrate:down
ALTER TABLE [table] DROP CONSTRAINT [table]_[col]_not_null;
sql
-- Step 2 migrate:up (separate deploy, after backfill confirms no nulls)
ALTER TABLE [table] VALIDATE CONSTRAINT [table]_[col]_not_null;

-- Step 2 migrate:down
-- Constraint remains but is no longer validated; drop if needed
ALTER TABLE [table] DROP CONSTRAINT [table]_[col]_not_null;

Write the actual files for the project using its migration tool's conventions.

Step 4: Output the Deployment Plan

After writing files, output the deployment sequence:

┌─ Migration: [change description] ───────────────────────┐
│ Steps: X  │  Type: [safe / expand-contract / backfill]  │
└─────────────────────────────────────────────────────────┘

Deployment Sequence
  1. [file or action] — [what it does] — [estimated duration / locking risk]
  2. [file or action] — [what it does] — [estimated duration / locking risk]
  3. [code deploy] — [what changes in the application]

Rollback
  [step] — [rollback action] — [data loss risk if any]

Pre-Deploy Checklist
  [ ] Backup verified and tested
  [ ] Tested against a copy of production data, not just 10 rows
  [ ] Not deploying during peak traffic window
  [ ] Connection pool size confirmed — migration won't starve app connections
  [ ] For CONCURRENTLY indexes: transaction wrapping disabled for this migration

40 lines max for the summary. The SQL files are the artifact — they are complete and executable.

Delivery

If output exceeds the 40-line CLI budget, invoke /atlas-report with the full findings. The HTML report is the output. CLI is the receipt — box header, one-line verdict, top 3 findings, and the report path. Never dump analysis to CLI.

© jeremylongshore, MIT. 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 in plugins/ai-agency/tonone/skills/flux-migrate of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • .claude-plugin/plugin.json

Open the folder on GitHubat commit cfae287

Compare with similar skills

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

Flux Migrate compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Flux Migrate this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.9kAutomated safety check: NotesMIT
Wtfnoobnooc/agent1.4k—~2.1kAutomated safety check: NotesNone
Database FundamentalsDanielPodolsky/ownyourcode2901 repos~1.6kAutomated safety check: PassMIT
DB Migrationskurealnum/dotfiles290—~820Automated safety check: PassNone
Archestra Dev Migrationsarchestra-ai/archestra4.4k—~804Automated safety check: PassCustom licence
Database Migrationdavila7/claude-code-templates33k11 repos~2.8kAutomated safety check: PassMIT

Similar skills

  • Wtf

    noobnooc/agent

    Pre-launch and pre-commit audit for vibe coding projects. An agent skill from noobnooc/agent.

    1.4k GitHub stars~2.1k tokensUpdated 1 mo ago
    DatabasesAuto-check: notes
  • Database Fundamentals

    DanielPodolsky/ownyourcode

    Reviews schema design, SQL queries, ORM patterns. An agent skill from DanielPodolsky/ownyourcode.

    290 GitHub starsUsed in 1 repo~1.6k tokens
    DatabasesAuto-check passed
  • DB Migrations

    kurealnum/dotfiles

    A skill your agent uses when generating or regenerating Drizzle migration files, changing database schema tables or columns, resolving migration sequence conflicts after rebase, reviewing migration…

    290 GitHub stars~820 tokensUpdated 6 mo ago
    DatabasesAuto-check passed
  • Archestra Dev Migrations

    archestra-ai/archestra

    A skill your agent uses when changing Drizzle schemas, generating migrations, editing migration SQL, creating data-only migrations, diagnosing drizzle-kit check failures, or resolving…

    4.4k GitHub stars~804 tokensUpdated today
    DatabasesAuto-check passed
  • Database Migration

    davila7/claude-code-templates

    Master database schema and data migrations across ORMs (Sequelize, TypeORM, Prisma), including rollback strategies and zero-downtime deployments.

    33k GitHub starsUsed in 11 repos~2.8k tokens
    DatabasesAuto-check passed
  • Migration

    kortix-ai/suna

    How to change the database schema in this repo. An agent skill from kortix-ai/suna.

    20k GitHub stars~1.2k tokensUpdated today
    DatabasesAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Flux Migrate

What does Flux Migrate do?

Build zero-downtime database migrations — forward SQL, rollback SQL, deployment sequence. Flux Migrate is an agent skill from jeremylongshore/tons-of-skills-marketplace. Build zero-downtime database migrations — forward SQL, rollback SQL, deployment sequence.

When should I use Flux Migrate?

Flux Migrate fits situations like: asked to write migration; tasks that involve Database migrations; tasks that involve SQL.

How do I install Flux Migrate in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill flux-migrate -a claude-code`. Or copy the skill folder (plugins/ai-agency/tonone/skills/flux-migrate in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/flux-migrate in your project. Claude Code loads it when a task matches its description.

How do I install Flux Migrate in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill flux-migrate -a codex`. Or copy the skill folder (plugins/ai-agency/tonone/skills/flux-migrate in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/flux-migrate in your project. Codex loads it when a task matches its description.

Can I use Flux 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 jeremylongshore/tons-of-skills-marketplace --skill flux-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/flux-migrate, .gemini/skills/flux-migrate, .github/skills/flux-migrate and .opencode/skills/flux-migrate in your project.

What does Flux Migrate need to run?

SKILL.md names no scripts, command-line tools or credentials: Flux Migrate is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, Task, TodoWrite, AskUserQuestion.

Does Flux Migrate 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 Flux 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. Review the folder before installing.

What licence does Flux Migrate use?

Flux Migrate is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Flux Migrate use?

About 1.9k tokens (SKILL.md is roughly 7.6k 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 Flux Migrate?

Skills that share tags, products or a category with Flux Migrate: Wtf (noobnooc/agent, 1.4k stars), Database Fundamentals (DanielPodolsky/ownyourcode, 290 stars), DB Migrations (kurealnum/dotfiles, 290 stars) and Archestra Dev Migrations (archestra-ai/archestra, 4.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Flux Migrate?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.