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.
npx skills add s977043/river-review --skill migration-safetygit clone --depth 1 https://github.com/s977043/river-reviewWrote 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.
[](https://agentmods.dev/skills/s977043/river-review/migration-safety)<a href="https://agentmods.dev/skills/s977043/river-review/migration-safety"><img src="https://agentmods.dev/badge/skills/s977043/river-review/migration-safety/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.
<a href="https://agentmods.dev/skills/s977043/river-review/migration-safety"><img src="https://agentmods.dev/badge/skills/s977043/river-review/migration-safety.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00089 | $0.01550 |
| Opus 5 | $0.00044 | $0.00775 |
| Sonnet 5 | $0.00018 | $0.00310 |
| Haiku 4.5 | $0.00009 | $0.00155 |
Grade A, and why
Migration Safety Review (framework-agnostic) 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 6d 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.
How it starts
The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Pattern declaration
Primary pattern: Reviewer Secondary patterns: Inversion Why: 移行の破壊的・ロック誘発・不可逆操作をチェックリスト型で検査するが、移行を含まない差分では実行を止めるゲートが必要。
Goal / 目的
- ORM やフレームワークに依存せず、スキーマ/データ移行に共通する運用事故(データ損失・本番ロック・ロールバック不能・反復不能)を検出する。
- 特定フレームワーク固有の深い規約(例: Laravel
change()の修飾子消失)は専用 skill に委ね、本 skill は横断的な安全性に集中する。
Non-goals / 扱わないこと
- データモデル設計の妥当性(正規化・関連設計)は
data-model-db-designのスコープ。 - フレームワーク固有の細則(Laravel 固有は
laravel-migration-safety)。 - アプリ側のクエリ効率(N+1 等)。
Pre-execution Gate / 実行前ゲート
このスキルは以下の条件がすべて満たされない限り NO_REVIEW を返す。
- 差分にスキーマ/データ移行(migrations ディレクトリ・
schema.prisma・*.sql・ALTER/CREATE/DROPを含む変更)が含まれている - diff コンテキストが利用可能である
ゲート不成立時の出力: NO_REVIEW: migration-safety — 移行の変更なし
False-positive guards / 抑制条件
- 新規テーブル作成内の index/制約追加は既存行へのロックが無いため指摘しない。
- 不可逆な down/rollback は、データ変換系移行で完全な逆操作が原理的に不可能なケースが正当(コメントで明示があれば許容)。
- 破壊的操作が「別 PR で deprecate 済み/expand-contract の contract フェーズ」と明示されている場合は指摘しない。
- 小規模テーブルが diff/文脈から確実な場合はロック懸念を断定しない(
questionsで確認)。
Rule / ルール
横断的に以下を確認する(該当するもののみ):
- 破壊的スキーマ変更: カラム/テーブル/制約の DROP、型の縮小変換(例:
text→varchar(n))、リネームは、データ損失と後方互換を確認する。 - ロック誘発: 大規模テーブルへの index 追加・
ALTER TABLE・NOT NULL追加は本番でロック/長時間化し得る。PostgreSQL ならCREATE INDEX CONCURRENTLY、MySQL なら online DDL / pt-osc 等の非ロック手段を検討する。 - NOT NULL + default 無し: 既存行があるテーブルへ default 無しの NOT NULL カラム追加は失敗/全行書込みになる。default 付与または backfill 後に制約化(expand-contract)を推奨。
- backfill 安全性: 大量 UPDATE/INSERT はバッチ分割・タイムアウト・レプリケーション遅延を考慮する。1 トランザクションでの巨大更新を避ける。
- ロールバック可逆性: down/rollback が up の逆操作として整合し、データを失わず戻せるか。不可逆なら明示する。
- 段階適用(expand-contract): 破壊的変更はコードのデプロイと移行の順序(expand→migrate→contract)で無停止化できないか。
Evidence / 根拠の取り方
- 指摘は
<file>:<line>で差分に紐づけ、検出した操作(DROP / ALTER / NOT NULL / 大量 backfill 等)を引用する。 - テーブル規模が diff から不明な場合は断定せず
questionsで確認する。 - フレームワーク固有 API には触れず、移行操作の意味(ロック/損失/不可逆)で説明する。
Output / 出力(短文版の推奨)
コメントは日本語で返す。
(migration-safety):1: [要約] 最も危険な移行操作は〈1文〉
<file>:<line>: [移行リスク] <タイトル>
操作: <DROP / ALTER / NOT NULL 追加 / 大量 backfill / 不可逆 down>
影響: <データ損失 / 本番ロック / ロールバック不能 / 反復不能>
Fix: <CONCURRENTLY / default 付与 + backfill / expand-contract / down 整合 の最小案>
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 6d ago First seen · 93 lines · 89 tokens per session scan A 37b22848753e
Migration Safety Review (framework-agnostic) is a skill published in the GitHub repository s977043/river-review (3 stars, last pushed yesterday), licensed MIT. It adds 89 tokens to every session and 1,550 once invoked, about $0.0004 per session on Opus 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-09-03.
Other skills, from other repositories
Database Migration Testing
Testing database migration scripts for correctness, rollback safety, data integrity, and zero-downtime migration patterns.
database-migration-assistant
PostgreSQL migration assistant that plans, applies, and rolls back schema changes with drift detection for safe AI-agent execution.
migration-ready-schema
Data-model rules that make a schema importable from day one, so the migration-import-engineer is never blocked on missing columns. Every SMB Product-Builder product must let a customer bring their data from an incumbent (ServiceTitan/Toast/Mindbody/Shopify) — that requires provenance (sourceref) and rollback…
logic-health
Sweep a directory, module, or full codebase for logic correctness and produce a scored health dashboard with systemic patterns. Trigger when the user requests a health view — "audit the whole codebase", "health check", "health overview", "logic health overview", "audit src/", "audit auth and payments modules", "where…
ia-postgresql
PostgreSQL schema design, query optimization, indexing, and administration. Use when working with PostgreSQL, JSONB, partitioning, RLS, CTEs, window functions, or EXPLAIN ANALYZE.
db-audit
Database performance and safety audit. 70+ checks across 13 dimensions (DB1-DB13): query patterns, indexes, schema design, connections, transactions, migrations, caching, query optimization, ORM anti-patterns, observability, data lifecycle, DB security, and migration deployment safety. Code-level checks for all ORMs.…