mcpField
S
supabase-postgres-best-practices

supabase-postgres-best-practices

github.com/makerjackieData & databases145 installsUpdated 36w ago
Repository

About supabase-postgres-best-practices

A Supabase-maintained skill offering prioritized guidance for PostgreSQL performance, schema design, security, and operations. It is intended for developers writing or reviewing database queries and designs, with rules supported by SQL examples.

Key features

  1. 01Prioritized rules across eight categories
  2. 02Query and index optimization guidance
  3. 03Connection and locking practices
  4. 04Security and Row-Level Security advice
  5. 05Schema and data access patterns
  6. 06SQL examples with explanations

Use cases

  1. 01Reviewing slow PostgreSQL queries
  2. 02Designing schemas and indexes
  3. 03Configuring connection pooling
  4. 04Checking Row-Level Security policies

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/makerjackie/jackie-skills-starter --skill supabase-postgres-best-practices

After installing, type/supabase-postgres-best-practicesin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

AGENTS.md
CLAUDE.md
references/
advanced-full-text-search.md
advanced-jsonb-indexing.md
conn-idle-timeout.md
conn-limits.md
conn-pooling.md
conn-prepared-statements.md
data-batch-inserts.md
data-n-plus-one.md
data-pagination.md
data-upsert.md
lock-advisory.md
lock-deadlock-prevention.md
lock-short-transactions.md
lock-skip-locked.md
monitor-explain-analyze.md
monitor-pg-stat-statements.md
monitor-vacuum-analyze.md
query-composite-indexes.md
query-covering-indexes.md
query-index-types.md
query-missing-indexes.md
query-partial-indexes.md
schema-constraints.md
schema-data-types.md
schema-foreign-key-indexes.md
schema-lowercase-identifiers.md
schema-partitioning.md
schema-primary-keys.md

Details

From the project README

(中文)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:

references/query-missing-indexes.md
references/schema-partial-indexes.md
references/_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)

References

Comments

Markdown supported