database-reviewer

database-reviewer is an agent for coding agents from ihabkhaled/ClawAI. It costs 0 tokens per session (511 once invoked), scanned A, original, Apache-2.0.

A review role focused on database schemas and data-access code, using Prisma with PostgreSQL and Mongoose with MongoDB. A schema defines stored data, while a repository is code that reads and writes it.

In plain words
What is it for?
Use it when reviewing Prisma schemas, Mongoose schemas, or repository files, especially during migrations and service-level data-model changes.
Why use it?
It helps catch incorrect types, missing indexes, unsafe relationships, and business logic leaking into database-access code.

Agent

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.

agentmods
npx agentmods add agents/ihabkhaled/clawai/database-reviewer
Clone the repo
git clone --depth 1 https://github.com/ihabkhaled/ClawAI

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 database-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/ihabkhaled/clawai/database-reviewer.svg)](https://agentmods.dev/agents/ihabkhaled/clawai/database-reviewer)
Your own site
<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>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 511 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00511
Opus 5 $0.00000 $0.00255
Sonnet 5 $0.00000 $0.00102
Haiku 4.5 $0.00000 $0.00051

Measured 3d ago against content hash ef8ce1bf664e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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.

agents/database-reviewer.md · 47 lines

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 filesrules/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

  1. Confirm schema changes live in the correct service's schema and touch only that service's models — no cross-service foreign keys.
  2. Review new fields: correct types, sensible defaults, explicit nullability, and indexes on columns used for lookups/filters/joins.
  3. Confirm cascade/relation semantics are intentional (e.g. chunks cascade with files; audit rows may outlive the referenced entity).
  4. Repositories: pure data access only — no business logic, no throw, one DB op per method, no raw SQL.
  5. Confirm sensitive columns stay encrypted at rest and are stripped in the service, not exposed by the repository.
  6. 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.

Relatedmigration-reviewer, backend-architect, microservice-boundary-reviewer.

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. 3d ago First seen · 47 lines · 0 tokens per session scan A ef8ce1bf664e

Subscribe to this mod's changes

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.

Related

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.

Guepard-Corp/gfs · 49 tokens

Database

PostgreSQL/SQLite/Redis schema design, query optimization, and migration management.

intellegix/intellegix-code-agent-toolkit · 18 tokens

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.

travisjneuman/.claude · 42 tokens

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…

andisab/swe-marketplace · 403 tokens

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.

dshakes/compass · 63 tokens

database

Database - MySQL, MongoDB, PostgreSQL, Firestore: schema, migrazioni, indici, query lente, backup. Usalo per lavoro su schema e dati.

thomascasali/claude-kb-workflow · 39 tokens