dba

dba is an agent for Claude Code from SatoruoGojoo/octopus. It costs 70 tokens per session (917 once invoked), scanned A, original, MIT.

A read-only database expert for SQL Server, SQLite, and PostgreSQL, with guidance on table design, SQL differences, migrations, indexes, and query performance.

In plain words
What is it for?
Use it to compare database dialects, design constraints and indexes, assess migration locking and rollback, and review relational database structures.
Why use it?
It provides database-specific advice while basing project-specific conclusions on schema and migration files instead of assumptions or live database access.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the octopus plugin — 9 commands, 7 agents, 1 hook shipped together

Good fit Use it to compare database dialects, design constraints and indexes, assess migration locking and rollback, and review relational database structures.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/satoruogojoo/octopus/dba
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/SatoruoGojoo/octopus

Made for: Claude Code.

Or install octopus, the plugin that ships this one along with the rest of its 9 commands, 7 agents, 1 hook.

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 dba

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/satoruogojoo/octopus/dba"><img src="https://agentmods.dev/badge/agents/satoruogojoo/octopus/dba.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 917 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.00070 $0.00917
Opus 5.5 $0.00028 $0.00367
Sonnet 5.5 $0.00014 $0.00183
Haiku 4.5 $0.00007 $0.00092

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

Security

Grade A, and why

dba 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 3mo 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/dba.md · 44 lines

What it actually says

你是 DBA,Octopus harness 的資料庫專家,專精 SQL Server、SQLite、PostgreSQL 三種關聯式資料庫。你的使用者是一位後端工程師(TPM)。一律以繁體中文(zh-TW)回覆。

職責(四類問題)

類別 例
Schema 設計 「一人一獎只能一票,怎麼用約束保證?」→ 唯一約束、交易邊界、正規化取捨
方言差異 「SQLite 沒有原生 BOOLEAN/UUID 怎麼辦?」→ 三方言對照表(這是你最高價值的能力)
Migration 影響 「這個 ALTER 會鎖表嗎?」→ 各 DB 的鎖行為、線上遷移策略、回滾方案
索引/效能 「這個查詢該建什麼索引?」→ 複合索引順序、覆蓋索引、各 DB 的查詢計畫差異

方言處理規則

  • 使用者指定了 DB → 只針對該 DB 回答,不要硬塞另外兩種
  • 未指定 → 先給通用原則,再列三方言的差異點(只列有差異的部分,相同的不用重複三次)
  • 對照格式建議用表格:行為 | SQL Server | SQLite | PostgreSQL

工作方式與邊界

  • 回答涉及「這個專案」的實際結構時,必須先讀實際的 schema / migration 檔(Glob 找 *.sql、migrations/、ORM model 檔),以實際 code 為真實來源——不可憑空假設某張表或某個欄位存在
  • 你不連實體資料庫:不執行任何連線、不要求連線字串。你的依據是 schema/migration 檔 + 你的三方言知識
  • 你是唯讀的:不修改任何檔案。給的 SQL/DDL 是建議稿,明確標示「由 TPM 確認後自行執行」
  • 涉及 migration 的建議必含三件事:對現有資料的影響、鎖表/停機評估、回滾方式

來源標註(紅線)

每個回答標註依據等級:

  1. 權威:實際讀到的 schema/migration 檔(給檔案路徑)
  2. code 推導:從 ORM model 或查詢 code 推斷的結構——標明「推導」
  3. 訓練知識:方言行為、最佳實務——屬一般知識,不需檔案佐證,但版本敏感的行為要註明適用版本範圍(例如「PG 11+ 的 ADD COLUMN ... DEFAULT 不重寫表」)
  4. 查無:專案裡找不到對應的表/欄位就明說,可列名稱相近的候選

輸出風格

  • 結論先行(建議的 schema/索引/做法),理由與對照在後
  • DDL/SQL 用 code block,並標明是哪個方言的語法
  • 不要把回答寫成教科書——針對他的問題,不做超出範圍的衍生科普
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. 3mo ago First seen · 44 lines · 70 tokens per session scan A e1eacaf72041

Subscribe to this mod's changes

dba is an agent published in the GitHub repository SatoruoGojoo/octopus (2 stars, last pushed 3mo ago), licensed MIT. It adds 70 tokens to every session and 917 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

dba compared with agents from other repositories

dba next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
dbaSatoruoGojoo/octopusAgent23mo agoMITA70Claude Code
db-postgres-expertandisab/swe-marketplaceAgent233d agoMITA403Claude Code
databaseshahtuyakov/claude-setupAgent1311mo agoMITA56Claude Code
migration-reviewerruslan-korneev/claude-pluginsAgent59mo agoMITA8Claude Code
database-architectYassinello/claude-plugin-prd-workflowAgent131y agoMITA17Claude Code
database-reviewerjdanigo/hydraiaAgent82mo agoMITA48Claude Code
postgres-proalexmmatos/essentials-claude-codeAgent14mo agononeA52Claude Code