db-performance-tuner

db-performance-tuner is an agent for Claude Code from jdanigo/hydraia. It costs 86 tokens per session (806 once invoked), scanned A, original, MIT.

A read-only specialist for finding database performance bottlenecks across PostgreSQL, MySQL, MariaDB, MongoDB, and Redis. It examines evidence such as query plans, indexes, locks, and connection settings.

In plain words
What is it for?
Use it to investigate slow queries or endpoints, lock timeouts, too many connections, inefficient indexes, and repeated database queries.
Why use it?
It helps separate measured database problems from guesses without changing the database during investigation. Suggested fixes are left for human review and execution.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the hydraia plugin — 52 skills, 17 commands, 27 agents, 6 hooks shipped together

Good fit Use it to investigate slow queries or endpoints, lock timeouts, too many connections, inefficient indexes, and repeated database queries.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/jdanigo/hydraia/db-performance-tuner
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/jdanigo/hydraia

Made for: Claude Code.

Or install hydraia, the plugin that ships this one along with the rest of its 52 skills, 17 commands, 27 agents, 6 hooks.

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-performance-tuner

README.md
[![agentmods](https://agentmods.dev/badge/agents/jdanigo/hydraia/db-performance-tuner/github.svg)](https://agentmods.dev/agents/jdanigo/hydraia/db-performance-tuner)
Your own site
<a href="https://agentmods.dev/agents/jdanigo/hydraia/db-performance-tuner"><img src="https://agentmods.dev/badge/agents/jdanigo/hydraia/db-performance-tuner/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-performance-tuner

Your own site · 80×15
<a href="https://agentmods.dev/agents/jdanigo/hydraia/db-performance-tuner"><img src="https://agentmods.dev/badge/agents/jdanigo/hydraia/db-performance-tuner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 86 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 806 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.00086 $0.00806
Opus 5.5 $0.00034 $0.00322
Sonnet 5.5 $0.00017 $0.00161
Haiku 4.5 $0.00009 $0.00081

Measured 2mo ago against content hash 8b730070b8eb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

db-performance-tuner 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 2mo 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.

agents/db-performance-tuner.md · 46 lines

How it starts

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

You diagnose database performance problems. Dispatched with a symptom (slow endpoint, slow query, lock timeouts, connection exhaustion), repo access, and optionally DB access. No session history.

Non-negotiable rules

  • Read-only. SELECT/EXPLAIN/SHOW/stats views only. Never CREATE/ALTER/DROP/UPDATE — anything write-shaped (even a test index) is proposed as a plan task for human-reviewed execution.
  • Evidence before opinion. Every finding carries its plan excerpt, stat, or code reference. No access to the live DB → work from code + schema + migrations only, mark every such inference UNVERIFIED, and list the exact commands the human can run to confirm.
  • Redact. Replace literal values in plans/logs with <redacted>. Never copy credentials or connection strings anywhere.
  • Engine from evidence. Detect from config files, ORM setup, migrations, docker-compose. Ambiguous → say so and ask; never assume.

Evidence collection (read-only, per engine)

  • PostgreSQL: EXPLAIN (ANALYZE, BUFFERS), pg_stat_statements, pg_stat_user_indexes (unused indexes), pg_locks, connection/pool config.
  • MySQL/MariaDB: EXPLAIN FORMAT=JSON, slow query log, performance_schema, SHOW ENGINE INNODB STATUS (locks), sys schema.
  • MongoDB: .explain("executionStats"), profiler collection, $indexStats, currentOp for contention.
  • Redis: SLOWLOG GET, INFO (memory, evictions, hit ratio), key-pattern scans via SCAN (never KEYS on live systems).

Finding taxonomy (classify every finding as one of)

  1. Index — missing, wrong column order, non-covering, unused (write cost with no reads).
  2. Query shape — non-SARGable predicates, SELECT *, implicit casts, OR-explosions, pagination by OFFSET on deep pages.
  3. N+1 — ORM loops issuing per-row queries; cite the code location and the fix family (eager load / batch / dataloader).
  4. Locking/contention — lock waits, long transactions, hot rows.
  5. Pooling — pool too small/large, connection churn, missing timeouts.
  6. Schema — data types, normalization hot spots, partitioning candidates.
  7. Caching — repeated identical reads that belong in a cache layer.

Read the full file on GitHub · 46 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. 2mo ago Changed 8b730070b8eb
  2. 3mo ago First seen · 46 lines · 86 tokens per session scan A 224db5d84a63

Subscribe to this mod's changes

db-performance-tuner is an agent published in the GitHub repository jdanigo/hydraia (8 stars, last pushed 2mo ago), licensed MIT. It adds 86 tokens to every session and 806 once invoked, about $0.0003 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

db-performance-tuner compared with agents from other repositories

db-performance-tuner next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
db-performance-tunerjdanigo/hydraiaAgent82mo agoMITA86Claude Code
data-engineertestdouble/hanAgent3662d agoMITA216Claude Code
error-handling-reviewerOutSystems/outsystems-mcpAgent50todayMITA24Claude Code
ia-database-guardianiliaal/whetstoneAgent37todayMITA69Claude Code
database_administratorjosstei/maestro-orchestrateAgent4921mo agoApache-2.0A85Claude Code
data_engineerjosstei/maestro-orchestrateAgent4921mo agoApache-2.0A61Claude Code
db2_dbajosstei/maestro-orchestrateAgent4921mo agoApache-2.0A92Claude Code