Data Model & DB Design Review

Data Model & DB Design Review is a skill for Claude Code from s977043/river-review. It costs 28 tokens per session (1,301 once invoked), scanned A, original, MIT.

A review guide for database schemas and data models that checks rules, indexes, migrations, rollback plans, and day-to-day operating concerns.

In plain words
What is it for?
Use it when reviewing table definitions, constraints, indexes, entity diagrams, or database migration plans.
Why use it?
It helps catch inconsistent data, slow access, unsafe changes, and database updates that cannot be safely undone.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the river-review plugin — 138 skills, 18 commands, 5 agents, 3 hooks shipped together

Good fit Use it when reviewing table definitions, constraints, indexes, entity diagrams, or database migration plans.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/s977043/river-review/data-model-db-design
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 s977043/river-review --skill data-model-db-design
Clone the repo
git clone --depth 1 https://github.com/s977043/river-review

Made for: Claude Code.

Or install river-review, the plugin that ships this one along with the rest of its 138 skills, 18 commands, 5 agents, 3 hooks.

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 Data Model & DB Design Review

README.md
[![agentmods](https://agentmods.dev/badge/skills/s977043/river-review/data-model-db-design/github.svg)](https://agentmods.dev/skills/s977043/river-review/data-model-db-design)
Your own site
<a href="https://agentmods.dev/skills/s977043/river-review/data-model-db-design"><img src="https://agentmods.dev/badge/skills/s977043/river-review/data-model-db-design/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 Data Model & DB Design Review

Your own site · 80×15
<a href="https://agentmods.dev/skills/s977043/river-review/data-model-db-design"><img src="https://agentmods.dev/badge/skills/s977043/river-review/data-model-db-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,301 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.
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.00028 $0.01301
Opus 5 $0.00014 $0.00651
Sonnet 5 $0.00006 $0.00260
Haiku 4.5 $0.00003 $0.00130

Measured 6d ago against content hash e8b6e0ceeb44, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

Data Model & DB Design Review 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.

skills/upstream/data-model-db-design/SKILL.md · 97 lines

What it actually says

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)レビューへ返す。
Files

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.

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. 6d ago First seen · 97 lines · 28 tokens per session scan A e8b6e0ceeb44

Subscribe to this mod's changes

Data Model & DB Design Review is a skill published in the GitHub repository s977043/river-review (3 stars, last pushed today), licensed MIT. It adds 28 tokens to every session and 1,301 once invoked, about $0.0001 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.

Related

Other skills, from other repositories

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…

avelikiy/great_cto · 133 tokens

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…

hyhmrright/logic-lens · 180 tokens

ia-postgresql

PostgreSQL schema design, query optimization, indexing, and administration. Use when working with PostgreSQL, JSONB, partitioning, RLS, CTEs, window functions, or EXPLAIN ANALYZE.

iliaal/whetstone · 49 tokens

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.…

greglas75/zuvo · 115 tokens

relational-database-design

Designs or reviews a relational database schema for a given domain. Covers table structure, normalization, indexes, constraints, and migration strategy. Invoked when the user asks to design a schema, review a database structure, or optimize a data model.

soulcodex/agentic · 55 tokens

ops

Deploys, schema migrations, rollback and infrastructure. Use when "can I ship this on Friday", "this migration is scary", "what is the blast radius", "prevent accidental deletion of the database", or a change drops a column. Covers expand/contract, canary rollout, kill switches, preventdestroy, tested backups. For an…

rainmanjam/poka-yoke · 77 tokens