data-integrity-reviewer

data-integrity-reviewer is an agent for coding agents from slbug/claude-ruby-grape-rails. It costs 32 tokens per session (1,686 once invoked), scanned A, original, MIT.

A reviewer for database models, migrations, and transactions in Ruby applications using Active Record or Sequel.

In plain words
What is it for?
Use it to check database constraints, transaction boundaries, concurrent indexes, validation gaps, and whether migrations can be safely rolled back.
Why use it?
It finds risks that can cause invalid, duplicated, partial, or irreversible data changes.

Agent

Part of the ruby-grape-rails plugin — 23 skills, 19 agents, 17 hooks shipped together

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.

agentmods
npx agentmods add agents/slbug/claude-ruby-grape-rails/data-integrity-reviewer
Clone the repo
git clone --depth 1 https://github.com/slbug/claude-ruby-grape-rails

Or install ruby-grape-rails, the plugin that ships this one along with the rest of its 23 skills, 19 agents, 17 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-integrity-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/slbug/claude-ruby-grape-rails/data-integrity-reviewer.svg)](https://agentmods.dev/agents/slbug/claude-ruby-grape-rails/data-integrity-reviewer)
Your own site
<a href="https://agentmods.dev/agents/slbug/claude-ruby-grape-rails/data-integrity-reviewer"><img src="https://agentmods.dev/badge/agents/slbug/claude-ruby-grape-rails/data-integrity-reviewer.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,686 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00032 $0.01686
Opus 5 $0.00016 $0.00843
Sonnet 5 $0.00006 $0.00337
Haiku 4.5 $0.00003 $0.00169

Measured 4d ago against content hash 8f7b863cdee3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

data-integrity-reviewer 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 4d 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.

plugins/ruby-grape-rails/agents/data-integrity-reviewer.md · 252 lines

How it starts

The opening of the file, as written. The whole thing — 252 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Data Integrity Reviewer

Check for:

  1. Missing database constraints - foreign keys, uniqueness, check constraints
  2. Transaction boundaries - operations that should be atomic
  3. Partial index safety - concurrent operations
  4. Data validation gaps - model validates but DB doesn't enforce
  5. Rollback safety - data changes that can't be undone

Findings File Is Primary Output

Your calling skill body reads findings from the exact file path given in the prompt (e.g., .claude/reviews/data-integrity-reviewer/{review-slug}-{datesuffix}.md). The file IS the real output — your chat response body should be ≤300 words.

Turn budget rules:

  1. One Write per artifact path.
  2. Complete analysis by turn ~45.
  3. Then Write once.
  4. After Write: return summary, no new analysis.
  5. If the prompt does NOT include an output path, default to .claude/reviews/data-integrity-reviewer/{review-slug}-{datesuffix}.md.

You have Write for your own report ONLY. Edit and NotebookEdit are disallowed — you cannot modify source code.

Counts (mandatory prefix)

Findings file MUST start with a Counts line (first content after frontmatter). Examples:

  • **Counts:** 3 findings (1 Blocker, 2 Warnings, 0 Suggestions) — 1 note
  • **Counts:** 1 finding (0 Blockers, 1 Warning, 0 Suggestions) — 0 notes
  • **Counts:** 0 findings — All clean.

Rule: each count uses singular form only when its value is exactly 1, plural otherwise (including 0). Consolidator parses for severity bucket totals.

Review Checklist

Missing Foreign Key Constraints

# Model has association but no DB constraint
class Order < ApplicationRecord
  belongs_to :user  # Enforced by Rails, not DB
end

# Migration - missing foreign key
class AddUserToOrders < ActiveRecord::Migration[8.0]
  def change
    add_column :orders, :user_id, :bigint
    add_index :orders, :user_id
    # Missing: add_foreign_key :orders, :users
  end
end

# SHOULD BE:
class AddUserToOrders < ActiveRecord::Migration[8.0]
  def change
    add_reference :orders, :user, null: false, foreign_key: true
  end
end

Read the full file on GitHub · 252 lines

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. 4d ago First seen · 252 lines · 32 tokens per session scan A 8f7b863cdee3

Subscribe to this mod's changes

data-integrity-reviewer is an agent published in the GitHub repository slbug/claude-ruby-grape-rails (7 stars, last pushed 5d ago), licensed MIT. It adds 32 tokens to every session and 1,686 once invoked, about $0.0002 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-08-31.

Related

Other agents, from other repositories