database-migrations

database-migrations is a skill for Claude Code from Ozzeron/prompt-pack. It costs 97 tokens per session (2,184 once invoked), scanned A, original, MIT.

A guide for changing the structure of a live database safely. A database migration is a controlled change to tables, columns, indexes, or stored data.

In plain words
What is it for?
Use it to add, rename, remove, or change database fields and tables, create indexes, or transform existing data with reversible, staged changes.
Why use it?
It reduces the risk of downtime, blocked queries, incompatible deployments, or lost data while an application is being updated.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: built for openclaw.

Part of the backend plugin — 13 skills shipped together , and of supabase, fullstack, all-skills

Good fit Use it to add, rename, remove, or change database fields and tables, create indexes, or transform existing data with reversible, staged changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ozzeron/prompt-pack/database-migrations
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.

Any agent
npx skills add Ozzeron/prompt-pack --skill database-migrations
Clone the repo
git clone --depth 1 https://github.com/Ozzeron/prompt-pack

Made for: Claude Code.

Or install backend, the plugin that ships this one along with the rest of its 13 skills.

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 database-migrations

README.md
[![agentmods](https://agentmods.dev/badge/skills/ozzeron/prompt-pack/database-migrations/github.svg)](https://agentmods.dev/skills/ozzeron/prompt-pack/database-migrations)
Your own site
<a href="https://agentmods.dev/skills/ozzeron/prompt-pack/database-migrations"><img src="https://agentmods.dev/badge/skills/ozzeron/prompt-pack/database-migrations/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 database-migrations

Your own site · 80×15
<a href="https://agentmods.dev/skills/ozzeron/prompt-pack/database-migrations"><img src="https://agentmods.dev/badge/skills/ozzeron/prompt-pack/database-migrations.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 97 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,184 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00097 $0.02184
Opus 5.5 $0.00039 $0.00874
Sonnet 5.5 $0.00019 $0.00437
Haiku 4.5 $0.00010 $0.00218

Measured 2mo ago against content hash 78e5398be958, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

database-migrations 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 2mo 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.

prompts/architecture/database-migrations/SKILL.md · 199 lines

How it starts

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

Database Migrations

You evolve a live schema without breaking running code or losing data. Migrations are deployed incrementally; they must be backward-compatible with the currently-running application until the new code is fully rolled out.

When to use

  • Adding / removing / renaming columns or tables
  • Changing types or constraints
  • Adding indexes on production data
  • Backfilling or transforming data
  • Splitting a column into multiple, or merging columns

Do not invoke for initial schema design (database-schema) or for query problems (database-review).

Scope

In scope:

  • Migration mechanics: order of operations, expand/contract pattern
  • Naming and numbering conventions
  • Lock-aware DDL on Postgres / MySQL / SQL Server
  • Rollback strategy
  • Splitting schema migrations from data migrations

Out of scope:

  • Schema design itself (use database-schema)
  • Choosing migration tooling (Prisma, Knex, Alembic, sqlx, golang-migrate, raw SQL) — match what the project uses

Inherits

Token discipline (specific)

  • Read the most recent 5–10 migration files to learn naming, style, tooling.
  • Read the migration runner config (e.g. prisma/migrations/, alembic.ini, apply-migrations.mjs) once.
  • Do NOT re-read every historical migration — they're noise for current work.

Golden rules

  1. No destructive change in the same deploy as the code change. Add the new shape, ship code that handles both, backfill, switch reads, then remove the old shape.
  2. Every migration is reversible in concept — if the rollback isn't safe (e.g. data loss), say so explicitly in the migration comment.
  3. Schema migrations and data migrations are separate files. Don't mix DDL and large UPDATE in the same step.
  4. Long-running migrations don't run inside the deploy step. Use a job runner or a manual operator step.
  5. Locks matter. A 30-second ALTER TABLE on a busy table = an outage. Use the non-blocking variants where the DB supports them.

Read the full file on GitHub · 199 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. 2mo ago Changed · +2 lines · +71 tokens per session 78e5398be958
  2. 3mo ago First seen · 197 lines · 26 tokens per session scan A f8d3060b13e4

Subscribe to this mod's changes

database-migrations is a skill published in the GitHub repository Ozzeron/prompt-pack (8 stars, last pushed 2mo ago), licensed MIT. It adds 97 tokens to every session and 2,184 once invoked, about $0.0004 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-08-31.

Related

database-migrations compared with skills from other repositories

database-migrations next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
database-migrationsOzzeron/prompt-packSkill82mo agoMITA97Claude Code
db-checkfaizkhairi/claude-code-blueprintSkill7414d agoMITA12Claude Code
db-migration-checkerzxpmail/ReqForgeSkill1812d agoMITA0Claude Code, Codex
db-context-postgresMozurok/fhorja.devSkill101mo agoMITA113Claude Code
db-context-supabaseMozurok/fhorja.devSkill101mo agoMITA111Claude Code
migration-safety-stewardMozurok/fhorja.devSkill101mo agoMITA99Claude Code
rls-auth-boundary-auditorMozurok/fhorja.devSkill101mo agoMITA110Claude Code