db

db is a skill for Claude Code from tufantunc/review-pro. It costs 52 tokens per session (808 once invoked), scanned A, original, MIT.

A review guide for checking database schema changes, queries, and migrations—the scripts that change stored data over time—for safety and correctness.

In plain words
What is it for?
Use it to review a code change involving migrations, tables, indexes, constraints, queries, or models.
Why use it?
It helps catch accidental data loss, changes that cannot be undone, invalid constraints, missing indexes, and incorrect queries before they reach users.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the review-pro plugin — 14 skills, 15 agents shipped together

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 skills/tufantunc/review-pro/db
Any agent
npx skills add tufantunc/review-pro --skill db
Clone the repo
git clone --depth 1 https://github.com/tufantunc/review-pro

Made for: Claude Code.

Or install review-pro, the plugin that ships this one along with the rest of its 14 skills, 15 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/tufantunc/review-pro/db.svg)](https://agentmods.dev/skills/tufantunc/review-pro/db)
Your own site
<a href="https://agentmods.dev/skills/tufantunc/review-pro/db"><img src="https://agentmods.dev/badge/skills/tufantunc/review-pro/db.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 808 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.1 $0.00052 $0.00808
Opus 5 $0.00026 $0.00404
Sonnet 5 $0.00010 $0.00162
Haiku 4.5 $0.00005 $0.00081

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

Security

Grade A, and why

db 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 6d 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.

core/skills/db/SKILL.md · 65 lines

How it starts

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

DB Reviewer

Role & mandate

You are a database & migration safety reviewer. You answer one question: is this schema/query/migration change safe — no data loss, reversible, and correct?

Scope

  • Review ONLY added/modified code in the diff (migrations, schema, queries, models).
  • Diff-scoped, plus migration history and schema definitions.
  • Out of scope: SQL injection severity (security), N+1 performance impact (performance), transactional-flow design (backend).

What this reviewer flags

  • Destructive migrations: DROP column/table/constraint without a backfill or rollback path; destructive data transformations.
  • Non-reversible migrations: up without a safe down, or steps that cannot be undone.
  • Data loss: UPDATE/DELETE migrations that destroy data without a backup/verification step.
  • Missing indexes: new query patterns (WHERE/JOIN on unindexed columns) that will table-scan at scale.
  • Constraint correctness: missing NOT NULL/uniqueness/cascade; wrong cascade direction; constraints that will fail on existing data.
  • Query correctness: wrong joins, missing WHERE, accidental cross joins, ambiguity in deleted-vs-archived rows.
  • Migration transaction boundaries: multi-statement migrations that aren't atomic where they must be.

Evidence & severity

Every finding needs file:line + excerpt + the failure mode (data loss, downtime, wrong results) + remedy.

  • Critical: irreversible data loss or downtime-inducing migration in the diff.
  • High: real correctness/safety risk (missing index on a hot query, destructive op with no rollback).
  • Medium: risk under scale/edge conditions.
  • Low: minor.
  • Nitpick: trivial.
  • Anti-overreporting: before claiming "missing index", confirm the query pattern is real and hot. Do not flag indices on tiny/lookup tables without cause.

No unresearched findings

Before claiming data loss, trace the migration against existing data in your scoped context. Before claiming a missing index matters, confirm the table size/query frequency if available.

Read the full file on GitHub · 65 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. 6d ago First seen · 65 lines · 52 tokens per session scan A c37608f0bbee

Subscribe to this mod's changes

db is a skill published in the GitHub repository tufantunc/review-pro (4 stars, last pushed 5d ago), licensed MIT. It adds 52 tokens to every session and 808 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-31.

Related

Other skills, from other repositories

juror-review

Inspect Juror Cloud PR findings and, only after an explicit confirmation, start or rerun a hosted Juror review.

Juror-AI/juror · 28 tokens

logic-health

Sweep a directory, module, or full codebase for logic correctness and produce a scored health dashboard with systemic patterns. Trigger when the user requests a health view — "audit the whole codebase", "health check", "health overview", "logic health overview", "audit src/", "audit auth and payments modules", "where…

hyhmrright/logic-lens · 180 tokens

db-audit

Database performance and safety audit. 70+ checks across 13 dimensions (DB1-DB13): query patterns, indexes, schema design, connections, transactions, migrations, caching, query optimization, ORM anti-patterns, observability, data lifecycle, DB security, and migration deployment safety. Code-level checks for all ORMs.…

greglas75/zuvo · 115 tokens

performance-audit

Full-stack performance health check across 12 dimensions. Rendering, bundles, assets, API/network, algorithms, memory, database, caching, Web Vitals, backend runtime, concurrency, and framework-specific pathologies. Evidence-based Impact Models with confidence tiers and a prioritized optimization roadmap. Switches…

greglas75/zuvo · 90 tokens

logic-diff

Compare two code versions for semantic equivalence via semi-formal tracing of both versions side-by-side. Trigger when the user shares a refactor, rewrite, migration, or A/B implementation and wants to confirm behavior is unchanged — "did I break anything", "is this equivalent", "are these equivalent", "semantically…

hyhmrright/logic-lens · 192 tokens

drift-canary

Compatibility and schema drift canary — checks for database schema migration safety, breaking API contract changes, serializable payload mismatches, and backward compatibility drift. Triggers on keywords: "/drift-canary", "drift-canary", "contract drift", "breaking changes". Use when changing DB schemas, API…

HetCreep/CoalMine · 78 tokens