db-postgres

Generate PostgreSQL schemas, queries, indexes, and replication configurations.

1|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/sitharaj88/claude-skills --skill db-postgres-sitharaj88
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-postgres
Source: https://github.com/sitharaj88/claude-skills/tree/main/skills/db-postgres
Command: npx skills add https://github.com/sitharaj88/claude-skills --skill db-postgres-sitharaj88

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps users design, optimize, and manage PostgreSQL databases, from initial schema creation to advanced performance tuning and high availability configurations.

Core Features & Use Cases

  • Schema Design: Generate robust and efficient SQL schemas with appropriate data types, constraints, and indexes.
  • Query Optimization: Analyze and improve query performance using EXPLAIN ANALYZE and best practices.
  • Performance Tuning: Provide recommendations for postgresql.conf settings and connection pooling.
  • High Availability: Assist with setting up replication, backups, and failover strategies.
  • Use Case: You need to design a new schema for a user authentication system, including UUID primary keys, email uniqueness constraints, and appropriate indexes for fast lookups.

Quick Start

Use the db-postgres skill to generate a schema for a blog with tables for posts, users, and comments.

Frequently Asked Questions about db-postgres

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

FAQPage Schema
How do I design a PostgreSQL schema with proper constraints and indexes?

PostgreSQL schema design involves generating tables with appropriate data types, primary keys, uniqueness constraints, and indexes. This process creates robust SQL structures for applications like user authentication, ensuring data integrity and fast query lookups.

How do I optimize slow PostgreSQL queries using EXPLAIN ANALYZE?

PostgreSQL query optimization uses EXPLAIN ANALYZE to evaluate execution plans and identify bottlenecks. By applying indexing best practices and restructuring queries, you can significantly improve database performance and reduce execution times.

What are the best PostgreSQL performance tuning settings for high availability?

PostgreSQL performance tuning involves adjusting postgresql.conf settings and configuring connection pooling to handle high traffic. Proper tuning combined with replication and failover strategies ensures database stability and maximum uptime.

Can I use PostgreSQL extensions like PostGIS and pg_trgm for advanced features?

PostgreSQL supports extensions like pg_trgm for trigram-based text search and PostGIS for geospatial data. Integrating these extensions enhances database capabilities, allowing complex spatial queries and advanced text matching operations.

When do I need PostgreSQL table partitioning for large datasets?

PostgreSQL partitioning is needed when managing large datasets that degrade query performance. By dividing tables into smaller, manageable partitions, you can improve query speed, simplify data maintenance, and optimize storage utilization.

Does PostgreSQL replication require specific configurations for backups and failover?

PostgreSQL replication requires configuring primary and standby servers, along with specific settings for backups and automated failover. Setting up these configurations correctly ensures data redundancy and continuous availability during server failures.