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 — 15 skills, 16 agents shipped together

Good fit Use it to review a code change involving migrations, tables, indexes, constraints, queries, or models.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tufantunc/review-pro/db
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.

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 15 skills, 16 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/github.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/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 db

Your own site · 80×15
<a href="https://agentmods.dev/skills/tufantunc/review-pro/db"><img src="https://agentmods.dev/badge/skills/tufantunc/review-pro/db.svg" alt="Reviewed on agentmods" width="80" 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. 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.00052 $0.00808
Opus 5.5 $0.00021 $0.00323
Sonnet 5.5 $0.00010 $0.00162
Haiku 4.5 $0.00005 $0.00081

Measured 1mo ago against content hash c37608f0bbee, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 (5 stars, last pushed yesterday), licensed MIT. It adds 52 tokens to every session and 808 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-08-31.

Related

Other skills, from other repositories

ring:using-lib-systemplane

Using lib-systemplane, the hot-reload runtime-config plane (Postgres LISTEN/NOTIFY or MongoDB change streams), in two modes. Sweep Mode detects DIY config reload (SIGHUP, fsnotify, viper, pgx LISTEN), manual tenant-scoping, hand-built admin CRUD, and v4 residue. Reference Mode catalogs client lifecycle and…

LerianStudio/ring · 106 tokens

ring:using-outbox

Using the transactional-outbox pattern across lib-streaming (writer) and lib-commons/v5/commons/outbox (repository + relay), in two modes. Sweep Mode detects DIY outbox tables, hand-rolled relay loops, send-and-pray emits, missing WithOutboxTx wrapping, and broker calls inside DB transactions. Reference Mode catalogs…

LerianStudio/ring · 98 tokens

ring:mapping-service-resources

Mapping a Go service's Service -> Module -> Resource hierarchy for dispatch-layer registration: detects modules and per-module PostgreSQL/MongoDB/RabbitMQ resources, database names, and shared databases, generates MongoDB index migration pairs (.up.json/.down.json), detects existing Postgres migrations, emits an HTML…

LerianStudio/ring · 97 tokens

ring:designing-data-model

Designing the physical data model as a real stack-native schema (schema.sql with CREATE TABLE DDL, indexes, and constraints for Postgres/Go; schema.prisma for Prisma/TS; Postgres schema.sql as fallback) from the Gate 4 OpenAPI spec and TRD. Gate 5 of ring:planning-large-features; runs after…

LerianStudio/ring · 120 tokens

logic-review

Find logic bugs in a single file or function via semi-formal execution tracing (Premises → Trace → Divergence → Trigger → Remedy). Trigger when a user shares code and suspects something is wrong without naming a concrete failure — phrases like "review this", "does this look right", "check this function", "audit this…

hyhmrright/logic-lens · 161 tokens

logic-fix-all

Autonomous repository-wide audit-and-fix pipeline: health → review → locate/explain → fix → diff-verify → iterate until clean. Starts with a mandatory consent prompt (token-intensive); after consent runs hands-free. Trigger when the user wants ALL logic issues found and fixed — "fix everything", "fix all logic…

hyhmrright/logic-lens · 211 tokens