db-review

db-review is a skill for Claude Code from tranhieutt/software_development_department. It costs 43 tokens per session (840 once invoked), scanned A, original, MIT.

A review checklist for database tables, SQL queries, and migrations. It checks data structure, speed, security, and safe changes.

In plain words
What is it for?
Auditing schemas, queries, and migration files, including rollback and zero-downtime concerns.
Why use it?
It helps find missing constraints, unsuitable indexes, risky migrations, and other database problems before release.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: agent in frontmatter.

Good fit Auditing schemas, queries, and migration files, including rollback and zero-downtime concerns.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/tranhieutt/software_development_department/db-review/github.svg)](https://agentmods.dev/skills/tranhieutt/software_development_department/db-review)
Your own site
<a href="https://agentmods.dev/skills/tranhieutt/software_development_department/db-review"><img src="https://agentmods.dev/badge/skills/tranhieutt/software_development_department/db-review/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-review

Your own site · 80×15
<a href="https://agentmods.dev/skills/tranhieutt/software_development_department/db-review"><img src="https://agentmods.dev/badge/skills/tranhieutt/software_development_department/db-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 840 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.00043 $0.00840
Opus 5 $0.00022 $0.00420
Sonnet 5 $0.00009 $0.00168
Haiku 4.5 $0.00004 $0.00084

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

Security

Grade A, and why

db-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 9d 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/skills/db-review/SKILL.md · 99 lines

How it starts

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

When this skill is invoked:

  1. Read the target schema, migration, or query files in full.

  2. Evaluate schema design:

    • All tables have a primary key
    • Tables have created_at and updated_at columns
    • Foreign key relationships defined with proper constraints
    • Column types are appropriate (don't use VARCHAR(255) for everything)
    • NULL vs NOT NULL is intentionally chosen and documented
    • Enum types used for fixed sets of values
  3. Evaluate indexing strategy:

    • Every foreign key column is indexed
    • Columns in frequent WHERE, ORDER BY, or JOIN conditions are indexed
    • Composite indexes match the query patterns
    • No over-indexing (too many indexes slow writes)
    • Unique constraints used where business rules require uniqueness
  4. Evaluate migration safety:

    • Migration is reversible (has a down/rollback script)
    • Adding columns with defaults is safe for zero-downtime
    • Removing columns uses soft-delete / multi-phase approach
    • Renaming columns uses multi-phase migration (add → backfill → drop old)
    • Large table operations consider locking implications
  5. Evaluate data integrity:

    • Check constraints for value ranges where appropriate
    • No orphaned records possible (foreign keys or enforced at app layer)
    • Soft delete implemented (deleted_at) not hard delete for important records
  6. Evaluate query quality (if queries provided):

    • No SELECT * in application queries
    • N+1 queries avoided (eager loading where needed)
    • Parameterized queries (no string concatenation)
    • Pagination on all list queries
  7. Output the review:

## Database Review: [Schema/Migration Name]

### Schema Design: [CLEAN / ISSUES FOUND]
[List design problems]

### Indexes: [APPROPRIATE / MISSING / OVER-INDEXED]
[List index recommendations]

### Migration Safety: [SAFE / RISKY / BLOCKING]
[List migration risks and recommendations]

### Data Integrity: [ENFORCED / GAPS FOUND]
[List integrity concerns]

### Query Quality: [CLEAN / ISSUES FOUND]
[List query problems]

### Positive Observations
[What is well-designed]

### Required Changes
[Must-fix before applying]

### Suggestions
[Nice-to-have improvements]

### Verdict: [APPROVED / APPROVED WITH SUGGESTIONS / CHANGES REQUIRED]

Protocol

  • Question: Auto-starts from argument (schema, migration, or query files)
  • Options: Skip — single review path
  • Decision: Skip — verdict is advisory
  • Draft: Full review shown in conversation only
  • Approval: Skip — read-only; no files written

Read the full file on GitHub · 99 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. 9d ago First seen · 99 lines · 43 tokens per session scan A 2eb141b8b333

Subscribe to this mod's changes

db-review is a skill published in the GitHub repository tranhieutt/software_development_department (72 stars, last pushed 3mo ago), licensed MIT. It adds 43 tokens to every session and 840 once invoked, about $0.0002 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 skills, from other repositories