db-expert

db-expert is an agent for Claude Code from NYCU-Chung/my-claude-devteam. It costs 69 tokens per session (1,866 once invoked), scanned A, original, MIT.

A read-only database reviewer that examines table designs, database changes, and queries. It looks for risks such as data loss, blocked database operations, slow queries, unsafe changes, and compatibility problems.

In plain words
What is it for?
It is for reviewing database schemas, migrations, indexes, queries, transactions, and related performance or correctness risks.
Why use it?
It helps find database problems before they cause lost data, outages, slow applications, or inconsistent results.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the my-claude-devteam plugin — 12 agents, 5 hooks shipped together

Good fit It is for reviewing database schemas, migrations, indexes, queries, transactions, and related performance or correctness risks.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/nycu-chung/my-claude-devteam/db-expert
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.

Clone the repo
git clone --depth 1 https://github.com/NYCU-Chung/my-claude-devteam

Made for: Claude Code.

Or install my-claude-devteam, the plugin that ships this one along with the rest of its 12 agents, 5 hooks.

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 db-expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/nycu-chung/my-claude-devteam/db-expert.svg)](https://agentmods.dev/agents/nycu-chung/my-claude-devteam/db-expert)
Your own site
<a href="https://agentmods.dev/agents/nycu-chung/my-claude-devteam/db-expert"><img src="https://agentmods.dev/badge/agents/nycu-chung/my-claude-devteam/db-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 69 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,866 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.00069 $0.01866
Opus 5 $0.00034 $0.00933
Sonnet 5 $0.00014 $0.00373
Haiku 4.5 $0.00007 $0.00187

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

Security

Grade A, and why

db-expert 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 8d 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/db-expert.md · 127 lines

How it starts

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

You are the Database Expert — the team's data layer specialist. You are paranoid about data loss, lock contention, and silent corruption. You know that the database is the one place a typo can cost you a weekend.

You operate read-only. You analyze schemas, queries, and migrations, then produce findings. You do not modify files — that's the engineer's job.

Core Principles (Three Red Lines)

  1. Closure discipline — Every finding includes the consequence (what breaks, how badly, under what conditions) and a fix direction.
  2. Fact-driven — Every finding cites the schema file or query in question with line numbers. "Probably should have an index" is not a finding; "the WHERE user_id = ? query in src/api/orders.ts:52 runs against Order which has no index on user_id (see prisma/schema.prisma:34) — full table scan on a table that grows linearly" is.
  3. Exhaustiveness — The full review checklist is run. Items that are clean are explicitly marked clean.

Review Checklist

Schema review

  • Constraints: missing NOT NULL, missing UNIQUE, missing FOREIGN KEY, missing CHECK
  • Indexes: missing index on FK columns, missing index on WHERE columns, missing composite index for sorted lookups
  • Types: oversized columns (TEXT where VARCHAR(N) would do), wrong precision on DECIMAL, timezone-naive TIMESTAMP
  • Relationships: cascading deletes that delete more than expected, missing back-references, polymorphic associations without enforcement
  • Naming: inconsistent with existing tables, reserved words, ambiguous columns

Migration safety

  • Data loss: DROP COLUMN, DROP TABLE, type narrowing without backup
  • Blocking locks: ALTER TABLE on large tables without CONCURRENTLY (Postgres) or online DDL (MySQL)
  • Breaking changes: removing a column still referenced by old app version, renaming without alias period
  • Backfill: missing default value on ADD NOT NULL, missing migration script for derived columns
  • Rollback path: can the migration be reverted without data loss?
  • Long-running: queries against large tables that should be batched

Read the full file on GitHub · 127 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. 8d ago First seen · 127 lines · 69 tokens per session scan A f9f219dfe70d

Subscribe to this mod's changes

db-expert is an agent published in the GitHub repository NYCU-Chung/my-claude-devteam (269 stars, last pushed 4mo ago), licensed MIT. It adds 69 tokens to every session and 1,866 once invoked, about $0.0003 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.

Related

Other agents, from other repositories

database-reviewer

PostgreSQL database specialist for query optimization, schema design, security, and performance. Use PROACTIVELY when writing SQL, creating migrations, designing schemas, or troubleshooting database performance. Incorporates Supabase best practices.

loulanyue/awesome-claude-notes · 48 tokens

database-optimization-reviewer

Use when database performance is in question — query optimization, indexing strategy, query plans, schema/access-pattern tradeoffs, or "is this the fastest way to read/write this data". The DB performance specialist (distinct from database-reviewer, which owns migration correctness/reversibility). Verifies against the…

jeremylongshore/tons-of-skills-marketplace · 71 tokens

database-reviewer

Use when reviewing schema changes, migrations, indexes, or query patterns — verifies reversibility, index strategy, and query-plan correctness against the db persona standards.

jeremylongshore/tons-of-skills-marketplace · 35 tokens

database-reviewer

Use when writing SQL queries, creating migrations, or troubleshooting database performance in Supabase/PostgreSQL projects. Reviews indexes, RLS policies, schema types, N+1 patterns. Read-only reviewer with EXPLAIN ANALYZE capability.

sangrokjung/claude-forge · 52 tokens

ai_slop_reviewer

Expert code auditor that detects AI-generated code quality defects, hallucinated patterns, and structural anti-patterns across any codebase.

ZaxbyHub/opencode-swarm · 31 tokens

java-reviewer

Expert Java and Spring Boot code reviewer specializing in layered architecture, JPA patterns, security, and concurrency. Use for all Java code changes. MUST BE USED for Spring Boot projects.

loulanyue/awesome-claude-notes · 40 tokens