database-optimizer

database-optimizer is an agent for Claude Code from CronusL-1141/AI-company. It costs 32 tokens per session (260 once invoked), scanned A, original, MIT.

A database optimization adviser for improving data models, queries, indexes, migrations, connections, and resource use. A database stores and retrieves an application’s data.

In plain words
What is it for?
It helps analyze query plans, rewrite SQL, design indexes, create reversible migration scripts, optimize connection pools, and plan archiving, partitioning, or scaling.
Why use it?
It helps find slow queries, inefficient indexes, unsafe schema changes, connection leaks, and resource bottlenecks.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Good fit It helps analyze query plans, rewrite SQL, design indexes, create reversible migration scripts, optimize connection pools, and plan archiving, partitioning, or scaling.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/cronusl-1141/ai-company/engineering-database-optimizer
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/CronusL-1141/AI-company

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 database-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/agents/cronusl-1141/ai-company/engineering-database-optimizer/github.svg)](https://agentmods.dev/agents/cronusl-1141/ai-company/engineering-database-optimizer)
Your own site
<a href="https://agentmods.dev/agents/cronusl-1141/ai-company/engineering-database-optimizer"><img src="https://agentmods.dev/badge/agents/cronusl-1141/ai-company/engineering-database-optimizer/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-optimizer

Your own site · 80×15
<a href="https://agentmods.dev/agents/cronusl-1141/ai-company/engineering-database-optimizer"><img src="https://agentmods.dev/badge/agents/cronusl-1141/ai-company/engineering-database-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 260 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.00032 $0.00260
Opus 5.5 $0.00013 $0.00104
Sonnet 5.5 $0.00006 $0.00052
Haiku 4.5 $0.00003 $0.00026

Measured 24d ago against content hash 7af08a307a53, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

database-optimizer 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 24d 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/agents/engineering-database-optimizer.md · 19 lines

What it actually says

你是数据库优化专家,负责查询性能、索引与数据建模。

  • 迁移、DDL 与写入只在本地库上跑,测试库也不算安全区。
  • 索引变更附上 EXPLAIN 前后对比,没有对比就说不清改动是否生效。
  • 审查由派工方另行安排,不必自己再派审查者复核产出。超出任务范围的发现写进汇报的后续项,不顺手改:顺手的改动落在派工方的审查范围之外。

本仓库(AI Team OS)

  • 存储是 SQLite 单文件库,不是 PostgreSQL。pg_stat_statements、VACUUM FULL、连接池调参在这里没有对象。
  • 加列须同步 src/aiteam/storage/connection.py 的 COLUMNS_TO_ENSURE,create_all 不补列。
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. 24d ago Changed · +3 lines · -5 tokens per session 7af08a307a53
  2. 1mo ago Changed · -177 lines 6c4b9e61d889
  3. 1mo ago First seen · 193 lines · 37 tokens per session scan A 287a849e9ae5

Subscribe to this mod's changes

database-optimizer is an agent published in the GitHub repository CronusL-1141/AI-company (373 stars, last pushed 13d ago), licensed MIT. It adds 32 tokens to every session and 260 once invoked, about $0.0001 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-30.