database_optimizer — Claude Code subagent for database tuning
database_optimizer — a subagent for Claude Code, Codex, and Cursor reviews database performance evidence and proposes optimizations. It ranks bottlenecks and outlines how to measure proposed changes.
no license ★ 776 updated 2026-11-12
.claude/agents/database_optimizer.mdWhat database_optimizer does
The subagent produces a database optimization report with ranked bottlenecks and suggestions for queries, indexes, schemas, configuration, and access patterns. Each proposed change comes with workload trade-offs, migration and rollback considerations, and capacity risks.
The input can include an optimization goal and database materials such as schemas, queries, execution plans, indexes, metrics, or health-check results. Those materials are optional. The agent must not fabricate execution plans, row counts, latency figures, or production topology. Database-specific assumptions and potentially destructive operations are marked in the report.
A benchmark plan covers before-and-after metrics and acceptance thresholds. Any suggested index or configuration change must explain its effect on the workload.
What it helps with
- rank bottlenecks across database queries and schemas
- weigh tuning options against workload trade-offs
- plan a migration with rollback considerations
- define benchmark metrics and acceptance thresholds
Example prompts for the agent
- Review these database schemas and queries, then rank the performance bottlenecks.
- Draft optimization recommendations with workload trade-offs and rollback considerations.
- Create a benchmark plan for measuring the proposed database changes.
How to install database_optimizer
Manually: put the files in place
.claude/agents/database_optimizer.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/database_optimizer.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/database_optimizer.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about database_optimizer
How do I install database_optimizer in Claude Code?
Place the subagent file at .claude/agents/database_optimizer.md.
What does database_optimizer do?
It turns database evidence into a report with ranked bottlenecks, optimization suggestions, migration and rollback considerations, and a benchmark plan.
What information can database_optimizer use?
It can work from an optimization goal and optional schemas, queries, execution plans, indexes, metrics, or health-check results.