pg-vacuum-tuning

pg-vacuum-tuning is a skill for Claude Code, Codex from isdaniel/pgtuner_mcp. It costs 49 tokens per session (3,437 once invoked), scanned A, original, Apache-2.0.

A guide for monitoring and adjusting PostgreSQL vacuum operations. Vacuum cleans up old row versions, controls table growth, and helps prevent transaction ID wraparound, a database safety problem.

In plain words
What is it for?
Use it to inspect vacuum progress, tune autovacuum settings, assess bloat, review table statistics, and plan vacuum or freezing work.
Why use it?
It helps diagnose slow or overactive autovacuum, dead rows, table bloat, and wraparound warnings using database monitoring resources.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to inspect vacuum progress, tune autovacuum settings, assess bloat, review table statistics, and plan vacuum or freezing work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/isdaniel/pgtuner_mcp/pg-vacuum-tuning
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 isdaniel/pgtuner_mcp --skill pg-vacuum-tuning
Clone the repo
git clone --depth 1 https://github.com/isdaniel/pgtuner_mcp

Made for: Claude Code, Codex.

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 pg-vacuum-tuning

README.md
[![agentmods](https://agentmods.dev/badge/skills/isdaniel/pgtuner_mcp/pg-vacuum-tuning/github.svg)](https://agentmods.dev/skills/isdaniel/pgtuner_mcp/pg-vacuum-tuning)
Your own site
<a href="https://agentmods.dev/skills/isdaniel/pgtuner_mcp/pg-vacuum-tuning"><img src="https://agentmods.dev/badge/skills/isdaniel/pgtuner_mcp/pg-vacuum-tuning/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 pg-vacuum-tuning

Your own site · 80×15
<a href="https://agentmods.dev/skills/isdaniel/pgtuner_mcp/pg-vacuum-tuning"><img src="https://agentmods.dev/badge/skills/isdaniel/pgtuner_mcp/pg-vacuum-tuning.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,437 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.00049 $0.03437
Opus 5 $0.00024 $0.01718
Sonnet 5 $0.00010 $0.00687
Haiku 4.5 $0.00005 $0.00344

Measured 10d ago against content hash 338819f48fea, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

pg-vacuum-tuning 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 10d 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.

skills/pg-vacuum-tuning/SKILL.md · 352 lines

How it starts

The opening of the file, as written. The whole thing — 352 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PostgreSQL Vacuum Tuning

This skill guides monitoring, troubleshooting, and tuning of PostgreSQL vacuum operations using pgtuner-mcp tools.

When to Use This Skill

Use this skill when the user:

  • Asks about autovacuum configuration or tuning
  • Reports autovacuum running too slowly or too aggressively
  • Mentions transaction ID wraparound warnings
  • Sees tables accumulating dead tuples
  • Asks "why is autovacuum always running?" or "why isn't autovacuum cleaning my table?"
  • Reports table bloat growing over time
  • Wants to understand vacuum progress on a long-running operation
  • Asks about VACUUM FREEZE or preventing forced shutdowns

MCP Resources Available

  • pgtuner://settings/autovacuum -- Current autovacuum configuration (lightweight)
  • pgtuner://health/bloat -- Quick bloat assessment
  • pgtuner://table/{schema}/{table_name}/stats -- Per-table dead tuple counts and vacuum timestamps

This skill is related to the health_check MCP Prompt (wraparound dimension) and the vacuum aspects of pg-bloat-analysis skill.

Prerequisites

  • The pgtuner-mcp server must be connected with a valid DATABASE_URI
  • Access to pg_stat_activity, pg_stat_user_tables, pg_stat_progress_vacuum

Agent Decision Tree

User asks about vacuum
  |
  +--> "Why is autovacuum always running?"
  |    --> Start Step 1 (progress), then Step 3 (autovacuum config)
  |    --> May be normal for high-churn tables. Check if it's completing.
  |
  +--> "Why isn't my table being vacuumed?"
  |    --> Start Step 2 (needs_vacuum), then Step 3 (autovacuum config)
  |    --> Check if scale_factor threshold is too high for large tables
  |
  +--> "Transaction wraparound warning"
  |    --> URGENT: Start Step 2 (needs_vacuum), check XID age
  |    --> IF XID age > 1.2B: Go to Emergency Procedures immediately
  |
  +--> "How long will this vacuum take?"
  |    --> Start Step 1 (progress) to see current phase and completion %
  |
  +--> "General vacuum tuning"
       --> Follow Steps 1-4 in order, then Tuning Recommendations

Read the full file on GitHub · 352 lines

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. 10d ago First seen · 352 lines · 49 tokens per session scan A 338819f48fea

Subscribe to this mod's changes

pg-vacuum-tuning is a skill published in the GitHub repository isdaniel/pgtuner_mcp (29 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 49 tokens to every session and 3,437 once invoked, about $0.0002 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.