skill-database-postgresql

Provide PostgreSQL best practices for schema design, indexing, transactions, and connection pooling.

4|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/ryan-nguyen-01/agent-platform --skill skill-database-postgresql
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: skill-database-postgresql
Source: https://github.com/ryan-nguyen-01/agent-platform/tree/main/.claude/skills/skill-database-postgresql
Command: npx skills add https://github.com/ryan-nguyen-01/agent-platform --skill skill-database-postgresql

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PostgreSQL database design and performance often suffer from poor schema design, missing or suboptimal indexes, inefficient queries, unoptimized transactions, and unmanaged connection pools. This skill provides best practices to design scalable schemas, apply effective indexing strategies, optimize queries, ensure reliable transactions, and configure connections for production workloads.

Core Features & Use Cases

  • Schema Design Guidelines: Normalize appropriately, use appropriate data types, create meaningful constraints and foreign keys, and plan for migrations.
  • Indexing & Query Optimization: Choose right index types, build composite and partial indexes, and optimize common query patterns with explain plans.
  • Transactions & Pooling: Implement safe transactional boundaries and configure connection pooling for high-concurrency apps.
  • Use Case: A SaaS app with growing user data can benefit from a well-designed schema, proper indexing, and robust transaction handling to maintain performance and data integrity at scale.

Quick Start

Design a robust PostgreSQL schema and indexing plan for a new app and optimize a sample query.

Frequently Asked Questions about skill-database-postgresql

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

FAQPage Schema
How do I optimize PostgreSQL queries and indexing for a growing SaaS application?

PostgreSQL query optimization requires choosing the right index types, building composite and partial indexes, and analyzing query patterns using explain plans to maintain performance as your application's user data grows.

What are the best practices for PostgreSQL schema design and migrations?

PostgreSQL schema design best practices involve normalizing appropriately, selecting correct data types, defining meaningful constraints and foreign keys, and planning ahead for database migrations to ensure scalable data architecture.

How do I handle PostgreSQL transactions and connection pooling for high-concurrency apps?

PostgreSQL transaction handling and connection pooling require implementing safe transactional boundaries and configuring connection pools specifically to support reliable high-concurrency application workloads in production environments.

What causes slow PostgreSQL performance in data-intensive applications?

Slow PostgreSQL performance in data-intensive applications is typically caused by poor schema design, missing or suboptimal indexes, inefficient queries, unoptimized transactions, and unmanaged connection pools.

When should I use composite or partial indexes in PostgreSQL?

Composite and partial indexes in PostgreSQL should be used when optimizing common query patterns, allowing you to target specific columns and conditions to significantly reduce query execution time and improve database scalability.