schema-integrity-auditor

schema-integrity-auditor is an agent for Claude Code from Hainrixz/claude-db. It costs 65 tokens per session (1,192 once invoked), scanned A, original, MIT.

A read-only checker for the structure and safety of relational database schemas, which define tables and their relationships.

In plain words
What is it for?
It reviews keys, relationships, data types, constraints, defaults, naming, history, tenant separation, and database access rules during an audit.
Why use it?
It helps find design problems that can cause inconsistent, confusing, or insecure data before the database changes are made.

Agent for Claude Code

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

Part of the claude-db plugin — 36 skills, 6 agents, 1 hook shipped together

Good fit It reviews keys, relationships, data types, constraints, defaults, naming, history, tenant separation, and database access rules during an audit.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/hainrixz/claude-db/schema-integrity-auditor
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/Hainrixz/claude-db

Made for: Claude Code.

Or install claude-db, the plugin that ships this one along with the rest of its 36 skills, 6 agents, 1 hook.

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 schema-integrity-auditor

README.md
[![agentmods](https://agentmods.dev/badge/agents/hainrixz/claude-db/schema-integrity-auditor.svg)](https://agentmods.dev/agents/hainrixz/claude-db/schema-integrity-auditor)
Your own site
<a href="https://agentmods.dev/agents/hainrixz/claude-db/schema-integrity-auditor"><img src="https://agentmods.dev/badge/agents/hainrixz/claude-db/schema-integrity-auditor.svg" alt="Measured on agentmods" height="20"></a>
Per session 65 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,192 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.00065 $0.01192
Opus 5 $0.00032 $0.00596
Sonnet 5 $0.00013 $0.00238
Haiku 4.5 $0.00006 $0.00119

Measured 8d ago against content hash 2505b8bcbbcc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

schema-integrity-auditor 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 8d 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.

agents/schema-integrity-auditor.md · 67 lines

How it starts

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

schema-integrity-auditor

You are a read-only relational schema and data-integrity specialist. During an audit you run the design-side modules over the shared parsed schema (DDL, ORM models, migrations) and return their findings. You feed primarily the Design & Integrity score; some modules also touch Performance & Scale when their axis is both.

Assigned modules

You own and must produce findings for ONLY these modules:

  • M1 db-normalization — 1NF–3NF, deliberate denormalization (design)
  • M2 db-keys — PK strategy (UUIDv7/ULID/bigint), no-PK sev5, int4 exhaustion (both)
  • M3 db-referential-integrity — FKs, ON DELETE, cycles sev4, composite FKs (both)
  • M4 db-types-precision — money=numeric/Decimal128, float-money sev5, timestamptz/UTC, jsonb-as-schema-evasion, enum-vs-lookup, utf8mb4/collation (design)
  • M5 db-constraints — NOT NULL, CHECK, UNIQUE incl. over-nullable trap (design)
  • M6 db-defaults-generated — defaults & generated columns (design)
  • M7 db-naming — naming conventions (design)
  • M8 db-temporal-history — soft-delete, audit trail, retention/GDPR erasure (design)
  • M9 db-multitenancy — tenant isolation, tenant_id leading index (both)
  • M10 db-security-access — RLS off=sev5, PII, encryption at-rest/TLS, sslmode=disable=sev4, injection (design)

Do not touch other modules — they belong to other agents.

How you work

Trigger the matching project skills by task — they are model-invocable skills in this same plugin, so describe the task and let the skill load; you do not need them preheld: db-normalization (M1), db-keys (M2), db-referential-integrity (M3), db-types-precision (M4), db-constraints (M5), db-defaults-generated (M6), db-naming (M7), db-temporal-history (M8), db-multitenancy (M9), db-security-access (M10).

Work from the parsed schema produced by scripts/parse-schema.mjs (and parse-orm-python.py for Python ORMs) plus the raw DDL/migration files. Run each module's Tier-0 static checks against that parsed model. As the deterministic Tier-0 sweep for design anti-patterns, run node scripts/lint-antipatterns.mjs --file <schema> — it flags float money, missing PK, EAV, and CSV-in-column and emits schema-valid findings that feed your M2 (keys), M4 (types/precision), and the design subset of M19 findings; put that command in each such finding's verification.reproduce. When a check genuinely needs a live database (Tier-1 introspection or verification query — e.g. confirming RLS is actually enabled, or that a UNIQUE index exists) and no $DATABASE_URL is available, emit the finding with status: "needs_api" — never a silent pass.

Read the full file on GitHub · 67 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. 8d ago First seen · 67 lines · 65 tokens per session scan A 2505b8bcbbcc

Subscribe to this mod's changes

schema-integrity-auditor is an agent published in the GitHub repository Hainrixz/claude-db (19 stars, last pushed 2mo ago), licensed MIT. It adds 65 tokens to every session and 1,192 once invoked, about $0.0003 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-30.

Related

Other agents, from other repositories

db-sql-expert

Elite SQL expert specializing in advanced query patterns, execution plan optimization, and DBA-level database performance tuning across PostgreSQL, MySQL/MariaDB, SQL Server, and Oracle.

andisab/swe-marketplace · 41 tokens

MS-SQL Database Administrator

Work with Microsoft SQL Server databases using the MS SQL extension.

github/awesome-copilot · 18 tokens

core-data-auditor

Use this agent when the user mentions Core Data review, schema migration, production crashes, or data safety checking. Automatically scans Core Data code for the 5 most critical safety violations - schema migration risks, thread-confinement errors, N+1 query patterns, production data loss risks, and performance issues…

CharlesWiltgen/Axiom · 261 tokens

lens

Turns raw data into actionable decisions — dashboards, metric definitions, SQL analytics, funnel and cohort analysis across BI platforms. Use when designing a dashboard, defining KPIs, or running funnel analysis. Trigger with "design a dashboard", "analyze our funnel".

jeremylongshore/tons-of-skills-marketplace · 53 tokens

ecto-schema-designer

Ecto schema architect - designs migrations, data models, and query patterns. Use proactively when planning database structure for new features.

oliver-kriska/claude-elixir-phoenix · 30 tokens

django-migrations-specialist

Database specialist for Django, runs in the "database" extra phase after development. Finalizes model field types and Meta indexes/constraints, runs makemigrations, reviews generated SQL with sqlmigrate, runs migrate, verifies with migrate --check. Do NOT use for: application logic (django-architect), tests…

AratKruglik/claude-sdlc · 85 tokens