Postgres best practices

From frank-luongt/faos-skills-marketplace · View interactive version

Postgres best practices is an AI agent skill from the GitHub repository frank-luongt/faos-skills-marketplace. Postgres performance optimization and best practices from Supabase covering indexing, connection management, RLS, schema design, and query tuning. Use when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.

How to use this skill

Skill file

<!-- AUTO-GENERATED by export-plugins.py — DO NOT EDIT -->


name: postgres-best-practices

description: Postgres performance optimization and best practices from Supabase covering indexing, connection management, RLS, schema design, and query tuning. Use when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.

tags: [postgres, database, sql, optimization]


Supabase Postgres Best Practices

Comprehensive performance optimization guide for Postgres, maintained by Supabase. Contains rules across 8 categories, prioritized by impact to guide automated query optimization and schema design.

When to Apply

Reference these guidelines when:

Rule Categories by Priority

| Priority | Category | Impact | Prefix |

|----------|----------|--------|--------|

| 1 | Query Performance | CRITICAL | query- |

| 2 | Connection Management | CRITICAL | conn- |

| 3 | Security & RLS | CRITICAL | security- |

| 4 | Schema Design | HIGH | schema- |

| 5 | Concurrency & Locking | MEDIUM-HIGH | lock- |

| 6 | Data Access Patterns | MEDIUM | data- |

| 7 | Monitoring & Diagnostics | LOW-MEDIUM | monitor- |

| 8 | Advanced Features | LOW | advanced- |

How to Use

Read individual rule files for detailed explanations and SQL examples:

rules/query-missing-indexes.md
rules/schema-partial-indexes.md
rules/_sections.md

Each rule file contains:

Full Compiled Document

For the complete guide with all rules expanded, see: references/postgres-rules.md

<!-- Source: .faos/custom/skills/data/postgres-best-practices/SKILL.md -->

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.