database-optimization-reviewer

database-optimization-reviewer is an agent for Claude Code from jeremylongshore/tons-of-skills-marketplace. It costs 71 tokens per session (854 once invoked), scanned A, original, MIT.

A database performance reviewer focused on queries, indexes, query plans, schemas, and how applications read or write data. A query plan is the database’s chosen method for finding and combining rows.

In plain words
What is it for?
Use it to review query plans, missing or unsuitable indexes, filtering conditions, joins, pagination, repeated queries, batching, denormalization, and materialized views.
Why use it?
It helps determine why database operations are slow and whether the proposed indexes or queries are actually efficient.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Part of the hyperflow plugin — 28 skills, 22 agents shipped together

Good fit Use it to review query plans, missing or unsuitable indexes, filtering conditions, joins, pagination, repeated queries, batching, denormalization, and materialized views.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/jeremylongshore/tons-of-skills-marketplace/database-optimization-reviewer
About the project

Tons of Skills is a model-agnostic marketplace that distributes reusable skills, plugins, agents, commands, hooks, and settings for coding-agent tools. It is intended for people who want to browse, install, and manage agent extensions, with Claude Code as its verified native harness. The catalogue entries are extensions provided by or associated with this marketplace.

jeremylongshore/tons-of-skills-marketplace · 2,717 stars · on GitHub · tonsofskills.com

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/jeremylongshore/tons-of-skills-marketplace

Made for: Claude Code.

Or install hyperflow, the plugin that ships this one along with the rest of its 28 skills, 22 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 database-optimization-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/jeremylongshore/tons-of-skills-marketplace/database-optimization-reviewer/github.svg)](https://agentmods.dev/agents/jeremylongshore/tons-of-skills-marketplace/database-optimization-reviewer)
Your own site
<a href="https://agentmods.dev/agents/jeremylongshore/tons-of-skills-marketplace/database-optimization-reviewer"><img src="https://agentmods.dev/badge/agents/jeremylongshore/tons-of-skills-marketplace/database-optimization-reviewer/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 database-optimization-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/jeremylongshore/tons-of-skills-marketplace/database-optimization-reviewer"><img src="https://agentmods.dev/badge/agents/jeremylongshore/tons-of-skills-marketplace/database-optimization-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 854 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.00071 $0.00854
Opus 5 $0.00036 $0.00427
Sonnet 5 $0.00014 $0.00171
Haiku 4.5 $0.00007 $0.00085

Measured 13d ago against content hash 654d9c2ec909, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

database-optimization-reviewer 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 13d 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.

plugins/ai-agency/hyperflow/agents/database-optimization-reviewer.md · 44 lines

What it actually says

Family: Reviewer · Binds personas: db, performance · Default role: reviewer (standalone DB-optimization pass — always a full review pass) · Triggered by types: db, performance; or Brain whenever a query, index, or data-access path is in the diff.

Mission: Make the database faster and prove it. For every query, index, and access path in scope, reason about the query plan, the indexes it uses (or misses), and the cost — then say whether this is the better solution or name the faster one (a missing composite index, a covering index, a rewritten predicate that becomes sargable, a join order, a denormalization or materialized view, cursor vs. offset pagination, batch vs. N+1). This agent is only about performance/optimization — correctness, reversibility, and migration safety belong to database-reviewer. It always thinks before it answers: no "looks fine" without a plan-level reason.

Web-research-first: per ../skills/hyperflow/web-research.md. Scope: the specific engine's current optimizer/index documentation and version-specific behavior (Postgres / MySQL / SQLite / Mongo / the project's DB and ORM), and any known performance gotcha for the version in use. Gated flows only. Always cite the engine's own docs for an index/plan claim.

Sub-agent fan-out: allowed (standalone) — depth 1, ≤ 3 sub-workers split by query / table / access path; the specialist synthesizes one optimization report.

Strict checklist / output contract: apply the db persona's index/query verification + the performance persona's measurement discipline, and ADD the optimization-only gates:

  • Plan-level reasoning per query. State the expected query plan (index scan / seq scan / nested loop / hash join) and the dominant cost; EXPLAIN ANALYZE cited for anything touching > 10k rows.
  • Index fit. Every query predicate, join key, and sort key is backed by an index that the planner will actually use; flag predicates made non-sargable by functions/implicit casts; recommend composite/covering indexes with the exact column order and why.
  • Better-solution verdict. For each access path, an explicit "this is optimal" OR "faster: → " — never silence. Name the tradeoff (write cost of a new index, storage of a materialized view).
  • Anti-patterns caught: N+1 / query-in-loop, SELECT * on wide rows, offset pagination on large tables, over-indexing that slows writes, missing partial/expression indexes, unbounded result sets, redundant indexes.
  • No micro-optimization theatre. Optimize what the real row counts and access frequency justify; for tiny or rarely-hit tables, say "no change needed" and move on.

Output format: findings block — a per-query table (query · expected plan · index used/missing · cost · optimal? → faster change) followed by the concrete recommendations; Sources consulted: when research ran.

Composes with: database-reviewer (owns migration correctness — this agent owns speed), algorithm-reviewer (application-side complexity), backend-reviewer (where the query is called), performance-reviewer (end-to-end latency budget). Defers to security-reviewer if a faster path weakens RLS or exposes data.

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. 13d ago First seen · 44 lines · 71 tokens per session scan A 654d9c2ec909

Subscribe to this mod's changes

database-optimization-reviewer is an agent published in the GitHub repository jeremylongshore/tons-of-skills-marketplace (2,717 stars, last pushed today), licensed MIT. It adds 71 tokens to every session and 854 once invoked, about $0.0004 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

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

db-expert

Database expert: schema design, migration safety, query optimization, index advice. Reviews proposed schema changes for data loss / blocking locks / backward compatibility. Reviews queries for N+1, missing indexes, race conditions, transaction isolation issues. Read-only — analyzes and reports, never modifies. Use…

NYCU-Chung/my-claude-devteam · 69 tokens

software-engineer

Panel judge for correctness and the data spine, auditing the source of truth, schema and migrations, the state model, and failure and edge cases on messy real data.

gbotev1/cc-autopilot · 37 tokens

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

sifxprime/kodelyth-ecc · 48 tokens

core-data-auditor

Use this agent when the user mentions Core Data review, schema migration, production crashes, or data safety checking. Automatically scans Core Data code for the 5 most critical safety violations - schema migration risks, thread-confinement errors, N+1 query patterns, production data loss risks, and performance issues…

CharlesWiltgen/Axiom · 261 tokens