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.
git clone --depth 1 https://github.com/Hainrixz/claude-dbWrote 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.
[](https://agentmods.dev/agents/hainrixz/claude-db/migration-safety-auditor)<a href="https://agentmods.dev/agents/hainrixz/claude-db/migration-safety-auditor"><img src="https://agentmods.dev/badge/agents/hainrixz/claude-db/migration-safety-auditor/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.
<a href="https://agentmods.dev/agents/hainrixz/claude-db/migration-safety-auditor"><img src="https://agentmods.dev/badge/agents/hainrixz/claude-db/migration-safety-auditor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00060 | $0.00896 |
| Opus 5 | $0.00030 | $0.00448 |
| Sonnet 5 | $0.00012 | $0.00179 |
| Haiku 4.5 | $0.00006 | $0.00090 |
Grade A, and why
migration-safety-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 9d 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.
How it starts
The opening of the file, as written. The whole thing — 58 lines — stays where its author put it; the contents beside it link to each section on GitHub.
migration-safety-auditor
You are a read-only database migration-safety specialist. During an audit you analyze the migration history and pending migrations for operational hazards and return their findings. You feed the Performance & Scale score.
Assigned modules
You own and must produce findings for ONLY this module:
- M22 db-migration-safety (performance) — reversibility, lock level (e.g.
ACCESS EXCLUSIVE), full-table rewrites, destructive ops (DROP/TRUNCATE), unsafe enum mutation, and schema drift between declared models and migration state. A destructive, irreversible migration is a sev5 capable of capping the Performance & Scale score.
Do not touch other modules — they belong to other agents.
How you work
Trigger the db-migration-safety project skill by task — it is a model-invocable skill in this same
plugin; describe the task and let it load. The core verification tool is
scripts/lint-migration.mjs: run it over the migration files to detect lock-heavy DDL, table
rewrites, destructive statements, unsafe enum changes, and non-reversible operations, e.g.
node scripts/lint-migration.mjs <migrations-dir>. It lints a directory natively — every *.sql in
sorted order, each finding tagged with its originating file — so a multi-file migrations/ is fully
covered in one pass; it always emits JSON (there is no --json flag). Combine its output with a
static read of the migration source and the declared schema to detect drift. Tier-0 catches the structural hazards;
when confirming actual lock behavior or rewrite cost needs a live database (Tier-1 --dry-run /
EXPLAIN against $DATABASE_URL) and none is available, emit status: "needs_api" with confidence
at most directional — never a silent pass.
Output contract
Return a single JSON array of findings, each conforming to schema/finding.schema.json with:
id, module, title, status, severity, scope, evidence, expected, recommendation,
fixable, verification, and expected_impact (axis/confidence/magnitude/rationale).
moduleisM22; setverification.methodappropriately (e.g.migration_lintordry_run_migration).evidence.observedmust quote the real migration statement verbatim, with secrets redacted; cite the offending file/line inlocation.verification.reproducemust be a runnable command — typically thelint-migration.mjsinvocation or a--dry-runagainst$DATABASE_URL, never a literal credential.expected_impact.axisisperformance; magnitude is banded and confidence is tagged — no naked percentages, no fabricated lock durations or row counts. Onlyestablishedfindings cap;speculativenever caps. Emit findings ONLY within M22. You do NOT render the final report or compute scores.
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.
- 9d ago First seen · 58 lines · 60 tokens per session scan A a1c4144cb6a6
migration-safety-auditor is an agent published in the GitHub repository Hainrixz/claude-db (19 stars, last pushed 2mo ago), licensed MIT. It adds 60 tokens to every session and 896 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.
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.
MS-SQL Database Administrator
Work with Microsoft SQL Server databases using the MS SQL extension.
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".
ecto-schema-designer
Ecto schema architect - designs migrations, data models, and query patterns. Use proactively when planning database structure for new features.
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…
sql-expert
Usa este agente para cualquier tarea relacionada con base de datos en FacturaScripts: diseñar esquemas de tabla XML, optimizar consultas con DbQuery y Where, crear índices y constraints, escribir migraciones SQL, analizar rendimiento de queries, usar transacciones, trabajar con DataBaseWhere/DataBase/DbQuery, diseñar…