ia-database-guardian

ia-database-guardian is an agent for Claude Code from iliaal/whetstone. It costs 69 tokens per session (3,089 once invoked), scanned A, original, MIT.

A database review agent that checks schemas, constraints, migrations, data mappings, and persistent-data changes for safety. A migration is a change to a database's structure or stored data.

In plain words
What is it for?
Use it to review database migrations, models, ID conversions, enum changes, backfills, constraints, transaction boundaries, and data-privacy handling.
Why use it?
It helps catch changes that could corrupt data, break production assumptions, or leave privacy-related copies without deletion or export paths.

Agent for Claude Code

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

Part of the whetstone plugin — 29 skills, 19 commands, 18 agents, 4 hooks, 1 MCP server shipped together

Good fit Use it to review database migrations, models, ID conversions, enum changes, backfills, constraints, transaction boundaries, and data-privacy handling.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/iliaal/whetstone/ia-database-guardian
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/iliaal/whetstone

Made for: Claude Code.

Or install whetstone, the plugin that ships this one along with the rest of its 29 skills, 19 commands, 18 agents, 4 hooks, 1 MCP server.

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 ia-database-guardian

README.md
[![agentmods](https://agentmods.dev/badge/agents/iliaal/whetstone/ia-database-guardian/github.svg)](https://agentmods.dev/agents/iliaal/whetstone/ia-database-guardian)
Your own site
<a href="https://agentmods.dev/agents/iliaal/whetstone/ia-database-guardian"><img src="https://agentmods.dev/badge/agents/iliaal/whetstone/ia-database-guardian/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 ia-database-guardian

Your own site · 80×15
<a href="https://agentmods.dev/agents/iliaal/whetstone/ia-database-guardian"><img src="https://agentmods.dev/badge/agents/iliaal/whetstone/ia-database-guardian.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,089 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.00069 $0.03089
Opus 5.5 $0.00028 $0.01236
Sonnet 5.5 $0.00014 $0.00618
Haiku 4.5 $0.00007 $0.00309

Measured 3d ago against content hash 7d553d502485, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ia-database-guardian 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 3d 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/whetstone/agents/ia-database-guardian.md · 217 lines

How it starts

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

Protect data integrity, ensure migration safety, validate migration code against production reality, and check that the schema supports the data-privacy obligations it is subject to (GDPR, CCPA): classification, retention, and a deletion and export path that reaches every copy. Process-level privacy compliance (consent capture, DPAs, vendor sharing) is out of scope; see Phase 1 section 6.

Boundary vs ia-postgresql: Postgres-specific query shape, index selection, and type choices (JSONB, arrays, enums, range types) defer to the ia-postgresql skill. This agent is the migration-safety review gate for PRs: reversibility, locking, backfill correctness, ID-mapping fidelity, and constraint integrity, independent of engine.


Phase 1: Schema & Constraints Review

Review the structural rules that protect data. Focus on schema design, constraints, transaction boundaries, and privacy compliance.

Read the full file on GitHub · 217 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. 3d ago Changed · +1 lines 7d553d502485
  2. 19d ago Changed d023ac69027d
  3. 29d ago Changed 2648b6ef74ee
  4. 1mo ago Changed · +2 lines · +28 tokens per session 37b0f3d43372
  5. 1mo ago Changed · -1 lines 6bd9bfc16d13
  6. 1mo ago First seen · 215 lines · 41 tokens per session scan A 5879716e1e69

Subscribe to this mod's changes

ia-database-guardian is an agent published in the GitHub repository iliaal/whetstone (35 stars, last pushed yesterday), licensed MIT. It adds 69 tokens to every session and 3,089 once invoked, about $0.0003 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

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

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

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