Skip to content
cccskills
FreePublished on GitHub

Laravel Migration Safety Review

Reviews Laravel migrations for destructive operations, change() dropping modifiers, locking index creation on large tables (PostgreSQL), and asymmetric down().

The English summary is being prepared. Showing the original description.

Works withPostgreSQL

Run score Not tested

See how to install

Files included (4)

  • SKILL.md3.3 KB
  • fixtures/01-change-drops-modifiers-happy.md1.0 KB
  • fixtures/02-create-table-index-guard.md1023 B
  • golden/01-change-drops-modifiers-happy.md735 B

SKILL.md (original)

Review the instructions the agent will receive before you install.

Pattern declaration

Primary pattern: Reviewer Secondary patterns: Inversion Why: migration の破壊的・ロック誘発操作をチェックリスト型で検査する

Goal / 目的

  • change() による修飾子の意図しない消失(公式: 保持したい修飾子をすべて再指定しないと消える)を検出する。
  • 破壊的操作(dropColumn 等)と、大規模テーブルでのロック誘発 index 追加を検出する。

Non-goals / 扱わないこと

  • データモデル設計の妥当性(data-model-db-design のスコープ)。
  • アプリ側クエリ効率(laravel-eloquent-nplus1 のスコープ)。

Pre-execution Gate / 実行前ゲート

このスキルは以下の条件がすべて満たされない限りNO_REVIEWを返す。

  • 差分に database/migrations/ 配下の追加変更が含まれている
  • diff コンテキストが利用可能である

ゲート不成立時の出力: NO_REVIEW: laravel-migration-safety — migration の変更なし

False-positive guards / 抑制条件

  • 新規テーブル作成(Schema::create)内の index 追加はロック問題がないため指摘しない。
  • down() の非対称は、データ変換系 migration で完全な逆操作が不可能なケースが正当(コメントで明示があれば許容)。
  • dropColumn が「別 PR で deprecate 済みカラムの計画的削除」と明示されている場合は指摘しない。

Rule / ルール

  • change() 時は保持したい修飾子(unsigned / default / comment / nullable 等)をすべて再指定する。
  • dropColumn / Schema::drop 等の破壊的操作は影響とロールバック不能性を確認する(本番 --force 実行に注意)。
  • PostgreSQL の大規模テーブルへの index 追加は ->online()(CREATE INDEX CONCURRENTLY)を検討する。併せてトランザクション外実行が必要な副作用も指摘する。
  • down() は up() の逆操作として整合させる。

Evidence / 根拠の取り方

  • 指摘は <file>:<line> で差分に紐づけ、公式規約(laravel.com/docs/12.x/migrations#modifying-columns 等)を 1 行で添える。
  • テーブル規模が diff から不明な場合は online() 提案を断定せず questions で返す。

Output / 出力(短文版の推奨)

コメントは日本語で返す。

  • Finding: 修飾子消失 / 破壊的操作 / ロック誘発のどれか(1文)
  • Impact: データ損失 / 本番ロック / ロールバック不能
  • Fix: 修飾子の再指定 / online() / down() 整合の最小案

Sources / 出典

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

<What this skill does>

The English summary is being prepared. Showing the original description.

s977043/river-review7Updated Oct 24, 2026

画像・ボタン・フォーム要素に適切なアクセシブルネームがあるか確認する。

The English summary is being prepared. Showing the original description.

s977043/river-review7Updated Oct 24, 2026

Ensure ADRs capture context, decision, alternatives, tradeoffs, and follow-ups in a way that prevents future drift.

The English summary is being prepared. Showing the original description.

s977043/river-review7Updated Oct 24, 2026

敵対的分析手法を統合したレビューの entry skill。認知バイアス対策の3手法 (Pre-mortem / War Game / Logic Torturing)と、宣言・主張と実態の乖離を突く claim-vs-actual 検出3パターン(Self-Contradiction / Refactor-Claim Audit / Cross-File Leakage)へルーティングし、通常のレビューでは見えない設計の盲点・ 防御の穴・論理の弱点・宣言と実装のズレを可視化する。

The English summary is being prepared. Showing the original description.

s977043/river-review7Updated Oct 24, 2026

Review changes to the Agent Skills import/export bridge for path safety, round-trip fidelity, and validation correctness.

The English summary is being prepared. Showing the original description.

s977043/river-review7Updated Oct 24, 2026

Checks whether AI-assisted work defines review criteria, accessible context, explicit review loop, human judgment boundary, and feedback capture before delegating to an agent.

The English summary is being prepared. Showing the original description.

s977043/river-review7Updated Oct 24, 2026

See all skills by s977043

Report a problem with this skill