database-review

database-review is a skill for Claude Code from Ozzeron/prompt-pack. It costs 91 tokens per session (1,831 once invoked), scanned A, original, MIT.

A review of a database’s tables, queries, indexes, and migrations. It checks for problems such as repeated database requests, missing indexes, unsafe locks, and race conditions where simultaneous actions can conflict.

In plain words
What is it for?
Use it to investigate slow endpoints or high database CPU, review schema and migration changes, or assess new tables and queries before launch.
Why use it?
It finds database issues that application frameworks and object-relational mapping tools can hide, including problems that appear only under real load.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: built for openclaw.

Part of the backend plugin — 13 skills shipped together , and of supabase, fullstack, all-skills

Good fit Use it to investigate slow endpoints or high database CPU, review schema and migration changes, or assess new tables and queries before launch.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ozzeron/prompt-pack/database-review
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 Ozzeron/prompt-pack --skill database-review
Clone the repo
git clone --depth 1 https://github.com/Ozzeron/prompt-pack

Made for: Claude Code.

Or install backend, the plugin that ships this one along with the rest of its 13 skills.

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-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/ozzeron/prompt-pack/database-review.svg)](https://agentmods.dev/skills/ozzeron/prompt-pack/database-review)
Your own site
<a href="https://agentmods.dev/skills/ozzeron/prompt-pack/database-review"><img src="https://agentmods.dev/badge/skills/ozzeron/prompt-pack/database-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,831 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00091 $0.01831
Opus 5 $0.00046 $0.00915
Sonnet 5 $0.00018 $0.00366
Haiku 4.5 $0.00009 $0.00183

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

Security

Grade A, and why

database-review 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 yesterday.

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.

prompts/review/database-review/SKILL.md · 168 lines

How it starts

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

Database Review

You audit a database schema, query, or migration for correctness, performance, and safety. You catch what ORMs and frameworks let through silently: N+1 queries, missing indexes, locks under load, race conditions, and migrations that look fine in dev and break in production.

When to use

  • Slow query / endpoint reported
  • Schema or migration PR up for review
  • "Why is the DB CPU high?" investigation
  • Pre-launch audit of new tables / queries

Do not invoke for greenfield schema design (use architecture/database-schema) or for writing new migrations (use architecture/database-migrations).

Scope

In scope:

  • Query patterns: N+1, sequential scans, missing indexes, over-fetching
  • Index health: missing, duplicate, unused, wrong order
  • Lock risks: long transactions, blocking ALTER, escalation
  • Race conditions: missing transactions, missing FOR UPDATE, double-spend patterns
  • Migration safety (delegated to architecture/database-migrations rules)
  • ORM-specific footguns (Prisma, TypeORM, SQLAlchemy, Active Record)

Out of scope:

  • Whole-app architecture review
  • Index tuning without EXPLAIN data — ask for it instead of guessing

Inherits

Token discipline (specific)

  • Read the specific schema files / migrations / queries provided.
  • Read 1–2 adjacent tables only when relationships matter for the review.
  • Do NOT read the entire migrations directory — sample the latest 3–5.
  • Do NOT read application logic beyond the data layer unless asked.
  • If EXPLAIN ANALYZE output is missing for a perf question, ask the user to run it rather than speculate.

Process

  1. Understand the query / change. Restate it in one sentence.
  2. Map data flow. Which tables, what indexes exist (read schema), what filters apply.
  3. Check the standard symptom list below.
  4. Classify findings by severity (same scale as code-review: Blocker / Major / Minor / Nit).
  5. Recommend specific fixes with the SQL or ORM change, not just "add an index".

Read the full file on GitHub · 168 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. yesterday Changed · +2 lines · +66 tokens per session d77844ec4f44
  2. 8d ago First seen · 166 lines · 25 tokens per session scan A 05ee1d50c038

Subscribe to this mod's changes

database-review is a skill published in the GitHub repository Ozzeron/prompt-pack (8 stars, last pushed 2d ago), licensed MIT. It adds 91 tokens to every session and 1,831 once invoked, about $0.0005 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

data-architecture

A data-architecture guide for designing how application data is structured, changed, stored, and used. A schema is the defined shape of stored data, such as tables and fields.

devcodex-labs/devcodex · 63 tokens

dev-database

A database-development guide focused on safe migrations and schema changes. A migration is a controlled change to the structure of stored data, such as adding a table or changing a column.

devcodex-labs/devcodex · 21 tokens

db-context-postgres

Validate that a generic Postgres database (GCP Cloud SQL, GKE Autopilot, self-hosted, etc.) is reachable via psql or pgdump, introspect a user-scoped subset of the schema (extensions, tables, columns, indexes, foreign keys, and optionally RLS policies and functions), and persist the result as DBCONTEXT.md inside the…

Mozurok/fhorja.dev · 230 tokens

db-context-supabase

Validate that a Supabase MCP server is reachable, introspect a user-scoped subset of the database (tables, columns, types, RLS policies, optionally functions and recent migrations), and persist the result as DBCONTEXT.md inside the active task folder; adds a single ## DB context cross-link in SOURCEOFTRUTH.md.…

Mozurok/fhorja.dev · 208 tokens

db-migration-checker

name: db-migration-checker description: Compares database migration scripts across environments and generates diff reports. version: 1.0.0.

zxpmail/ReqForge · 0 tokens

migration-safety-steward

Senior database migration safety steward auditing DDL (ALTER TABLE, CREATE INDEX, DROP COLUMN, ALTER TYPE, ADD CONSTRAINT, trigger changes, FK adds, RENAME COLUMN) for production-unsafe patterns BEFORE the migration is applied. Activates when IMPLEMENTATIONPLAN.md slices include schema changes, when TASKSTATE.md ##…

Mozurok/fhorja.dev · 206 tokens