This is what you reach for when you're knee-deep in PostgreSQL performance issues or setting up replication. It walks you through the full cycle: EXPLAIN ANALYZE to find bottlenecks, creating the right indexes (B-tree, GIN, GiST, BRIN), verifying the planner actually uses them, then monitoring with pg_stat views. The coverage is solid on JSONB operations, VACUUM tuning for high-churn tables, and both streaming and logical replication setup. What I appreciate is the emphasis on verification at every step, especially the "must use EXPLAIN before and after" rule and CREATE INDEX CONCURRENTLY to avoid production locks. The reference guides break out by topic (performance, JSONB, extensions, maintenance) so you're not wading through everything at once.

skills.sh installs
8.2K
GitHub stars
12.3K
last updated
Aug 21, 2026

Install

$ npx -y skills add jeffallan/claude-skills --skill postgres-pro --agent claude-code

Installs into .claude/skills of the current project.

Files

PostgreSQL Pro

Senior PostgreSQL expert with deep expertise in database administration, performance optimization, and advanced PostgreSQL features.

When to Use This Skill

  • Analyzing and optimizing slow queries with EXPLAIN
  • Implementing JSONB storage and indexing strategies
  • Setting up streaming or logical replication
  • Configuring and using PostgreSQL extensions
  • Tuning VACUUM, ANALYZE, and autovacuum
  • Monitoring database health with pg_stat views
  • Designing indexes for optimal performance

Core Workflow

  1. Analyze performance — Run EXPLAIN (ANALYZE, BUFFERS) to identify bottlenecks
  2. Design indexes — Choose B-tree, GIN, GiST, or BRIN based on workload; verify with EXPLAIN before deploying
  3. Optimize queries — Rewrite inefficient queries, run ANALYZE to refresh statistics
  4. Setup replication — Streaming or logical based on requirements; monitor lag continuously
  5. Monitor and maintain — Track VACUUM, bloat, and autovacuum via pg_stat views; verify improvements after each change

End-to-End Example: Slow Query → Fix → Verification

Sponsors

Details

Repository
github.com/jeffallan/claude-skills
Categories
Backend & APIs, DevOps & CI/CD, Documentation, Debugging, Databases

More from jeffallan/claude-skills

All 66
1elevenlabs avatarspeech-engineelevenlabs/skillsAdd real-time voice conversations to a custom agent runtime with ElevenLabs Speech Engine. Use when building Speech Engine servers, WebSocket handlers, WebRTC b8.2Kskills.sh installs
2clickhouse avatarchdb-datastoreclickhouse/agent-skillsUse when the user has tabular data (pandas DataFrame, parquet, csv, Arrow, json) and wants to filter, group, aggregate, join, or speed up slow pandas. Provides 8.1Kskills.sh installs
3shubhamsaboo avatarfullstack-developershubhamsaboo/awesome-llm-appsModern web development expertise covering React, Node.js, databases, and full-stack architecture. Use when: building web applications, developing APIs, creating7.9Kskills.sh installs
4google avatarworkload-manager-basicsgoogle/skillsUse this skill to manage Google Cloud Workload Manager evaluations, rules, scanned resources, and validation results by using public client libraries and the RE7.9Kskills.sh installs
5okx avatarokx-dex-signalokx/onchainos-skillsUse this skill for smart-money/whale/KOL/大户 activity tracking, aggregated buy signal/信号 alerts, and leaderboard/牛人榜 rankings. Covers: (1) address tracker — raw 7.6Kskills.sh installs
6affaan-m avatarsecurity-reviewaffaan-m/eccUse this skill when adding authentication, handling user input, working with secrets, creating API endpoints, or implementing payment/sensitive features. Provid7.6Kskills.sh installs