migration-operation-taxonomy
БесплатноБез исполняемых скриптовНе проверенUse for any question about whether a database migration is safe to run in production, including quick ones (is adding a NOT NULL column to a big Postgres…
от testland★ 18 звёзд на GitHubОб этом скилле
Migration operation taxonomy
A migration is not one risk. It is a list of statements, each with its own lock mode, its own rewrite behavior, and its own blast radius. This skill gives you the classification scheme: how to split a migration into statements, sort each one into one of eight categories, attach a severity that a lock or rewrite fact justifies, and record which engine and which engine version the answer depends on.
Scope boundary
This skill classifies what a migration does and how dangerous that is.
It deliberately does not:
- write or rewrite migration SQL,
- choose a migration tool or framework,
- run, apply, or roll back a migration,
- read the repository to find migration files or downstream consumers.
If you need a severity for a statement, you are in the right place. If you need the statement itself authored or executed, you are not.
Step 1 - Fix the three inputs before classifying anything
Classification is meaningless without these. Record them explicitly, and say "unknown" rather than guessing.
| Input | Why it changes the answer |
|---|---|
| Engine | ADD INDEX on a large table blocks writes on PostgreSQL and does not on MySQL 8.0 InnoDB. Same logical statement, opposite severity. |
| Engine major and minor version | ADD COLUMN ... DEFAULT 'x' rewrites the whole table before PostgreSQL 11 and does not from 11 on. ADD COLUMN is instant from MySQL 8.0.12 and only in-place before it. |
| Table row count or size | Every lock-holding operation is Info on an empty table and Critical on a billion-row table. Without a size signal, report the severity band and mark the size "unverified" rather than picking a point value. |
If the engine is unknown, classify the statement in every engine you plausibly target and report the worst case, labelled per engine. Do not collapse two engines into one verdict.
Step 2 - Split the migration into statements
One row of output per statement, not per file. A single file mixing
DROP COLUMN, ADD COLUMN ... NOT NULL, and ADD CONSTRAINT produces
three classifications with three different severities. Multi-clause
ALTER TABLE t ADD COLUMN a, ALTER COLUMN b TYPE ... splits into one row
per clause, because the clauses carry different lock and rewrite behavior.
Step 3 - Sort each statement into one of eight categories
| # | Category | Examples | Default severity |
|---|---|---|---|
| 1 | Additive | ADD COLUMN nullable or with a constant DEFAULT, CREATE INDEX CONCURRENTLY, CREATE TABLE, CREATE VIEW, GRANT |
Info |
| 2 | Backwards-compatible alter | Rename paired with a compatibility view or alias, adding a default to an existing column, ADD CONSTRAINT ... NOT VALID |
Info |
| 3 | Locking | Plain CREATE INDEX on PostgreSQL, ALTER COLUMN ... TYPE, ADD COLUMN with a volatile default or stored generated column |
Warning, or Critical on a large table |
| 4 | Lock-escalating | ADD CONSTRAINT ... FOREIGN KEY, which also locks a table the statement does not name |
Warning |
| 5 | Breaking (consumer-facing) | DROP COLUMN, RENAME COLUMN with no compatibility alias, narrowing ALTER COLUMN ... TYPE, DROP TABLE, DROP CONSTRAINT |
Critical |
| 6 | Data-loss | DROP COLUMN on a populated column, TRUNCATE, DELETE with no WHERE, narrowing type change |
Critical |
| 7 | Unsafe default | ADD COLUMN ... NOT NULL with no DEFAULT on a populated table, narrowing a varchar length |
Critical |
| 8 | Index-missing FK | ADD CONSTRAINT ... FOREIGN KEY (col) with no index on col |
Warning |
A statement can land in more than one category. DROP COLUMN on a
populated column is both Breaking (category 5) and Data-loss (category 6);
report it once at the higher severity and name both categories.
Severity rationale
Severity is not a feeling. Each band is anchored to a concrete consequence:
- Critical: the statement can take production down, destroy data that no backup step precedes, or break a live consumer with no coordination window. A Critical statement needs a plan, not a nit.
- Warning: measurable downtime or a performance regression that a team-side mitigation (off-peak scheduling, a concurrent variant, an index added first) can remove. The statement is correct; the timing is not.
- Info: the operation is safe at the sizes in play. Reported for completeness so the reader can see the classification was applied to every statement, not just the alarming ones.
Anything that only becomes Critical above some table size is a Warning until a size signal exists. Say so in the finding rather than inflating.
Step 4 - Apply the five engine hazard checks
These are the checks that decide whether a category-3 or category-4 statement is a Warning or a Critical.
Check 1 - Index build without the concurrent variant (PostgreSQL)
A plain CREATE INDEX takes a SHARE lock: "Other transactions can still
read the table, but if they try to insert, update, or delete rows in the
Установить migration-operation-taxonomy в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл migration-operation-taxonomy?
Use for any question about whether a database migration is safe to run in production, including quick ones (is adding a NOT NULL column to a big Postgres table safe?) and after a migration locked a table: rename or drop a column, add a default, index or foreign key, change a type on a large PostgreSQL or MySQL table. Classifies each statement (additive, locking, breaking, data-loss) by lock and rewrite.
Как установить скилл migration-operation-taxonomy?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл migration-operation-taxonomy запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic