Skip to content
cccskills
FreePublished on GitHub

Data Model & DB Design Review

Ensure data model/DB designs cover constraints, integrity, indexes, migrations, rollback, and operational impacts.

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

See how to install

Files included (3)

  • SKILL.md4.3 KB
  • fixtures/01-missing-constraints-and-backfill-should-detect.md4.5 KB
  • fixtures/02-constraints-agreed-in-adr-should-not-detect.md3.3 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Pattern declaration

Primary pattern: Reviewer Secondary patterns: Inversion Why: データモデル・DB設計の制約・移行・運用リスクをチェックリスト型で評価し、整合性崩れや移行事故を防ぐ

Goal / 目的

  • データモデル/DB 設計の差分から、整合性崩れ・移行事故・性能劣化・運用不能につながる抜けを早期に潰す。

Non-goals / 扱わないこと

  • DB 製品や ORM の選定そのもの(ただし前提が必要なら追記を促す)。
  • 実装クエリの最適化(設計の制約/インデックス方針の確認に限定)。

Pre-execution Gate / 実行前ゲート

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

  • 差分にデータモデル/DB設計に関わるファイル(スキーマ定義/マイグレーション/ERD/設計書)の変更がある
  • 差分にテーブル定義・制約・インデックス・マイグレーション手順に関わる記述の追加または変更がある
  • inputContextにdiffが含まれている

ゲート不成立時の出力: NO_REVIEW: data-model-db-design — データモデル・DB設計に関わる変更が検出されない

False-positive guards / 抑制条件

  • 既に別 ADR/設計で合意済みの制約を参照しているだけなら、重複指摘しない(参照先が明確な場合)。

Rule / ルール

  • 先頭に要約を 1 行出す(新規/変更テーブル、互換性、移行の要点)。
  • 指摘は最大 8 件まで。不可逆変更/データ損失/整合性破壊/ダウンタイムリスクを優先。
  • “追記テンプレ(設計に貼れる形)” を付ける。

Checklist / 観点チェックリスト

  • 整合性と制約
    • 主キー/外部キー/ユニーク制約/NOT NULL が要件に合っているか。
    • 参照整合性(ON DELETE/UPDATE)と業務ルールの整合があるか。
    • 多重更新/競合(楽観/悲観ロック)をどう扱うかが設計にあるか。
  • 性能とインデックス
    • 代表クエリのアクセスパス(検索条件/ソート)とインデックス方針があるか。
    • 高頻度更新列へのインデックス乱用や肥大化のリスクが考慮されているか。
  • 移行とロールバック
    • 既存データの backfill、段階移行(両対応期間)の計画があるか。
    • ロールバック条件/手順、不可逆操作(DROP/データ削除)の扱いがあるか。
  • 運用
    • 容量増加、アーカイブ、監査(更新履歴)などの要求があるか。
    • バッチ/バックグラウンド処理の負荷と実行時間帯の前提があるか。

Output / 出力フォーマット

すべて日本語。<file>:<line>: <message> 形式で出力する。

  • 先頭に要約を 1 行: (summary):1: <変更テーブル/互換性/移行の要点>
  • 以降は指摘(最大 8 件):
    • <message> に [severity=critical|major|minor|info] を含める。
    • 可能なら “追記テンプレ” を 1 行付ける。

追記テンプレ例:

  • 制約: <NOT NULL/UNIQUE/FK> / 理由: <業務ルール> / 例外: <許容する欠損>
  • 移行: 1) 列追加, 2) 並行書き込み, 3) backfill, 4) 切替, 5) 旧列削除

評価指標(Evaluation)

  • 合格基準: 差分に紐づく制約/移行/運用の抜けが優先度付きで指摘され、追記案がある。
  • 不合格基準: 実装前提の断定、差分と無関係な一般論、指摘過多。

人間に返す条件(Human Handoff)

  • 不可逆な移行や大規模 backfill が必要な場合は人間(DB/SRE)レビューへ返す。

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 23, 2026

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

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

s977043/river-review7Updated Oct 23, 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 23, 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 23, 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 23, 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 23, 2026

See all skills by s977043

Report a problem with this skill