postgres-best-practices

Apply PostgreSQL and Supabase best practices for query optimization, indexing, RLS policies, and diagnostics.

33|6|Updated Jan 2, 2026
One-click install
npx skills add https://github.com/dirnbauer/webconsulting-skills --skill postgres-best-practices
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres-best-practices
Source: https://github.com/dirnbauer/webconsulting-skills/tree/main/skills/postgres-best-practices
Command: npx skills add https://github.com/dirnbauer/webconsulting-skills --skill postgres-best-practices

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill consolidates best practices for PostgreSQL performance optimization, reliable configuration, and secure data access to help AI agents guide database improvements and troubleshooting.

Core Features & Use Cases

  • Performance optimization guidelines for queries, indexing, and configuration.
  • RLS and security best practices for multi-tenant data and access control.
  • Connection management and diagnostics, including monitoring and tuning settings.
  • Practical usage across Postgres and Supabase deployments with real-world scenarios.

Quick Start

Generate a prioritized Postgres optimization plan for your database, focusing on query performance, indexing strategies, RLS policies, and connection management.

Frequently Asked Questions about postgres-best-practices

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

FAQPage Schema
How do I optimize slow PostgreSQL queries in a Supabase deployment?

To optimize slow PostgreSQL queries, apply structured best practices for query optimization and indexing strategies. This approach provides concrete guidance on index strategies and reproducible monitoring steps to resolve performance bottlenecks in Supabase deployments.

What are the best practices for writing PostgreSQL RLS policies for multi-tenant data?

PostgreSQL RLS policies for multi-tenant data should follow secure access control patterns. Best practices enforce concrete guidance on RLS policy design to ensure reliable data isolation and secure multi-tenant configurations without degrading query performance.

How do I create a PostgreSQL index strategy that improves query performance?

Creating a PostgreSQL index strategy involves applying concrete guidance on index selection and safe configuration changes. Following proven indexing best practices effectively boosts query optimization and resolves database performance issues.

Does this approach work for both standard PostgreSQL and Supabase deployments?

Yes, this approach works for both standard PostgreSQL and Supabase deployments. It provides practical usage scenarios and reliable configuration guidelines that apply across both environments to help guide database improvements and troubleshooting.

How do I manage database connections and monitor PostgreSQL performance diagnostics?

Managing connections and monitoring PostgreSQL performance requires tuning settings and applying diagnostics. Best practices include enforcing safe configuration changes and reproducible monitoring steps to track query optimization and maintain reliable database connections.