davila7 avatar

Supabase Postgres Best Practices

A comprehensive ruleset from Supabase covering eight categories of Postgres optimization, from query performance and connection pooling to RLS security and schema design. Each rule includes side-by-side incorrect and correct SQL examples with explanations, so you're not just getting theory. The priority system is smart: it separates critical issues like missing indexes from lower-impact advanced features, which helps when you're triaging performance problems. Most useful when you're writing queries that need to scale or reviewing schema designs before they become production headaches. The fact that it's maintained by Supabase means it reflects real patterns they've seen cause problems at scale, not just textbook advice.

skills.sh installs
481
GitHub stars
33.2K
last updated
Aug 21, 2026

Install

$ npx -y skills add davila7/claude-code-templates --skill supabase-postgres-best-practices --agent claude-code

Installs into .claude/skills of the current project.

Files

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:

Sponsors

Details

Repository
github.com/davila7/claude-code-templates
Categories
Backend & APIs, Documentation, Debugging, Databases
First seen
Jun 3, 2026

More from davila7/claude-code-templates

All 618
1manutej avatardatabase-management-patternsmanutej/luxor-claude-marketplaceComprehensive guide for database management patterns covering PostgreSQL and MongoDB including schema design, indexing, transactions, replication, and performan467skills.sh installs
2davila7 avatarfrontend-to-backend-requirementsdavila7/claude-code-templatesDocument frontend data needs for backend developers. Use when frontend needs to communicate API requirements to backend, or user says 'backend requirements', 'w441skills.sh installs
3secondsky avatarapi-paginationsecondsky/claude-skillsImplements efficient API pagination using offset, cursor, and keyset strategies for large datasets. Use when building paginated endpoints, implementing infinite433skills.sh installs
4sanjay3290 avatarmysqlsanjay3290/ai-skillsExecute read-only SQL queries against multiple MySQL databases. Use when: (1) querying MySQL databases, (2) exploring database schemas/tables, (3) running SELEC430skills.sh installs
5jezweb avatarfirebase-firestorejezweb/claude-skillsBuild with Firestore NoSQL database - real-time sync, offline support, and scalable document storage. Use when: creating collections, querying documents, settin426skills.sh installs
6personamanagmentlayer avatarpostgresql-expertpersonamanagmentlayer/pclExpert-level PostgreSQL database administration, advanced queries, performance tuning, and production operations425skills.sh installs