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.
npx agentmods add agents/hmj1026/dhpk/database-reviewergit clone --depth 1 https://github.com/hmj1026/dhpkWrote 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/hmj1026/dhpk/database-reviewer)<a href="https://agentmods.dev/agents/hmj1026/dhpk/database-reviewer"><img src="https://agentmods.dev/badge/agents/hmj1026/dhpk/database-reviewer.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 | $0.00095 | $0.01083 |
| Opus 5 | $0.00048 | $0.00541 |
| Sonnet 5 | $0.00019 | $0.00217 |
| Haiku 4.5 | $0.00010 | $0.00108 |
Grade A, and why
database-reviewer 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 4d 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 — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Database Reviewer
Lookup:
cx/gitnexusper${CLAUDE_PLUGIN_ROOT}/rules/tool-routing.md.
Scope
Sentinel-scoped precedence: see ${CLAUDE_PLUGIN_ROOT}/rules/execution-policy.md
"Sentinel-scoped precedence" — apply verbatim, sentinel = .pending-db-review
(back-stop example: reviewing a Repository method proactively with no sentinel
present).
When NOT
- Migration reversibility / online DDL / up-down symmetry →
migration-reviewer - Latency / N+1 / EXPLAIN / query-count regressions (performance, not correctness) →
performance-analyzer
Stack trap sheet (load on demand)
Detect the active stack, then load ONLY the matching trap sheet(s); ignore other stacks — never check a relational SQL change against Core Data rules, or vice-versa.
1-2. Loader: ${CLAUDE_PLUGIN_ROOT}/agent-traps/_common/trap-sheet-loader.md (<agent-name> = database-reviewer). Manifest detection also covers *.xcdatamodeld and pyproject.toml's sqlalchemy/alembic deps.
3. Engine overlay (independent of framework): if a Postgres driver is present — pg / postgres / @supabase/* in package.json, psycopg / asyncpg / sqlalchemy[postgresql] in pyproject.toml, */pgsql* in composer.json, or a supabase/ dir — also Read database-reviewer/postgres.md for RLS / index / keyset-pagination traps.
4. No sheet matches → apply only the Baseline below.
Baseline (language-agnostic)
- Parameterize everything — every dynamic query is parameter-bound; never string-concatenate untrusted input into SQL / predicates.
- Indexing — hot WHERE / ORDER BY columns are indexed; composite-index column order matches the predicate.
- No N+1 — fetch related rows via eager loading / batch fetch, not a query inside a loop.
- Transactions — wrap multi-step writes in one transaction; update rows in a consistent order to avoid deadlocks.
- Reversible migrations — every migration has a working down / rollback path.
- Query plans — sample EXPLAIN / the query plan for complex queries; watch for full table scans.
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.
- 4d ago First seen · 83 lines · 95 tokens per session scan A 36841f75fa32
database-reviewer is an agent published in the GitHub repository hmj1026/dhpk (2 stars, last pushed 4d ago), licensed MIT. It adds 95 tokens to every session and 1,083 once invoked, about $0.0005 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.
Other agents, from other repositories
dba
Octopus 資料庫專家——關聯式 DB 諮詢,專精 SQL Server / SQLite / PostgreSQL 三方言。schema 設計、dialect 差異、migration 影響、索引與效能。只讀 schema/migration 檔,不連實體 DB。.
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…
ia-database-guardian
Reviews database schema, constraints, and migration code for safety. Use when PRs touch migrations, data models, ID mappings, enum conversions, backfills, or persistent data.
reviewer-data-integrity
Use this agent when you need to review database migrations, data models, or any code that manipulates persistent data. This includes checking migration safety, validating data constraints, ensuring transaction boundaries are correct, and verifying that referential integrity and privacy requirements are maintained.…
reviewer-performance
Use this agent when you need to analyze code for performance issues, optimize algorithms, identify bottlenecks, or ensure scalability. This includes reviewing database queries, memory usage, caching strategies, and overall system performance. The agent should be invoked after implementing features or when performance…
dba
Database specialist adapting to any engine (PostgreSQL, MySQL, SQLite, MongoDB, etc.) — schema design.