postgres-diagnostics

postgres-diagnostics is a skill for Claude Code from pgrundev/pgbot. It costs 48 tokens per session (1,848 once invoked), scanned C, original, no licence file.

A read-only helper for checking the health and performance of PostgreSQL databases, which store application data. It examines database activity without changing the database.

In plain words
What is it for?
Use it to investigate slow queries, expensive queries, unused indexes, disk usage, table bloat, automatic cleanup, vacuum health, and database settings.
Why use it?
It helps find causes of slow database work while reducing the risk of altering production data during investigation.

Skill for Claude Code

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

Part of the pgbot plugin — 1 skill, 3 commands, 1 MCP server shipped together

Good fit Use it to investigate slow queries, expensive queries, unused indexes, disk usage, table bloat, automatic cleanup, vacuum health, and database settings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pgrundev/pgbot/postgres-diagnostics
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.

Any agent
npx skills add pgrundev/pgbot --skill postgres-diagnostics
Clone the repo
git clone --depth 1 https://github.com/pgrundev/pgbot

Made for: Claude Code.

Or install pgbot, the plugin that ships this one along with the rest of its 1 skill, 3 commands, 1 MCP server.

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 postgres-diagnostics

README.md
[![agentmods](https://agentmods.dev/badge/skills/pgrundev/pgbot/postgres-diagnostics/github.svg)](https://agentmods.dev/skills/pgrundev/pgbot/postgres-diagnostics)
Your own site
<a href="https://agentmods.dev/skills/pgrundev/pgbot/postgres-diagnostics"><img src="https://agentmods.dev/badge/skills/pgrundev/pgbot/postgres-diagnostics/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 postgres-diagnostics

Your own site · 80×15
<a href="https://agentmods.dev/skills/pgrundev/pgbot/postgres-diagnostics"><img src="https://agentmods.dev/badge/skills/pgrundev/pgbot/postgres-diagnostics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,848 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin unknown 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.00048 $0.01848
Opus 5.5 $0.00019 $0.00739
Sonnet 5.5 $0.00010 $0.00370
Haiku 4.5 $0.00005 $0.00185

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

Security

Grade C, and why

postgres-diagnostics scanned grade C with 2 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 1mo 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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

- **`pgbot` not on PATH:** install it — `curl -fsSL https://pgbot.dev/install | sh`

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **`pgbot` not on PATH:** install it — `curl -fsSL https://pgbot.dev/install | sh`
skills/postgres-diagnostics/SKILL.md · 121 lines

The source is not reproduced here

A licence we could not identify

The repository carries a LICENSE file, but it is custom or dual enough that GitHub cannot name it and neither can this catalogue. Unknown terms are not permission, so the body is not copied here. Read the licence at the source and decide for yourself.

Read it on GitHub

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. 1mo ago Changed · +9 lines 40eed8439ea5
  2. 1mo ago First seen · 112 lines · 48 tokens per session scan C 0ff7e68a842a

Subscribe to this mod's changes

postgres-diagnostics is a skill published in the GitHub repository pgrundev/pgbot (1,447 stars, last pushed 3d ago), with no licence file. It adds 48 tokens to every session and 1,848 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

troubleshoot-postgresql

Use when diagnosing issues with PostgreSQL: connection exhaustion, lock contention cascade, autovacuum starvation / bloat spiral, transaction id wraparound emergency, or checkpoint storms. Queries Netdata via MCP for process liveness, recovery state, transaction rate (commits and rollbacks), row operations rate, query…

netdata/skills · 86 tokens

postgres-aiops

Use this skill whenever the user needs to operate or troubleshoot a PostgreSQL server/cluster as a DBA — a one-shot cluster health overview; server reads (version/uptime, settings, extensions, databases, roles); activity (sessions, idle-in-transaction, long-running queries, locks); query stats (pgstatstatements top-N…

AIops-tools/Postgres-AIops · 443 tokens

connection-troubleshooting

Use this skill when diagnosing PostgreSQL connection issues through PGAutoPilot. Trigger when user asks to: - "I can't connect to the database" - "Connection refused" - "Connection timed out" - "Database is not reachable" - "How do I fix my database URL?" - "The database won't start" - Connection errors…

cyberreinxy/pgautopilot · 114 tokens

query-optimization

Use this skill when analyzing, optimizing, or debugging PostgreSQL query performance. Trigger when user asks to: - "Why is this query slow?" - "Help me optimize this query" - "What indexes would improve performance?" - "Analyze the execution plan" - "Find slow queries" - "Tune database performance" - "My app is slow"…

cyberreinxy/pgautopilot · 129 tokens

explorer

Build and modify Studio Explorer surfaces, including notebooks, chats, SQL snippets, query cells, and their shared toolbar patterns.

supabase/supabase · 27 tokens

graphjin-eval

Create, extend, run, baseline, and diagnose GraphJin agent evaluations through the graphjin eval CLI.

dosco/graphjin · 27 tokens