Not in the top 1,000 by GitHub stars
isdaniel/pgtuner_mcp
provides AI-powered PostgreSQL performance tuning capabilities.
History
Review weekly changes to SKILL.md before updating. Dates mark the weeks in which we observed each version; checks apply to the recorded commits.
View weekly changes
skills/pg-bloat-analysis/SKILL.md
Week of Nov 2, 2026 · Line counts unavailable
Before Not checked yet → After Instructions only
First observation → 2eaa0cc8a10f
No earlier version was observed for comparison.
skills/pg-config-tuning/SKILL.md
Week of Nov 2, 2026 · Line counts unavailable
Before Not checked yet → After Instructions only
First observation → 2eaa0cc8a10f
No earlier version was observed for comparison.
skills/pg-connection-analysis/SKILL.md
Week of Nov 2, 2026 · Line counts unavailable
Before Not checked yet → After Instructions only
First observation → 2eaa0cc8a10f
No earlier version was observed for comparison.
skills/pg-health-check/SKILL.md
Week of Nov 2, 2026 · Line counts unavailable
Before Not checked yet → After Instructions only
First observation → 2eaa0cc8a10f
No earlier version was observed for comparison.
skills/pg-index-optimization/SKILL.md
Week of Nov 2, 2026 · Line counts unavailable
Before Not checked yet → After Instructions only
First observation → 2eaa0cc8a10f
No earlier version was observed for comparison.
skills/pg-io-deep-dive/SKILL.md
Week of Nov 2, 2026 · Line counts unavailable
Before Not checked yet → After Instructions only
First observation → 2eaa0cc8a10f
No earlier version was observed for comparison.
skills/pg-lock-diagnosis/SKILL.md
Week of Nov 2, 2026 · Line counts unavailable
Before Not checked yet → After Instructions only
First observation → 2eaa0cc8a10f
No earlier version was observed for comparison.
skills/pg-performance-baseline/SKILL.md
Week of Nov 2, 2026 · Line counts unavailable
Before Not checked yet → After Instructions only
First observation → 2eaa0cc8a10f
No earlier version was observed for comparison.
skills/pg-query-rewrite/SKILL.md
Week of Nov 2, 2026 · Line counts unavailable
Before Not checked yet → After Instructions only
First observation → 2eaa0cc8a10f
No earlier version was observed for comparison.
skills/pg-slow-query-diagnosis/SKILL.md
Week of Nov 2, 2026 · Line counts unavailable
Before Not checked yet → After Instructions only
First observation → 2eaa0cc8a10f
No earlier version was observed for comparison.
skills/pg-vacuum-tuning/SKILL.md
Week of Nov 2, 2026 · Line counts unavailable
Before Not checked yet → After Instructions only
First observation → 2eaa0cc8a10f
No earlier version was observed for comparison.
Heat
0.4- Star growth, last 7 daysNot available
- Star growth, last 24 hoursNot available
- Rank movement, last 7 daysNot available
- Commits, last 30 daysNot available
- Accounts asking about it through MCP, last 7 daysNot available
- Hot votes this weekNot available
Heat never changes the order by stars, and sponsorship never touches it. How heat works
Stars over time
30-day change not yet available: not enough history.
Individual skills in this repository
- pg-bloat-analysis
skills/pg-bloat-analysis - pg-config-tuning
skills/pg-config-tuning - pg-connection-analysis
skills/pg-connection-analysis - pg-health-check
skills/pg-health-check - pg-index-optimization
skills/pg-index-optimization - pg-io-deep-dive
skills/pg-io-deep-dive - pg-lock-diagnosis
skills/pg-lock-diagnosis - pg-performance-baseline
skills/pg-performance-baseline - pg-query-rewrite
skills/pg-query-rewrite - pg-slow-query-diagnosis
skills/pg-slow-query-diagnosis - pg-vacuum-tuning
skills/pg-vacuum-tuning
How it works
pg-bloat-analysis
When your agent uses it
Detects and remediates table and index bloat in PostgreSQL using pgstattuple analysis. Identifies fragmentation, dead tuples, and wasted space with prioritized maintenance actions including VACUUM, REINDEX, and pg_repack recommendations.
What it loads into context
Frontmatter
57 tokensAlways available to the agent
SKILL.md
3,133 tokensWhen the skill is activated
Reference documents
0 tokensLoaded on request
Token counts are estimates. Scripts run separately; they are not counted as reference context.
The playbook
- When to Use This Skill
- MCP Resources Available
- Related MCP Prompt
- Prerequisites
- Pre-Flight Checks
- Agent Decision Tree
- Bloat Analysis Workflow
- Remediation Plan
- Output Format
- Important Notes
- Iterative Verification
- When to Stop and Ask the User
- Cross-References to Other Skills
- PostgreSQL Version Notes
- Production Safety
Files
SKILL.mdcore12,139 bytes
Read SKILL.md
# 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 `VACUUM` not keeping up or autovacuum running constantlyView the complete source on GitHubpg-config-tuning
When your agent uses it
Guides PostgreSQL configuration tuning based on hardware profile, workload type, and current settings. Covers memory, WAL, checkpoints, autovacuum, planner, and connection settings with specific ALTER SYSTEM recommendations. Teaches the agent to use review_settings with individual categories and understand restart vs reload requirements.
What it loads into context
Frontmatter
66 tokensAlways available to the agent
SKILL.md
2,534 tokensWhen the skill is activated
Reference documents
0 tokensLoaded on request
Token counts are estimates. Scripts run separately; they are not counted as reference context.
The playbook
- When to Use This Skill
- MCP Resources Available
- Related MCP Prompt
- Prerequisites
- Agent Decision Logic: Gathering Context
- Configuration Tuning Workflow
- Output Format
- When to Stop and Ask the User
- PostgreSQL Version Notes
- Production Safety
Files
SKILL.mdcore10,008 bytes
Read SKILL.md
# 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 pressureView the complete source on GitHubpg-connection-analysis
When your agent uses it
Analyzes PostgreSQL connection utilization patterns including active, idle, and idle-in-transaction sessions. Diagnoses connection leaks, saturation, and provides PgBouncer pooling recommendations. Guides the agent to use get_active_queries with targeted filters and health resources for connection monitoring.
What it loads into context
Frontmatter
62 tokensAlways available to the agent
SKILL.md
2,102 tokensWhen the skill is activated
Reference documents
0 tokensLoaded on request
Token counts are estimates. Scripts run separately; they are not counted as reference context.
The playbook
- When to Use This Skill
- MCP Resources Available
- Related MCP Prompt
- Prerequisites
- Agent Decision Tree
- Connection Analysis Workflow
- Output Format
- When to Stop and Ask the User
- PostgreSQL Version Notes
- Production Safety
Files
SKILL.mdcore9,035 bytes
Read SKILL.md
# PostgreSQL Connection Analysis
This skill guides analysis and optimization of PostgreSQL connection usage using pgtuner-mcp tools.
## When to Use This Skill
Use this skill when the user:
- Reports "too many connections" errors or connection refused
- Asks about connection pooling or PgBouncer setup
- Sees high connection counts in monitoring
- Reports idle connections consuming resources
- Asks "how many connections is my database using?" or "do I need a connection pooler?"
- Reports memory pressure related to per-connection overheadView the complete source on GitHubpg-health-check
When your agent uses it
Performs comprehensive PostgreSQL database health assessments covering connections, cache performance, locks, replication, wait events, active queries, and configuration review. Produces a scored health report with prioritized recommendations.
What it loads into context
Frontmatter
45 tokensAlways available to the agent
SKILL.md
2,886 tokensWhen the skill is activated
Reference documents
0 tokensLoaded on request
Token counts are estimates. Scripts run separately; they are not counted as reference context.
The playbook
- When to Use This Skill
- MCP Resources Available
- Related MCP Prompt
- Prerequisites
- Agent Decision Tree
- Health Check Workflow
- Output Format
- Health Check Cheatsheet
- Important Notes
- Iterative Verification
- When to Stop and Ask the User
- Cross-References to Other Skills
- PostgreSQL Version Notes
- Production Safety
Files
SKILL.mdcore11,765 bytes
Read SKILL.md
# PostgreSQL Health Check
This skill guides a comprehensive health assessment of a PostgreSQL database using pgtuner-mcp tools, producing a scored report with prioritized action items.
## When to Use This Skill
Use this skill when the user:
- Asks for a database health check or status report
- Reports general performance degradation without specific symptoms
- Wants a routine database checkup or audit
- Asks "is my database healthy?" or "what should I fix first?"
- Is setting up monitoring or wants to establish a baseline
- Mentions connection issues, high CPU, or unexplained slownessView the complete source on GitHubpg-index-optimization
When your agent uses it
Performs comprehensive PostgreSQL index optimization including unused index cleanup, duplicate detection, missing index recommendations, and hypothetical index testing with HypoPG. Provides actionable CREATE/DROP INDEX statements with estimated impact.
What it loads into context
Frontmatter
47 tokensAlways available to the agent
SKILL.md
3,048 tokensWhen the skill is activated
Reference documents
0 tokensLoaded on request
Token counts are estimates. Scripts run separately; they are not counted as reference context.
The playbook
- When to Use This Skill
- MCP Resources Available
- Related MCP Prompt
- Prerequisites
- Pre-Flight Checks
- Agent Decision Tree
- Optimization Workflow
- Output Format
- Index Design Guidelines
- Important Notes
- Iterative Verification
- When to Stop and Ask the User
- Cross-References to Other Skills
- PostgreSQL Version Notes
- Production Safety
Files
SKILL.mdcore12,554 bytes
Read SKILL.md
# PostgreSQL Index Optimization
This skill guides comprehensive index analysis and optimization for PostgreSQL databases using pgtuner-mcp tools, including HypoPG hypothetical index testing.
## When to Use This Skill
Use this skill when the user:
- Asks to optimize or review database indexes
- Wants to find and remove unused or duplicate indexes
- Reports slow queries that might benefit from better indexing
- Asks "what indexes should I create?" or "which indexes can I drop?"
- Mentions high storage usage from indexes or slow write performance
- Wants to test index ideas without creating them in productionView the complete source on GitHubpg-io-deep-dive
When your agent uses it
Deep-dive investigation of PostgreSQL I/O patterns using targeted analysis types (buffer pool, tables, indexes, temp files, checkpoints). Covers pg_stat_io for PG16+, correlates I/O patterns with slow queries, and guides diagnosis of cache misses, temp file spills, and checkpoint storms.
What it loads into context
Frontmatter
71 tokensAlways available to the agent
SKILL.md
2,610 tokensWhen the skill is activated
Reference documents
0 tokensLoaded on request
Token counts are estimates. Scripts run separately; they are not counted as reference context.
The playbook
- When to Use This Skill
- MCP Resources Available
- Related MCP Prompt
- Prerequisites
- Agent Decision Tree: Where to Start
- I/O Investigation Workflow
- Output Format
- Iterative Verification
- When to Stop and Ask the User
- PostgreSQL Version Notes
- Production Safety
Files
SKILL.mdcore10,105 bytes
Read SKILL.md
# PostgreSQL I/O Deep-Dive
This skill guides a thorough investigation of PostgreSQL I/O performance using the full capabilities of the `analyze_disk_io_patterns` tool, correlating I/O data with query workload and configuration.
## When to Use This Skill
Use this skill when the user:
- Reports high disk I/O or slow disk performance
- Sees queries with high `blks_read` or low cache hit ratios
- Reports `temp_blks_written` in slow queries (work_mem too low)
- Sees frequent checkpoint warnings in PostgreSQL logs
- Has "IO" wait events from `analyze_wait_events`
- Asks "why is my database doing so much disk I/O?"View the complete source on GitHubpg-lock-diagnosis
When your agent uses it
Diagnoses PostgreSQL lock contention including blocking lock chains, deadlock patterns, idle-in-transaction problems, and wait event analysis. Guides the agent through identifying blockers, understanding lock types, and recommending transaction and configuration changes.
What it loads into context
Frontmatter
54 tokensAlways available to the agent
SKILL.md
2,773 tokensWhen the skill is activated
Reference documents
0 tokensLoaded on request
Token counts are estimates. Scripts run separately; they are not counted as reference context.
The playbook
- When to Use This Skill
- MCP Resources Available
- Related MCP Prompt
- Prerequisites
- Agent Decision Tree
- Lock Investigation Workflow
- Common Lock Contention Patterns and Solutions
- Output Format
- Iterative Verification
- When to Stop and Ask the User
- PostgreSQL Version Notes
- Production Safety
Files
SKILL.mdcore11,571 bytes
Read SKILL.md
# PostgreSQL Lock Contention Diagnosis
This skill guides investigation and resolution of lock contention issues in PostgreSQL using pgtuner-mcp tools.
## When to Use This Skill
Use this skill when the user:
- Reports queries being blocked or timing out
- Sees "Lock" wait events in `pg_stat_activity`
- Experiences deadlocks (logged in PostgreSQL error log)
- Reports `idle in transaction` sessions causing problems
- Asks "why are my queries waiting?" or "what is blocking this query?"
- Sees application-level timeout errors due to lock waitsView the complete source on GitHubpg-performance-baseline
When your agent uses it
Generates a comprehensive PostgreSQL performance baseline report capturing health metrics, query workload patterns, table statistics, configuration settings, index utilization, and I/O patterns. Designed for before/after comparison when making changes.
What it loads into context
Frontmatter
49 tokensAlways available to the agent
SKILL.md
2,983 tokensWhen the skill is activated
Reference documents
0 tokensLoaded on request
Token counts are estimates. Scripts run separately; they are not counted as reference context.
The playbook
- When to Use This Skill
- MCP Resources Available
- Related MCP Prompt
- Prerequisites
- Agent Decision Logic
- Baseline Collection Workflow
- Output Format
- Best Practices
- Important Notes
- Iterative Verification
- When to Stop and Ask the User
- Cross-References to Other Skills
- PostgreSQL Version Notes
- Production Safety
Files
SKILL.mdcore12,161 bytes
Read SKILL.md
# PostgreSQL Performance Baseline
This skill guides creation of a comprehensive performance baseline report for a PostgreSQL database, intended for comparison before and after making configuration changes, schema modifications, or infrastructure upgrades.
## When to Use This Skill
Use this skill when the user:
- Is about to make database configuration changes and wants a "before" snapshot
- Wants to document current database performance for reference
- Needs to compare performance across time periods
- Asks "how is my database performing?" or "give me a performance report"
- Is planning a migration and needs to capture current metrics
- Wants to establish SLAs or performance targets based on current stateView the complete source on GitHubpg-query-rewrite
When your agent uses it
Guides SQL query optimization through execution plan analysis and common rewrite patterns. Covers subquery-to-JOIN conversion, CTE materialization control, OR-to-UNION, NOT IN-to-NOT EXISTS, pagination optimization, and SELECT * elimination. Uses analyze_query with format and settings parameters for deep plan analysis.
What it loads into context
Frontmatter
70 tokensAlways available to the agent
SKILL.md
3,097 tokensWhen the skill is activated
Reference documents
0 tokensLoaded on request
Token counts are estimates. Scripts run separately; they are not counted as reference context.
The playbook
- When to Use This Skill
- MCP Resources Available
- Related MCP Prompt
- Prerequisites
- Agent Decision Tree
- Query Rewrite Workflow
- Rewrite Patterns
- Step 4: Verify the Rewrite
- When to Stop and Ask the User
- PostgreSQL Version Notes
- Production Safety
Files
SKILL.mdcore12,712 bytesSKILL.mdcore12,712 bytesSKILL.mdcore12,712 bytesSKILL.mdcore12,712 bytes
Read SKILL.md
# PostgreSQL Query Rewrite Patterns
This skill guides the agent through analyzing SQL queries and applying common restructuring patterns to improve performance, using pgtuner-mcp execution plan analysis tools.
## When to Use This Skill
Use this skill when the user:
- Has a specific slow query and wants it rewritten for better performance
- Asks "how can I make this query faster?"
- Reports that adding indexes didn't help (query structure is the issue)
- Has queries with subqueries, CTEs, OR conditions, or NOT IN that could be improved
- Asks about query optimization patterns or best practices
- Has queries with `SELECT *` or inefficient paginationView the complete source on GitHubpg-slow-query-diagnosis
When your agent uses it
Diagnoses slow PostgreSQL queries by analyzing pg_stat_statements, execution plans, index opportunities, and table statistics. Guides the agent through a systematic investigation workflow using pgtuner-mcp tools to produce actionable optimization recommendations.
What it loads into context
Frontmatter
56 tokensAlways available to the agent
SKILL.md
3,128 tokensWhen the skill is activated
Reference documents
0 tokensLoaded on request
Token counts are estimates. Scripts run separately; they are not counted as reference context.
The playbook
- When to Use This Skill
- MCP Resources Available
- Related MCP Prompt
- Prerequisites
- Pre-Flight Checks
- Agent Decision Tree
- Diagnosis Workflow
- Output Format
- Common Patterns and Solutions
- Iterative Verification
- When to Stop and Ask the User
- Cross-References to Other Skills
- PostgreSQL Version Notes
- Important Notes
- Production Safety
Files
SKILL.mdcore13,058 bytes
Read SKILL.md
# PostgreSQL Slow Query Diagnosis
This skill guides systematic diagnosis and optimization of slow queries in PostgreSQL databases using the pgtuner-mcp server tools.
## When to Use This Skill
Use this skill when the user:
- Reports slow queries or poor query performance
- Asks "why is my query slow?" or "how can I speed up this query?"
- Wants to find and fix the top resource-consuming queries
- Mentions high query latency, timeouts, or slow API responses
- Asks to investigate `pg_stat_statements` data
View the complete source on GitHubpg-vacuum-tuning
When your agent uses it
Monitors and tunes PostgreSQL vacuum operations including autovacuum configuration, vacuum progress tracking, wraparound prevention, and per-table vacuum strategy. Provides tuning recommendations for high-churn OLTP and large analytical tables.
What it loads into context
Frontmatter
53 tokensAlways available to the agent
SKILL.md
3,437 tokensWhen the skill is activated
Reference documents
0 tokensLoaded on request
Token counts are estimates. Scripts run separately; they are not counted as reference context.
The playbook
- When to Use This Skill
- MCP Resources Available
- Related MCP Prompt
- Prerequisites
- Agent Decision Tree
- Vacuum Monitoring Workflow
- Tuning Recommendations
- Output Format
- Emergency Procedures
- Important Notes
- Iterative Verification
- When to Stop and Ask the User
- Cross-References to Other Skills
- PostgreSQL Version Notes
- Production Safety
Files
SKILL.mdcore13,590 bytes
Read SKILL.md
# 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 timeView the complete source on GitHubSkills included
- pg-bloat-analysis
- pg-config-tuning
- pg-connection-analysis
- pg-health-check
- pg-index-optimization
- pg-io-deep-dive
- pg-lock-diagnosis
- pg-performance-baseline
- pg-query-rewrite
- pg-slow-query-diagnosis
- pg-vacuum-tuning
Repository facts
- License
- Apache-2.0
- Created
- Nov 25, 2025
- Last pushed
- Jun 2, 2026
- Forks
- 5
- Open issues
- 1
- Project activity
- Slowing
Before you install
Instructions onlyAutomated signals, not a guarantee
Checked Nov 5, 2026
Not fully analyzed: some files were too long, unreadable or missing. This never lowers the level.
Show 3 notes
skills/pg-query-rewrite/SKILL.md:1Analysis incomplete: Referenced executable target unavailable; not analyzedskills/pg-query-rewrite/SKILL.md:1Analysis incomplete: Referenced executable target unavailable; not analyzedskills/pg-query-rewrite/SKILL.md:1Analysis incomplete: Referenced executable target unavailable; not analyzed
- No broad tool permissions
- No dangerous shell commands
- No network access
- No hidden or obfuscated text
- No instruction overrides
- No executable scripts
- No access to secrets
- No requests to vote in Hot
How the signals fit together
Facts from a static read of the files at the pinned commit. They describe what the code does, not why.
Some files could not be read; the facts below still hold.
No combined signals at this commit.
Works with
| Agent | Status | Evidence | Install to |
|---|---|---|---|
| Claude Code | Compatible | Standard SKILL.md skills/pg-bloat-analysis/SKILL.md | .claude/skills/<skill-name>/ |
| Codex | Compatible | Standard SKILL.md skills/pg-bloat-analysis/SKILL.md | .agents/skills/<skill-name>/ |
| Cursor | Compatible | Standard SKILL.md skills/pg-bloat-analysis/SKILL.md | .cursor/skills/<skill-name>/ |
| Gemini CLI | Compatible | Standard SKILL.md skills/pg-bloat-analysis/SKILL.md | .gemini/skills/<skill-name>/ |
| GitHub Copilot | Compatible | Standard SKILL.md skills/pg-bloat-analysis/SKILL.md | .github/skills/<skill-name>/ |
| OpenCode | Compatible | Standard SKILL.md skills/pg-bloat-analysis/SKILL.md | .opencode/skills/<skill-name>/ |
- Native The repository ships a manifest, folder or frontmatter field for this agent.
- Compatible A standard SKILL.md that this agent can read.
- Unknown No evidence either way.
Derived automatically from paths, manifests and frontmatter. Not tested on each agent.