data-integrity

A read-only database audit agent that checks the actual stored data for broken relationships, incomplete records, stuck processing states, and tenant-isolation problems. It reports healthy areas, gaps, critical findings, examples, possible causes, and severity.

In plain words
What is it for?
Auditing production records for incomplete enrichment, orphaned references, stale state-machine rows, cross-tenant data leaks, and writes that appeared successful but were not saved.
Why use it?
It catches data problems that may remain hidden even when the code, tests, and visible user experience appear correct.

Agent

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/vindm/dotclaude/data-integrity
Clone the repo
git clone --depth 1 https://github.com/vindm/dotclaude
Per session 74 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,478 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.00074 $0.01478
Opus 5 $0.00037 $0.00739
Sonnet 5 $0.00015 $0.00296
Haiku 4.5 $0.00007 $0.00148

Measured yesterday against content hash 40e11f65af95, 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 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 yesterday.

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.

deferred/agents/data-integrity.md · 76 lines

How it starts

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

You catch the bugs where the code is correct and the data is wrong — latent corruption, drift, and orphans that accumulate over time in the actual production store. These don't surface in code review (the diff is fine), in unit tests (the test data is clean), or in user testing (the affected user doesn't notice, or quietly stops using a feature). They surface in a periodic data audit — or in a support ticket six months later. The classes you find: stuck-job orphans (a multi-stage pipeline row sitting at stage 3 with stage 4's marker missing), incomplete enrichment (records that should have N populated fields and have N−1 because a downstream step failed silently), orphaned references (a child row pointing at a deleted parent), cross-tenant leaks (a row owned by one tenant readable by another), stale state-machine markers (an "in-progress" row whose started_at is months old and nothing reaps it), and silent no-op writes (a write that returned success-shaped but never persisted — the audit catches the resulting absence).

Discover the project's DB access at runtime — FIRST

Before any query, determine how this project reaches its store, and use the cheapest path with explicit row caps:

  • Look for a connection string or DB config in the environment, the manifest, or config files (a psql-style URL, a database config block, an ORM connection).
  • Prefer the project's own DB CLI run via Bash — a psql-style client, the project's migration/query tool, or an ORM-backed script. Run read-only queries with explicit LIMIT bounds. Avoid any path that dumps large unbounded JSON.
  • Read the schema from migration files / schema definitions to learn the actual table and column names, which tables have pipelines or state machines, and how tenancy is enforced (row-level policies, query-time filtering, separate databases). Every query you run uses THIS project's real schema — never a query copied from elsewhere that references tables this project doesn't have.

If you cannot find a working DB access method, say so plainly and fall back to auditing what the schema/migration files reveal statically rather than guessing.

Read the full file on GitHub · 76 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. yesterday First seen · 76 lines · 74 tokens per session scan A 40e11f65af95

Subscribe to this mod's changes

data-integrity is an agent published in the GitHub repository vindm/dotclaude (1 stars, last pushed 4d ago), licensed MIT. It adds 74 tokens to every session and 1,478 once invoked, about $0.0004 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

coder-reviewer

Use this agent for code quality review of completed implementations — assessing maintainability, performance, test coverage, and standards compliance as the final quality gate before security review. For example: reviewing a finished frontend/backend feature and producing prioritized findings…

wesammustafa/Claude-Code-Everything-You-Need-to-Know · 66 tokens

frontend-engineer

Use this agent to implement user-facing features — transforming UX designs and technical specifications into responsive, accessible, high-performance user interfaces with API integration and tests. Delegate frontend build work such as UI components, styling, client-side state and data handling, or web performance…

wesammustafa/Claude-Code-Everything-You-Need-to-Know · 57 tokens

ux-designer

Use this agent for UX and UI design work — user research, journey maps, wireframes, interactive prototypes, design systems, and WCAG-compliant design specifications ready for development handoff. Delegate when designs need to be created or validated before technical architecture and implementation begin.

wesammustafa/Claude-Code-Everything-You-Need-to-Know · 58 tokens

tech-lead-architect

Use this agent for technical architecture design, technology stack decisions, and system design specifications — engage after UX/design requirements are established but before detailed implementation begins. For example: planning the architecture for an event management dashboard from completed UX designs, choosing…

wesammustafa/Claude-Code-Everything-You-Need-to-Know · 74 tokens

project-manager

Use this agent for comprehensive project planning, cross-functional team coordination, progress tracking, and delivery management of development initiatives. For example: planning a 6-week user authentication project across a UX designer, backend developer, and QA tester, or regaining control of a project facing…

wesammustafa/Claude-Code-Everything-You-Need-to-Know · 62 tokens

refactor-expert

Code refactoring specialist focused on clean architecture, SOLID principles, and technical debt reduction. Use proactively for code quality improvements and architectural refactoring.

alirezarezvani/claude-code-tresor · 34 tokens