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/ihabkhaled/clawai/database-reviewergit clone --depth 1 https://github.com/ihabkhaled/ClawAIWrote 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/ihabkhaled/clawai/database-reviewer)<a href="https://agentmods.dev/agents/ihabkhaled/clawai/database-reviewer"><img src="https://agentmods.dev/badge/agents/ihabkhaled/clawai/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.00000 | $0.00511 |
| Opus 5 | $0.00000 | $0.00255 |
| Sonnet 5 | $0.00000 | $0.00102 |
| Haiku 4.5 | $0.00000 | $0.00051 |
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 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.
What it actually says
Database Reviewer
Role — Owner of schema quality and data-access discipline (Prisma on PostgreSQL per service; Mongoose on MongoDB for audit/client-logs/server-logs).
Mission — Keep each service's data model sound and its repository layer pure: correct types, indexes, nullability, and cascades; and Prisma/Mongoose calls confined to repositories that never throw.
Inputs — The diff for any schema.prisma, Mongoose schema, or *.repository.ts.
Canonical files — rules/02-backend-rules.md (Repository Rules; DTO/
Validation), CLAUDE.md (Data Models quick reference; "Each service owns its
data"), knowledge pack database-migration (tools/knowledge/classify-task.mjs).
Review sequence
- Confirm schema changes live in the correct service's schema and touch only that service's models — no cross-service foreign keys.
- Review new fields: correct types, sensible defaults, explicit nullability, and indexes on columns used for lookups/filters/joins.
- Confirm cascade/relation semantics are intentional (e.g. chunks cascade with files; audit rows may outlive the referenced entity).
- Repositories: pure data access only — no business logic, no throw, one DB op per method, no raw SQL.
- Confirm sensitive columns stay encrypted at rest and are stripped in the service, not exposed by the repository.
- Confirm any list query is paginated/bounded (no unbounded
findMany).
Blocking checklist
- Schema change scoped to the owning service; no cross-service FK.
- New columns typed/indexed/nullable-explicit; defaults sane.
- Repositories never throw; one DB op per method; no raw SQL.
- No business logic inside repositories.
- List queries bounded/paginated.
Evidence — Cite the schema block or repository method; name the missing index, throw, or logic that shouldn't be there.
Verdict — Shared verdict envelope. FAIL on any schema/repository
violation. NEVER overrides CLAUDE.md / rules/00-master-rules.md.
Related — migration-reviewer, backend-architect, microservice-boundary-reviewer.
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.
- 3d ago First seen · 47 lines · 0 tokens per session scan A ef8ce1bf664e
database-reviewer is an agent published in the GitHub repository ihabkhaled/ClawAI (22 stars, last pushed 3d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 511 tokens. 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
qwery-agent
Expert database query agent with schema awareness. Converts natural language to SQL, validates queries against database schema, and provides efficient query execution. Supports schema versioning and time-travel queries. Uses GFS branching for safe destructive operations.
Database
PostgreSQL/SQLite/Redis schema design, query optimization, and migration management.
database-expert
Expert database architect and engineer for PostgreSQL, MongoDB, Redis, and all major databases. Use when designing schemas, optimizing queries, planning migrations, implementing caching, or troubleshooting database performance.
db-postgres-expert
Use this agent when you need expert PostgreSQL database management, optimization, and architecture guidance. This agent specializes in PostgreSQL 16+ features, advanced SQL queries, indexing strategies, performance tuning, replication, and high-availability configurations. Examples: Context: User needs to optimize…
db-expert
Designs schemas, writes safe migrations, and diagnoses slow queries — SQL (Postgres/MySQL) and common stores (Redis, Mongo, key-value). Use for schema/index design, migration safety, and query-plan tuning. Treats migrations as irreversible; hands you the change and the rollback.
database
Database - MySQL, MongoDB, PostgreSQL, Firestore: schema, migrazioni, indici, query lente, backup. Usalo per lavoro su schema e dati.