pg-config-tuning

pg-config-tuning is a skill for Claude Code, Codex from isdaniel/pgtuner_mcp. It costs 63 tokens per session (2,534 once invoked), scanned A, original, Apache-2.0.

A guide for adjusting PostgreSQL, a database system, to fit a server’s hardware, workload, and current settings.

In plain words
What is it for?
Use it to review and tune memory, WAL, checkpoints, autovacuum, query planning, and connection settings.
Why use it?
It helps replace unsuitable default settings with specific recommendations while showing which changes require a restart.

Skill for Claude CodeCodex

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

Good fit Use it to review and tune memory, WAL, checkpoints, autovacuum, query planning, and connection settings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/isdaniel/pgtuner_mcp/pg-config-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-config-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-config-tuning

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/isdaniel/pgtuner_mcp/pg-config-tuning"><img src="https://agentmods.dev/badge/skills/isdaniel/pgtuner_mcp/pg-config-tuning.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,534 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.00063 $0.02534
Opus 5 $0.00032 $0.01267
Sonnet 5 $0.00013 $0.00507
Haiku 4.5 $0.00006 $0.00253

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

Security

Grade A, and why

pg-config-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 9d 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-config-tuning/SKILL.md · 279 lines

How it starts

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

PostgreSQL Configuration Tuning

This skill guides systematic PostgreSQL configuration tuning using pgtuner-mcp tools, producing hardware-aware ALTER SYSTEM recommendations.

When to Use This Skill

Use this skill when the user:

  • Asks to tune or optimize postgresql.conf settings
  • Reports running on default PostgreSQL configuration
  • Asks "what settings should I change?" or "how should I configure shared_buffers?"
  • Is deploying a new database and wants optimal initial configuration
  • Asks about specific settings (work_mem, shared_buffers, effective_cache_size, etc.)
  • Reports frequent checkpoints, high I/O, or memory pressure

MCP Resources Available

Before calling tools, the agent can read lightweight resources for context:

  • pgtuner://settings/{category} -- Retrieve settings by category: memory, checkpoint, wal, autovacuum, connections
  • pgtuner://docs/tools -- Reference for all available tool parameters
  • pgtuner://docs/workflows -- Recommended workflow patterns

This skill corresponds to the health_check MCP Prompt (which includes settings review as Step 4). For a settings-focused session, this skill provides deeper guidance.

Prerequisites

  • The pgtuner-mcp server must be connected with a valid DATABASE_URI
  • For best results, the agent should know the server's hardware profile (RAM, CPU cores, storage type)

Agent Decision Logic: Gathering Context

Before recommending settings, the agent MUST understand the environment. Follow this decision tree:

1. Do I know the server's total RAM?
   YES -> proceed
   NO  -> ASK the user: "How much total RAM does the database server have?"

2. Do I know the storage type?
   YES -> proceed
   NO  -> ASK the user: "Is the database on SSD or spinning disk (HDD)?"

3. Do I know the workload type?
   YES -> proceed
   NO  -> ASK the user: "Is this primarily OLTP (many short transactions),
          OLAP (few complex analytical queries), or mixed?"

4. Do I know max_connections requirement?
   YES -> proceed
   NO  -> ASK the user: "How many concurrent connections do you expect?
          Are you using a connection pooler like PgBouncer?"

Read the full file on GitHub · 279 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. 9d ago First seen · 279 lines · 63 tokens per session scan A df5af57a8da5

Subscribe to this mod's changes

pg-config-tuning is a skill published in the GitHub repository isdaniel/pgtuner_mcp (29 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 63 tokens to every session and 2,534 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.