Agent skill

Database Migrations

by WrongStack in WrongStack/WrongStack

Design and verify schema migrations, bounded backfills and deployment compatibility for databases.

MITAuto-check passedDatabases

Install Database Migrations

skills CLI
$ npx skills add WrongStack/WrongStack --skill database-migrations -a claude-code

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

GitHub CLI
$ gh skill install WrongStack/WrongStack database-migrations --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/WrongStack/WrongStack.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/core/skills/database-migrations .claude/skills/database-migrations && 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
database-migrations
GitHub stars
371
Token cost
~843 tokens
SKILL.md length
330 words
Files
1
Skills in repo
100
Repo updated
First seen
Licence
MIT

At a glance

Design and verify schema migrations, bounded backfills and deployment compatibility for databases.

  • Works in 6 steps: Inspect the current schema, migration… → Use expand/backfill/validate/contract… → Estimate lock/write amplification and… → …
  • Adding constraints
  • SKILL.md covers Selection card, Overview, Rules and Workflow, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Database Migrations is an agent skill from WrongStack/WrongStack. Design and verify schema migrations, bounded backfills and deployment compatibility for databases. Use when adding constraints or indexes, changing column types, evolving schemas or recovering failed migrations; distinguish reversible application rollback from data restoration.

Its SKILL.md is about 840 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering Database migrations. The repository describes itself as: An AI coding agent that reads your code, edits files, runs commands, and reasons through bugs — across a terminal REPL, a full-screen TUI, and a browser UI, while you keep your… The licence is MIT.

When your agent uses it

  • Adding constraints
  • Changing column types
  • Evolving schemas
  • Recovering failed migrations

Example prompts

  • “/database-migrations”

Workflow steps

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

  1. Inspect the current schema, migration history, engine/version, ORM and real
  2. Use expand/backfill/validate/contract where old and new code overlap.
  3. Estimate lock/write amplification and data volume. Use bounded batches,
  4. Separate data restoration from a down migration. Dropped information cannot
  5. Plan backup/restore or forward repair, monitor progress and define abort
  6. Use local fixtures or an authorized isolated database for verification;

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

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

  • Network

    Links to these hosts (documentation or services it may open):

    • postgresql.org

    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

Database Migrations loads about 843 tokens when it runs. Until then it costs about 75 tokens; SKILL.md has 330 words of instructions outside code blocks.

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

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 passed

The automated check found no risky patterns in SKILL.md.

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 WrongStack/WrongStack at commit a744bdc, republished under its MIT licence (© WrongStack). 330 words, ~843 tokens.

Download SKILL.mdSave it as .claude/skills/database-migrations/SKILL.md (or your agent's skills folder).
name
database-migrations
description
Design and verify schema migrations, bounded backfills and deployment compatibility for databases. Use when adding constraints or indexes, changing column types, evolving schemas or recovering failed migrations; distinguish reversible application rollback from data restoration.
version
1.0.1
trigger
adding constraints or indexes, changing column types, evolving schemas or recovering failed migrations; distinguish reversible application rollback from data…
required-capabilities
filesystem.read, filesystem.write
optional-capabilities
verification.run, web.research
metadata.routing-group
data

Database Migrations

Selection card

  • Task: Deploy compatible schema changes and backfills. / TR: Uyumlu şema değişikliği ve backfill yayınla.
  • Start: Identify the data owner, query/schema, consistency and recovery contract.
  • Finish: apply the acceptance checks below; report observed results and unresolved constraints.

Overview

Ship schema changes that preserve data and work across deployment overlap. Database engine, version and migration tool determine transactional DDL, locking, index creation and rollback behavior.

Rules

  1. Inspect the current schema, migration history, engine/version, ORM and real readers/writers. Do not assume every DDL operation is transactional.
  2. Use expand/backfill/validate/contract where old and new code overlap. Destructive contraction needs verified consumer retirement and a recovery plan.
  3. Estimate lock/write amplification and data volume. Use bounded batches, stable progress keys, idempotency and checkpointed restart for large backfills.
  4. Separate data restoration from a down migration. Dropped information cannot be recreated merely by reversing a schema statement.
  5. Plan backup/restore or forward repair, monitor progress and define abort conditions. A backup existence check is not a tested restoration.
  6. Use local fixtures or an authorized isolated database for verification; a migration plan does not authorize production execution.

Workflow

  1. Record invariants and compatibility across the old/new application versions.
  2. Generate migrations with the project's tool and inspect resulting SQL, lock behavior, constraints and index strategy for the actual engine.
  3. Apply to a fresh database and a representative existing schema.
  4. Inject failure/restart in a bounded backfill and verify no omissions/duplicates. Compare row counts, constraints and important application queries.
  5. Exercise rollback where reversible; otherwise test the documented forward repair/restore in the isolated environment.
  6. Report migration commands, data verification, estimated production impact and the execution boundary.

Sources

PostgreSQL ALTER TABLE is an engine-specific reference; use the selected engine's current documentation and exact version for operational decisions.

Acceptance checks

  • Prove old/new application compatibility, backfill repeatability, migration ordering and a recovery path.

Skills in scope

  • data-governance — ownership, retention and classification.
  • api-design — compatibility for clients.
  • testing — migration and restart evidence.
  • observability — rollout signals.

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

Files

Just SKILL.md in packages/core/skills/database-migrations of WrongStack/WrongStack.

Open the folder on GitHubat commit a744bdc

Compare with similar skills

Database Migrations 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.

Database Migrations compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Database Migrations this skillWrongStack/WrongStack371—~843Automated safety check: PassMIT
Evolving The Data ModelTriliumNext/Trilium38k—~2.1kAutomated safety check: PassAGPL-3.0
Creating Database MigrationsNangoHQ/nango13k—~449Automated safety check: PassCustom licence
Openwrt Package UpdateNethServer/nethsecurity192—~841Automated safety check: PassCustom licence
Free Willsyahiidkamil/Software-Engineer-AI-Agent-Atlas401—~3.4kAutomated safety check: PassNone
Ecto Migrationsoperately/operately579—~1.2kAutomated safety check: PassCustom licence

Similar skills

  • Evolving The Data Model

    TriliumNext/Trilium

    A skill your agent uses when adding a DB migration or a new column/field to a Becca entity in Trilium ("add a migration", "new column on notes/attributes", "ALTER TABLE", "add a field to…

    38k GitHub stars~2.1k tokensUpdated today
    DatabasesAuto-check passed
  • A skill your agent uses when adding or editing Nango database migrations - covers migration directory selection, timestamped .cjs naming, matching recent migration style, down migration decisions…

    13k GitHub stars~449 tokensUpdated yesterday
    DatabasesAuto-check passed
  • Openwrt Package Update

    NethServer/nethsecurity

    A skill your agent uses when updating any forked OpenWrt package in a NethSecurity workspace from the upstream openwrt/packages feed.

    192 GitHub stars~841 tokensUpdated 2 days ago
    DatabasesAuto-check passed
  • Free Will

    syahiidkamil/Software-Engineer-AI-Agent-Atlas

    Deliberate-choice procedure for a medium-to-high-stakes engineering fork — when the first plausible solution (the instinct, the default next-token pull) would be costly to get wrong.

    401 GitHub stars~3.4k tokensUpdated 3 mo ago
    DatabasesAuto-check passed
  • Ecto Migrations

    operately/operately

    Rules for Operately schema migrations (app/priv/repo/migrations/) and data migrations (app/lib/operately/data/change.ex).

    579 GitHub stars~1.2k tokensUpdated today
    DatabasesAuto-check passed
  • DB Migrate

    simstudioai/sim

    Author or review a Drizzle DB migration for zero-downtime safety — expand/contract phasing, backward-compatibility with the deployed app version, and writing the -- migration-safe acknowledgment the…

    30k GitHub stars~2k tokensUpdated today
    DatabasesAuto-check passed

More from WrongStack/WrongStack

All 100 skills in this repo
  • Tech Stack

    WrongStack/WrongStack

    Validate and upgrade dependencies against live registries and official migration guides in any ecosystem.

    374 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Skill Creator

    WrongStack/WrongStack

    Create, improve and validate WrongStack SKILL.md bundles with precise discovery, progressive resources and current runtime contracts.

    374 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Bug Hunter

    WrongStack/WrongStack

    A skill your agent uses when scanning source code for bugs, anti-patterns, code smells, or quality issues in a codebase, or when running a proof-driven bug hunt that must find, prove, fix, and…

    374 GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Design Craft

    WrongStack/WrongStack

    Design or substantially improve user-facing interfaces with a product-specific visual direction, content hierarchy, and rendered critique.

    374 GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Design Critique

    WrongStack/WrongStack

    A skill your agent uses to audit an interface that already exists and say precisely why it looks generated, templated, or unfinished — a scored rubric across composition, typography, color, states…

    374 GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Mailbox Bridge

    WrongStack/WrongStack

    A skill your agent uses when external coding agents (Claude Code, Aider, custom scripts) need to participate in the project's shared WrongStack mailbox, or when a user asks to "expose the mailbox"…

    374 GitHub stars~2.6k tokensUpdated today
    Auto-check passed

Categories

Questions about Database Migrations

What does Database Migrations do?

Design and verify schema migrations, bounded backfills and deployment compatibility for databases. Database Migrations is an agent skill from WrongStack/WrongStack. Design and verify schema migrations, bounded backfills and deployment compatibility for databases.

When should I use Database Migrations?

Database Migrations fits situations like: adding constraints; changing column types; evolving schemas; recovering failed migrations.

How do I install Database Migrations in Claude Code?

Run `npx skills add WrongStack/WrongStack --skill database-migrations -a claude-code`. Or copy the skill folder (packages/core/skills/database-migrations in WrongStack/WrongStack) into .claude/skills/database-migrations in your project. Claude Code loads it when a task matches its description.

How do I install Database Migrations in Codex?

Run `npx skills add WrongStack/WrongStack --skill database-migrations -a codex`. Or copy the skill folder (packages/core/skills/database-migrations in WrongStack/WrongStack) into .agents/skills/database-migrations in your project. Codex loads it when a task matches its description.

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

What does Database Migrations need to run?

SKILL.md names no scripts, command-line tools or credentials: Database Migrations is instructions for the agent only.

Does Database Migrations access the network?

SKILL.md names 1 domain. As links in the text: postgresql.org. This is read from the text; nothing was executed.

Is Database Migrations safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Database Migrations use?

Database Migrations is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Database Migrations use?

About 843 tokens (SKILL.md is roughly 3.4k 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 Database Migrations?

Skills that share tags, products or a category with Database Migrations: Evolving The Data Model (TriliumNext/Trilium, 38k stars), Creating Database Migrations (NangoHQ/nango, 13k stars), Openwrt Package Update (NethServer/nethsecurity, 192 stars) and Free Will (syahiidkamil/Software-Engineer-AI-Agent-Atlas, 401 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Database Migrations?

WrongStack (a GitHub organization) maintains it in WrongStack/WrongStack, which has 371 GitHub stars. The repository holds 100 skills in this directory. The repository was last updated on October 10, 2026.

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