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.
npx agentmods add skills/isdaniel/pgtuner_mcp/pg-bloat-analysisnpx skills add isdaniel/pgtuner_mcp --skill pg-bloat-analysisgit clone --depth 1 https://github.com/isdaniel/pgtuner_mcpWrote 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.
[](https://agentmods.dev/skills/isdaniel/pgtuner_mcp/pg-bloat-analysis)<a href="https://agentmods.dev/skills/isdaniel/pgtuner_mcp/pg-bloat-analysis"><img src="https://agentmods.dev/badge/skills/isdaniel/pgtuner_mcp/pg-bloat-analysis.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00053 | $0.03133 |
| Opus 5 | $0.00026 | $0.01566 |
| Sonnet 5 | $0.00011 | $0.00627 |
| Haiku 4.5 | $0.00005 | $0.00313 |
Grade A, and why
pg-bloat-analysis 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 6d 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.
How it starts
The opening of the file, as written. The whole thing — 338 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PostgreSQL Bloat Analysis
This skill guides detection, analysis, and remediation of table and index bloat in PostgreSQL databases using pgtuner-mcp tools.
When to Use This Skill
Use this skill when the user:
- Reports tables or indexes growing unexpectedly large
- Asks about database bloat, dead tuples, or fragmentation
- Mentions disk space running low
- Sees slow sequential scans on tables that should be small
- Asks "why is my table so large?" or "how do I reclaim disk space?"
- Notices
VACUUMnot keeping up or autovacuum running constantly - Reports degraded performance after bulk DELETE or UPDATE operations
MCP Resources Available
pgtuner://health/bloat-- Quick bloat health assessment (lightweight)pgtuner://table/{schema}/{table_name}/stats-- Table statistics including dead tuple countspgtuner://settings/autovacuum-- Autovacuum configuration (relevant for root cause analysis)
Related MCP Prompt
This skill is referenced by the health_check MCP Prompt (Step 6: Quick Bloat Scan). For dedicated bloat investigation, follow this skill's full workflow.
Prerequisites
- The pgtuner-mcp server must be connected with a valid
DATABASE_URI - Required:
pgstattupleextension (for accurate bloat measurement) - Without
pgstattuple: The tools fall back to statistical estimation (less accurate)
Pre-Flight Checks
- If
analyze_table_bloatorget_bloat_summaryreturns an error aboutpgstattuple, inform the user: "The pgstattuple extension is not installed. Bloat measurements will be estimated frompg_stat_user_tablesstatistics, which is less accurate. For precise measurements, install pgstattuple:CREATE EXTENSION pgstattuple;"
Agent Decision Tree
User reports bloat concerns
|
+--> General "how bloated is my database?"
| --> Start with Step 1 (get_bloat_summary)
|
+--> Specific table is too large
| --> Skip to Step 2 (analyze_table_bloat) for that table
|
+--> Disk space running low
| --> Start with Step 1, then prioritize high-bloat tables
|
+--> After Step 1, triage results:
|
+--> Dead tuple ratio > 20% on any table?
| --> Deep-dive Step 2, then investigate root cause (Step 5)
|
+--> XID age > 800M on any table?
| --> URGENT: redirect to pg-vacuum-tuning emergency procedures
|
+--> Index bloat > 40%?
| --> Step 3 (index bloat analysis), recommend REINDEX
|
+--> Autovacuum not keeping up?
--> Step 4 (vacuum status), then pg-vacuum-tuning skill
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.
- 6d ago First seen · 338 lines · 53 tokens per session scan A 11d1f40ab91d
pg-bloat-analysis is a skill published in the GitHub repository isdaniel/pgtuner_mcp (29 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 53 tokens to every session and 3,133 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-08-30.
Other skills, from other repositories
exasol-mcp-server
Exasol MCP Server usage guide: common workflows for database exploration, query debugging, BucketFS management, and working with UDFs and preprocessors.
tencent-pg-slowquery-diagnosis
Diagnose slow SQL and performance anomalies for Tencent Cloud PostgreSQL by calling Tencent Cloud OpenAPI directly. This skill can use the full aligned PostgreSQL OpenAPI action set documented in @references/apireference.md. Start with evidence collection first, and require explicit confirmation before any write…
amazon aurora dsql
Deprecated compatibility redirect for Aurora DSQL guidance. Use when a request concerns DSQL, Aurora DSQL, distributed SQL, DSQL schemas, migrations, queries, authentication, performance, or application development.
sql-optimizer
Analyzes SQL queries for missing indexes, N+1 patterns, suboptimal joins, and full table scans. Interprets EXPLAIN, detects anti-patterns, rewrites queries. Triggers on: "optimize this query", "slow query", "add indexes", "explain plan", "N+1 query", "why is this query slow".
ecto-constraint-debug
Debug Ecto constraint violations - trace triggers, check migrations, find duplicate data. Use when seeing uniqueconstraint, foreignkeyconstraint, or checkconstraint errors.
solr-query
To build and debug Solr queries: eDisMax, block join, JSON facets, kNN, explain.