aiagent: Agent for Claude Code

.claude/agents/dba-reviewer.md

dba-reviewer is an agent for Claude Code from drujensen/aiagent. It costs 61 tokens per session (1,073 once invoked), scanned A, original, MIT.

A read-only database reviewer for the aiagent project. It checks changes to data structures and repositories across JSON file storage and MongoDB, a document database.

In plain words
What is it for?
Use it to review database schemas, entities, repository implementations, and storage changes, then produce a scored approval or revision verdict.
Why use it?
It can catch mismatched interfaces, missing updates to one storage backend, inconsistent BSON field labels, unsafe queries, and compatibility problems before approval.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is drujensen/aiagent's own configuration. It tells Claude Code how to work on aiagent itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything aiagent configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is find ./internal/impl/repositories -name "*.go" | xargs grep -l "Collection\|tableName".

Reuse

Borrowing it

Nothing to install: this file belongs to drujensen/aiagent. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/drujensen/aiagent/main/.claude/agents/dba-reviewer.md
Clone the repo
git clone --depth 1 https://github.com/drujensen/aiagent

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/drujensen/aiagent/dba-reviewer/github.svg)](https://agentmods.dev/agents/drujensen/aiagent/dba-reviewer)
Your own site
<a href="https://agentmods.dev/agents/drujensen/aiagent/dba-reviewer"><img src="https://agentmods.dev/badge/agents/drujensen/aiagent/dba-reviewer/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.

agentmods 80×15 button for dba-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/drujensen/aiagent/dba-reviewer"><img src="https://agentmods.dev/badge/agents/drujensen/aiagent/dba-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,073 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00061 $0.01073
Opus 5.5 $0.00024 $0.00429
Sonnet 5.5 $0.00012 $0.00215
Haiku 4.5 $0.00006 $0.00107

Measured 4d ago against content hash 695aa5aefe08, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

dba-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.

.claude/agents/dba-reviewer.md · 116 lines

How it starts

The opening of the file, as written. The whole thing — 116 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are an antagonistic Database Reviewer for the aiagent project. You enforce correctness and consistency across the two storage backends.

You are READ-ONLY. You do not modify code or files. You only analyze and score.

Review Process

  1. Read all changed entity files, repository files, and interface files
  2. Run automated checks:
    # Check both repositories exist for changed entity
    find ./internal/impl/repositories -name "*.go" | xargs grep -l "Collection\|tableName"
    
    # Check BSON tags on entity fields
    grep -A 20 "type Xxx struct" ./internal/domain/entities/xxx.go
    
    # Check interface vs implementation consistency
    grep "func.*Repository" ./internal/domain/interfaces/xxx_repository.go
    grep "func.*Repository\|func.*Repo" ./internal/impl/repositories/json/xxx_repository.go
    grep "func.*Repository\|func.*Repo" ./internal/impl/repositories/mongo/xxx_repository.go
    
    go build .
    go test ./...
    
  3. Score against the 6 pillars
  4. Render verdict: APPROVED or REVISE

Scoring Rubric

1. Maintainability

  • Both JSON (internal/impl/repositories/json/) and MongoDB (internal/impl/repositories/mongo/) repositories updated
  • Both backends implement the domain interface exactly (same method signatures)
  • Entity fields have both json:"fieldName" AND bson:"fieldName" struct tags
  • MongoDB _id field uses bson:"_id" (not bson:"id")
  • Constructor (NewXxx) initializes all required fields including timestamps

2. Reliability

  • JSON backward compatibility: new fields with omitempty or safe zero values — old files won't crash
  • MongoDB backward compatibility: new required fields handle absent documents gracefully
  • All repository methods propagate context.Context correctly
  • Error wrapping: fmt.Errorf("failed to %s: %w", operation, err) pattern followed

3. Scalability

  • List operations don't make per-document calls (no N+1)
  • New filterable fields have corresponding indexes in MongoDB
  • Large documents use projection to fetch only needed fields
  • MongoDB collection queries have appropriate result limits

Read the full file on GitHub · 116 lines

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. 4d ago First seen · 116 lines · 61 tokens per session scan A 695aa5aefe08

Subscribe to this mod's changes

dba-reviewer is an agent published in the GitHub repository drujensen/aiagent (5 stars, last pushed 2mo ago), licensed MIT. It adds 61 tokens to every session and 1,073 once invoked, about $0.0002 per session on Opus 5.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-10-03.

Related

Other agents, from other repositories

mongodb-performance-advisor

Analyze MongoDB database performance, offer query and index optimization insights and provide actionable recommendations to improve overall usage of the database.

github/awesome-copilot · 29 tokens

core-data-auditor

Use this agent when the user mentions Core Data review, schema migration, production crashes, or data safety checking.

CharlesWiltgen/Axiom · 28 tokens

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…

testdouble/han · 216 tokens

nw-data-engineer-reviewer

Use for review and critique tasks - Data architecture and pipeline review specialist. Runs on Haiku for cost efficiency.

nWave-ai/nWave · 29 tokens

data-engineer

Data engineering specialist for schema design, query optimization, ETL pipelines, and data modeling. Use when the task involves database migrations, query performance tuning, data pipeline construction, or schema evolution. For example: designing a normalized schema, optimizing slow queries, or building a data…

josstei/maestro-orchestrate · 218 tokens

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. Postgres-specific query, index, and type patterns defer to the ia-postgresql skill; this agent is the migration-safety review gate.

iliaal/whetstone · 69 tokens