postgres-expert

Optimize PostgreSQL queries, indexing, schema design, and database administration.

4|1|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/aegntic/clawreform --skill postgres-expert-aegntic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres-expert
Source: https://github.com/aegntic/clawreform/tree/main/crates/clawreform-skills/bundled/postgres-expert
Command: npx skills add https://github.com/aegntic/clawreform --skill postgres-expert-aegntic

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps users optimize PostgreSQL database performance by providing expert advice on query tuning, indexing strategies, schema design, and general database administration.

Core Features & Use Cases

  • Query Optimization: Analyzes query plans and suggests improvements for efficiency.
  • Indexing Strategies: Recommends appropriate index types (B-tree, GIN, GiST, BRIN) based on access patterns.
  • Schema Design: Guides on normalization and denormalization trade-offs.
  • Database Administration: Offers best practices for vacuuming, analyzing, and connection pooling.
  • Use Case: A developer struggling with slow-running reports can use this Skill to identify bottlenecks and implement effective indexing and query rewrites.

Quick Start

Analyze the query plan for the following SQL statement: EXPLAIN (ANALYZE, BUFFERS) SELECT * FROM users WHERE email LIKE '%.com';

Frequently Asked Questions about postgres-expert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize PostgreSQL query performance for slow-running analytical reports?

To optimize slow PostgreSQL queries, analyze the execution plan using EXPLAIN (ANALYZE, BUFFERS) to identify bottlenecks, then apply appropriate indexing strategies and rewrite the query for efficient data retrieval.

What is the best PostgreSQL index type for my database access patterns?

The best PostgreSQL index type depends on your access patterns: B-tree for standard equality and range queries, GIN for semi-structured data like JSON, GiST for geometric data, and BRIN for large tables with naturally ordered data.

How do I design a PostgreSQL schema for high-throughput transactional workloads?

Designing a PostgreSQL schema for high-throughput transactional workloads involves balancing normalization for data integrity with strategic denormalization to reduce join overhead, ensuring scalable database performance under heavy load.

Why does my PostgreSQL query plan show a sequential scan instead of an index scan?

A PostgreSQL query plan shows a sequential scan instead of an index scan when the optimizer calculates that scanning the entire table is cheaper, often due to missing indexes, outdated table statistics, or queries returning a large percentage of rows.

What are the best practices for PostgreSQL database administration and vacuuming?

PostgreSQL database administration best practices include routinely running VACUUM and ANALYZE to reclaim storage and update table statistics, alongside configuring connection pooling to manage high-throughput workloads efficiently.

Can I use PostgreSQL optimization techniques for semi-structured data retrieval?

Yes, PostgreSQL optimization techniques support semi-structured data retrieval by utilizing specialized indexing strategies like GIN indexes to efficiently query JSON or other semi-structured formats within the relational database.