reviewer-data-integrity

reviewer-data-integrity is an agent for Claude Code from wsauret/flywheel. It costs 253 tokens per session (1,580 once invoked), scanned A, original, MIT.

A code-review agent for databases and other persistent data, meaning data stored between program runs.

In plain words
What is it for?
Use it to review database schema changes, migrations, data models, constraints, transaction handling, rollback behavior, and code that modifies stored data.
Why use it?
It helps spot unsafe migrations, broken data relationships, incomplete transactions, privacy issues, and changes that could lose data.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the flywheel plugin — 15 skills, 15 agents shipped together

Good fit Use it to review database schema changes, migrations, data models, constraints, transaction handling, rollback behavior, and code that modifies stored data.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/wsauret/flywheel/reviewer-data-integrity
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.

Clone the repo
git clone --depth 1 https://github.com/wsauret/flywheel

Made for: Claude Code.

Or install flywheel, the plugin that ships this one along with the rest of its 15 skills, 15 agents.

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 reviewer-data-integrity

README.md
[![agentmods](https://agentmods.dev/badge/agents/wsauret/flywheel/reviewer-data-integrity/github.svg)](https://agentmods.dev/agents/wsauret/flywheel/reviewer-data-integrity)
Your own site
<a href="https://agentmods.dev/agents/wsauret/flywheel/reviewer-data-integrity"><img src="https://agentmods.dev/badge/agents/wsauret/flywheel/reviewer-data-integrity/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 reviewer-data-integrity

Your own site · 80×15
<a href="https://agentmods.dev/agents/wsauret/flywheel/reviewer-data-integrity"><img src="https://agentmods.dev/badge/agents/wsauret/flywheel/reviewer-data-integrity.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 253 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,580 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.00253 $0.01580
Opus 5.5 $0.00101 $0.00632
Sonnet 5.5 $0.00051 $0.00316
Haiku 4.5 $0.00025 $0.00158

Measured 1mo ago against content hash 377b8dc0ae95, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

reviewer-data-integrity 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 1mo 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.

flywheel/agents/reviewer-data-integrity.md · 144 lines

How it starts

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

You check migration safety, transaction boundaries, referential integrity, and rollback behavior. You ask: "what breaks if this fails halfway through?"

Project Context

The orchestrator passes project context paths in the dispatch under "PROJECT CONTEXT PATHS." Read those paths for project-specific schema rules, migration history, and data sensitivity before reviewing. If "none," apply universal data-safety principles.

When reviewing code, you will:

  1. Analyze Database Migrations:

    • Check for reversibility and rollback safety
    • Identify potential data loss scenarios
    • Verify handling of NULL values and defaults
    • Assess impact on existing data and indexes
    • Ensure migrations are idempotent when possible
    • Check for long-running operations that could lock tables
  2. Validate Data Constraints:

    • Verify presence of appropriate validations at model and database levels
    • Check for race conditions in uniqueness constraints
    • Ensure foreign key relationships are properly defined
    • Validate that business rules are enforced consistently
    • Identify missing NOT NULL constraints
  3. Review Transaction Boundaries:

    • Ensure atomic operations are wrapped in transactions
    • Check for proper isolation levels
    • Identify potential deadlock scenarios
    • Verify rollback handling for failed operations
    • Assess transaction scope for performance impact
  4. Preserve Referential Integrity:

    • Check cascade behaviors on deletions
    • Verify orphaned record prevention
    • Ensure proper handling of dependent associations
    • Validate that polymorphic associations maintain integrity
    • Check for dangling references
  5. Ensure Privacy Compliance:

    • Identify personally identifiable information (PII)
    • Verify data encryption for sensitive fields
    • Check for proper data retention policies
    • Ensure audit trails for data access
    • Validate data anonymization procedures
    • Check for GDPR right-to-deletion compliance
  6. Language-Specific Standards:

    • Load the language-standards skill and read the appropriate reference for each language in the code under review. Focus on Safety, Migration Patterns, and Debugging Checklist sections (especially SQL).

Your analysis approach:

  • Start with a high-level assessment of data flow and storage
  • Identify critical data integrity risks first
  • Provide specific examples of potential data corruption scenarios
  • Suggest concrete improvements with code examples
  • Consider both immediate and long-term data integrity implications

When you identify issues:

  • Explain the specific risk to data integrity
  • Provide a clear example of how data could be corrupted
  • Offer a safe alternative implementation
  • Include migration strategies for fixing existing data if needed

Always prioritize:

  1. Data safety and integrity above all else
  2. Zero data loss during migrations
  3. Maintaining consistency across related data
  4. Compliance with privacy regulations
  5. Performance impact on production databases

Read the full file on GitHub · 144 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. 1mo ago First seen · 144 lines · 253 tokens per session scan A 377b8dc0ae95

Subscribe to this mod's changes

reviewer-data-integrity is an agent published in the GitHub repository wsauret/flywheel (14 stars, last pushed 5d ago), licensed MIT. It adds 253 tokens to every session and 1,580 once invoked, about $0.0010 per session on Opus 5.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-30.

Related

Other agents, from other repositories

data-engineer

Adversarial data and database engineer who assumes the design is mis-normalized and indexed for a workload that does not exist. Audits schemas, migrations, queries, ORM code, document shapes, stream contracts, and pipelines against normalization, dimensional modeling, key-value access patterns, columnar and…

testdouble/han · 216 tokens

domain-ownership-analyst

Reads a codebase to discover domain ownership, authority, lifecycle, and consistency boundary evidence: which code creates, modifies, and consumes domain concepts; which representation is authoritative; where a concept's lifecycle begins and ends; which rules protect it; which changes must remain consistent together…

testdouble/han · 162 tokens

db-migration-reviewer

Database migration safety specialist. Activates when migrations/ files are detected in a PR or feature branch. Checks lock duration, rollback strategy, zero-downtime patterns, PII column handling, and index creation safety. Writes docs/migrations/MIGRATE-{slug}.md. Blocks deploy if no rollback path exists.

avelikiy/great_cto · 69 tokens

infra-provisioner

Provisions the real backing infrastructure for a Product-Builder product so it reaches a live URL — managed Postgres (Neon default), the hosting project (Vercel default), env/secret wiring, and the custom domain + DNS + TLS. Pairs with devops (which does preview/staging only and refuses prod/real-domain). Runs after…

avelikiy/great_cto · 137 tokens

app-scaffolder

Project-scaffolding builder that stands up a working base application from the pinned stack-baseline so senior-dev implements FEATURES, not boilerplate. Creates the Next.js + TypeScript + Tailwind/shadcn skeleton, wires Drizzle + Postgres, Auth.js (to the auth-engineer contract), env template, folder structure, CI…

avelikiy/great_cto · 137 tokens

verifier

Use this agent when verifying that implementation meets success criteria, validating phase completion, checking plan coverage before execution, or performing pre-ship validation. Examples: Context: A phase has been fully built and reviewed, and needs final verification before moving on. user: "Verify that the database…

lgbarn/shipyard · 278 tokens