db-analyst

db-analyst is an agent for Claude Code from pwdev-solucoes/pwdev-claude-marketplace. It costs 53 tokens per session (378 once invoked), scanned A, original, Apache-2.0.

A PostgreSQL database analyst that examines query plans, indexes, table bloat, locks, replication, and capacity. PostgreSQL is a relational database system.

In plain words
What is it for?
It is for investigating slow queries and database capacity, reviewing PostgreSQL statistics and execution plans, and proposing index or maintenance changes with their risks and timing.
Why use it?
It helps distinguish likely database causes from guesses while keeping normal analysis read-only. It also flags operations that may lock tables or affect production.

Agent for Claude Code

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

Part of the pwdev-devops plugin — 19 skills, 5 commands, 4 agents shipped together

Good fit It is for investigating slow queries and database capacity, reviewing PostgreSQL statistics and execution plans, and proposing index or maintenance changes with their risks and timing.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/pwdev-solucoes/pwdev-claude-marketplace/db-analyst
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/pwdev-solucoes/pwdev-claude-marketplace

Made for: Claude Code.

Or install pwdev-devops, the plugin that ships this one along with the rest of its 19 skills, 5 commands, 4 agents.

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-analyst

README.md
[![agentmods](https://agentmods.dev/badge/agents/pwdev-solucoes/pwdev-claude-marketplace/db-analyst/github.svg)](https://agentmods.dev/agents/pwdev-solucoes/pwdev-claude-marketplace/db-analyst)
Your own site
<a href="https://agentmods.dev/agents/pwdev-solucoes/pwdev-claude-marketplace/db-analyst"><img src="https://agentmods.dev/badge/agents/pwdev-solucoes/pwdev-claude-marketplace/db-analyst/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-analyst

Your own site · 80×15
<a href="https://agentmods.dev/agents/pwdev-solucoes/pwdev-claude-marketplace/db-analyst"><img src="https://agentmods.dev/badge/agents/pwdev-solucoes/pwdev-claude-marketplace/db-analyst.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 378 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.00053 $0.00378
Opus 5 $0.00026 $0.00189
Sonnet 5 $0.00011 $0.00076
Haiku 4.5 $0.00005 $0.00038

Measured 5d ago against content hash 2e381a77cb82, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

db-analyst 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 5d 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.

plugins/pwdev-devops/agents/db-analyst.md · 35 lines

What it actually says

Subagente: DB Analyst

Papel

DBA. Siga postgres-dba.

Contrato de entrada

  • LANGUAGE, SINTOMA, CONEXAO (via variável de ambiente, nunca literal)
  • CONTEXT_FILE, AMBIENTE

Regras inegociáveis

  1. SELECT, EXPLAIN, pg_stat_* livres. DDL exige confirmação.
  2. DROP, TRUNCATE, DELETE sem WHERE: não executa — entrega o comando.
  3. CREATE INDEX em produção: sempre CONCURRENTLY, sempre em janela.
  4. VACUUM FULL e REINDEX travam a tabela — avise do impacto antes de propor.
  5. EXPLAIN sem ANALYZE é estimativa. Diga qual está usando.
  6. Antes de sugerir remoção de índice, confirme que a estatística cobre um ciclo completo — relatório mensal não aparece em 7 dias de dado.
  7. Nunca imprima dado de linha que possa conter informação pessoal.
  8. Nunca ecoe a string de conexão.

Contrato de saída

Diagnóstico · evidência (plano, estatística) · causa provável rotulada como provável · correção proposta com impacto e janela · o que não foi verificado.

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. 5d ago First seen · 35 lines · 53 tokens per session scan A 2e381a77cb82

Subscribe to this mod's changes

db-analyst is an agent published in the GitHub repository pwdev-solucoes/pwdev-claude-marketplace (2 stars, last pushed 2d ago), licensed Apache-2.0. It adds 53 tokens to every session and 378 once invoked, about $0.0003 per session on Opus 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-09-03.

Related

Other agents, from other repositories

Neon Performance Analyzer

Identify and fix slow Postgres queries automatically using Neon's branching workflow. Analyzes execution plans, tests optimizations in isolated database branches, and provides clear before/after performance metrics with actionable code fixes.

github/awesome-copilot · 46 tokens

neon-optimization-analyzer

Identify and fix slow Postgres queries automatically using Neon's branching workflow. Analyzes execution plans, tests optimizations in isolated database branches, and provides clear before/after performance metrics with actionable code fixes.

jiamaozheng/awesome-claude-code · 48 tokens

neon-optimization-analyzer

Identify and fix slow Postgres queries automatically using Neon's branching workflow. Analyzes execution plans, tests optimizations in isolated database branches, and provides clear before/after performance metrics with actionable code fixes.

asleekgeek/claude-multiagent-catalogue · 48 tokens

PostgreSQL Database Administrator

Work with PostgreSQL databases using the PostgreSQL extension.

github/awesome-copilot · 17 tokens

doctrine-performance-optimizer

Read-only performance audit of Doctrine usage: N+1 queries, fetch modes, batch processing, missing indexes, and caching opportunities. Use proactively after adding entities, relations, repository queries, or when a page/endpoint is reported slow.

dev-toolings/superpowers-symfony · 53 tokens

supabase-substrate-explorer

Specialist research agent for discovering creative, non-obvious applications of the Supabase SUBSTRATE dimension (Postgres Database, Storage object store, pgvector) to Thoughtbox's reasoning-persistence surfaces. Use proactively when exploring how substrate-layer primitives could become new "organs" for Thoughtbox…

Kastalien-Research/thoughtbox · 117 tokens