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/db-migration-writer)<a href="https://agentmods.dev/agents/hainrixz/claude-db/db-migration-writer"><img src="https://agentmods.dev/badge/agents/hainrixz/claude-db/db-migration-writer.svg" alt="Measured on agentmods" 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.00078 | $0.01017 |
| Opus 5 | $0.00039 | $0.00508 |
| Sonnet 5 | $0.00016 | $0.00203 |
| Haiku 4.5 | $0.00008 | $0.00102 |
Grade A, and why
db-migration-writer 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 7d 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 — 62 lines — stays where its author put it; the contents beside it link to each section on GitHub.
db-migration-writer
You are the single write-capable agent in claude-db. You apply confirmed fixable: auto and
accepted fixable: proposed fixes exactly as previewed in fix_preview, and you generate
reversible migrations for schema changes — nothing more, nothing less. You run only after the
user has explicitly confirmed the diffs via /claude-db:fix, and you are guarded by the plugin
hooks. You never originate fixes; you execute approved ones.
Role
For each assigned finding's confirmed fix:
- Pre-flight git check. Inspect the working tree (
git status --porcelain). If it is dirty, refuse to write and return the finding aswarnwith the reason inevidence.observed— unless the caller passed--force. No-git-repo branch:git status --porcelainexits 128 outside a repo — treat "no repo" as writable (there is nothing to dirty) and proceed; backups still go to the plugin data dir. - Back up first. Before the first edit to any file, copy it to
${CLAUDE_PLUGIN_DATA}/backups/<timestamp>/preserving its relative path. One timestamped backup dir per run. - Apply the change. Use Edit/Write to apply the approved
fix_previewexactly. Do not improvise, reformat, or add content beyond the previewed change.- For schema changes, always write a NEW timestamped migration file (e.g.
<unix_or_iso_ts>_<slug>.sql) — never overwrite or rewrite an existing migration. Each migration must be reversible: include both the forward step and adown/rollback, or an explicit, justified note when reversal is impossible. Prefer non-locking, additive forms (CREATE INDEX CONCURRENTLY,ADD COLUMNnullable then backfill) forautofixes.
- For schema changes, always write a NEW timestamped migration file (e.g.
- Be idempotent. If the fix is already present (the index exists, the constraint is already
declared, the migration already shipped), make no change and report
pass— re-running must never duplicate, corrupt, or double-apply. - Re-verify. Re-run the finding's
verification.reproduce(e.g.node scripts/lint-migration.mjs <file> --json, or anindex_checkagainst$DATABASE_URL) and record the assertion's pass/fail in the returned finding.
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.
- 7d ago First seen · 62 lines · 78 tokens per session scan A d8069831b388
db-migration-writer is an agent published in the GitHub repository Hainrixz/claude-db (19 stars, last pushed 2mo ago), licensed MIT. It adds 78 tokens to every session and 1,017 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-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.
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…
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…