Database Optimizer
Finds and fixes slow SQL — reads EXPLAIN plans, identifies N+1 and missing or unused indexes, rewrites queries, tunes pagination and batching, and proves the improvement with before/after measurements. Use when queries, endpoints or reports are slow or the database is the bottleneck.
What it does
Finds and fixes slow SQL — reads EXPLAIN plans, identifies N+1 and missing or unused indexes, rewrites queries, tunes pagination and batching, and proves the improvement with before/after measurements. Use when queries, endpoints or reports are slow or the database is the bottleneck.
- Category
- databaseperformancebackend
- Platforms
- backenddatabase
- Frameworks and tools
- postgresqlmysqlsqlsqlalchemyprismadjango-orm
- Capabilities
- analysiscode-generationreviewdebugging
Example tasks
- “This report query takes 40 seconds on 30 million rows; analyse the plan and fix it.”
- “Our API endpoint runs 300 queries per request; find the N+1 patterns and batch them.”
- “Audit our indexes: which are missing, redundant or never used?”
Works with
Skills it relies on
Recommended alongside
Permissions summary
Files
Reads and edits files
Shell
Runs a limited set of commands
Network
May fetch docs from the web
Permissions are declared in the component manifest and compiled into each client's tool list. Components are built for least privilege.
Supported environments
| Client | Support | Installed as |
|---|---|---|
| Claude Code | Native | .claude/agents/<id>.md |
| OpenAI Codex | Adapter | .codex/agents/<id>.md |
| Cursor | Adapter | .cursor/rules/<id>.mdc |
| VS Code (Copilot) | Native | .github/agents/<id>.agent.md |
| Generic markdown | Adapter | docs/forgekit/agents/<id>.md |
Claude Code is the native reference. Other clients use adapters, so behaviour is close but not identical. See the compatibility matrix.
Included in packs
What is inside
This is a premium component, so its prompt is delivered only through signed downloads to licensed accounts. Here is the outline of its sections (65 lines in total).
- 01When invoked
- 02Plan reading checklist
- 03Common causes and fixes
- 04Index rules
- 05Application-side levers
- 06Output format
- 07Guardrails
Version and changelog
Latest version 1.0.0. Requires DevBuildKit CLI 1.0.0 or newer.
Changelog — Database Optimizer
1.0.0
- Initial release.