davila7/claude-code-templatesMIT37 files

Supabase Postgres Best Practices

Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.

Specification
Skill ID
davila7/claude-code-templates/supabase-postgres-best-practices
Publisher
davila7
Repository
claude-code-templates
Installs
0
Files
37
License
MIT
Synced
Sep 23, 2026
How to use it

Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.

davila7/claude-code-templates/supabase-postgres-best-practicesInstalls these files
  • AGENTS.md
  • README.md
  • SKILL.md
  • metadata.json
  • rules/_contributing.md
  • rules/_sections.md
  • rules/_template.md
  • rules/advanced-full-text-search.md
  • rules/advanced-jsonb-indexing.md
  • rules/conn-idle-timeout.md
  • rules/conn-limits.md
  • rules/conn-pooling.md
  • rules/conn-prepared-statements.md
  • rules/data-batch-inserts.md
  • rules/data-n-plus-one.md
  • rules/data-pagination.md
  • rules/data-upsert.md
  • rules/lock-advisory.md
  • rules/lock-deadlock-prevention.md
  • rules/lock-short-transactions.md
  • rules/lock-skip-locked.md
  • rules/monitor-explain-analyze.md
  • rules/monitor-pg-stat-statements.md
  • rules/monitor-vacuum-analyze.md
  • rules/query-composite-indexes.md
  • rules/query-covering-indexes.md
  • rules/query-index-types.md
  • rules/query-missing-indexes.md
  • rules/query-partial-indexes.md
  • rules/schema-data-types.md
  • rules/schema-foreign-key-indexes.md
  • rules/schema-lowercase-identifiers.md
  • rules/schema-partitioning.md
  • rules/schema-primary-keys.md
  • rules/security-privileges.md
  • rules/security-rls-basics.md
  • rules/security-rls-performance.md

What this skill tells the agent

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:

  • Writing SQL queries or designing schemas
  • Implementing indexes or query optimization
  • Reviewing database performance issues
  • Configuring connection pooling or scaling
  • Optimizing for Postgres-specific features
  • Working with Row-Level Security (RLS)

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Query PerformanceCRITICALquery-
2Connection ManagementCRITICALconn-
3Security & RLSCRITICALsecurity-
4Schema DesignHIGHschema-
5Concurrency & LockingMEDIUM-HIGHlock-
6Data Access PatternsMEDIUMdata-
7Monitoring & DiagnosticsLOW-MEDIUMmonitor-
8Advanced FeaturesLOWadvanced-

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:

  • Brief explanation of why it matters
  • Incorrect SQL example with explanation
  • Correct SQL example with explanation
  • Optional EXPLAIN output or metrics
  • Additional context and references
  • Supabase-specific notes (when applicable)

Full Compiled Document

For the complete guide with all rules expanded: AGENTS.md

Use this skill in a project

Open any RiverX project, search the Skills panel for davila7/claude-code-templates/supabase-postgres-best-practices, and install it in one click.

Use this skill