Skip to main content
skill CX Codex GP ChatGPT official · OpenAI

supabase-postgres-best-practices · openai — Codex skill: how to install

Supabase guidelines for Postgres performance optimization. Helps developers write SQL queries, design database schemas, and configure RLS.

Install into Codex · Skills CLI (Vercel) All methods and platforms ↓
npx skills add openai/plugins --skill supabase-postgres-best-practices
npx skills add openai/plugins --skill supabase-best-practices -a codex
Open on GitHub

What supabase-postgres-best-practices does

This skill brings Postgres performance guidelines from Supabase directly to your coding assistant. The material covers 8 categories prioritized by impact, ranging from query bottlenecks and connection pooling to schema design and Row-Level Security.

Rules live in the references/ directory with category prefixes such as query- and schema-. Each entry includes an explanation, incorrect versus correct SQL snippets, and optional EXPLAIN metrics. Agents reference these files when writing raw queries, debugging locks, or reviewing migrations.

Install it if you write SQL directly and want automated checks against bad joins or unindexed filters. Teams relying strictly on basic ORM methods without custom database logic can skip it.

What it helps with

  • Detect slow SQL queries missing proper indexes
  • Configure database connection pooling
  • Design Row-Level Security policies for tables
  • Resolve locking conflicts during concurrent access

Example prompts for the agent

  • Check this SQL query against the query- rules to spot missing indexes
  • Help me set up RLS policies for my user table following Supabase practices
  • Review this EXPLAIN query plan and suggest optimizations

How to install supabase-postgres-best-practices

1Skills CLI (Vercel)

npx skills add openai/plugins --skill supabase-postgres-best-practices
npx skills add openai/plugins --skill supabase-best-practices -a codex

2Manually: put the files in place

.agents/skills/supabase-best-practices/SKILL.md

For all projects use ~/.agents/skills/

From the same set201

The whole set →
supabase official supabase Guides the agent through database configuration and strict RLS policies in Supabase. CX Codex GP ChatGPT 8installs remotion-render official Remotion Exports videos and static stills from Remotion projects using CLI commands. CX Codex GP ChatGPT 3installs figma-create-new-file official Figma Creates blank Figma, FigJam, or Slides files inside draft folders. It resolves planKey and editor types before invoking Figma MCP tools. CX Codex GP ChatGPT 6installs swiftui-performance-audit official OpenAI Pinpoints SwiftUI runtime issues like frame drops, unresponsive taps, and excessive view body computations. Works code-first and guides Instruments profiling. CX Codex GP ChatGPT 109installs swiftui-liquid-glass official OpenAI This skill helps build and review SwiftUI Liquid Glass interfaces for iOS 26+. Use it when adopting the API or checking fallbacks, interaction, and design fit. CX Codex GP ChatGPT 121installs swiftui-ui-patterns official OpenAI This skill helps build and refactor SwiftUI interfaces, from navigation and state to layouts and controls. Use it for new screens or changes to an existing project. CX Codex GP ChatGPT 114installs swiftui-view-refactor official OpenAI Refactors SwiftUI view files into clean, testable structures with dedicated subview types and proper Observation ownership. CX Codex GP ChatGPT 113installs ios-memgraph-leaks official OpenAI Captures and inspects iOS leaks from a simulator process or .memgraph. Useful for tracing retained objects and checking a fix with before-and-after evidence. CX Codex GP ChatGPT 1,054installs

Other versions of supabase-postgres-best-practices

Similar

sql-object-impact-analysis official github Traces dependencies on tables, columns, and stored procedures across SQL scripts and app code before schema changes. Useful for legacy codebases. GitHub Copilot 26installs pinecone-rag official github This skill guides Pinecone-based RAG pipelines and persistent agent memory. Use it for semantic document search, hybrid retrieval, or context shared across sessions. GitHub Copilot 24installs server-side-conversion-tracking official github This skill sets up server-side purchase reporting for Facebook, TikTok, Google, and Bing. Use it when ad platforms under-report conversions. GitHub Copilot 21installs migrating-oracle-to-postgres-data-access-code official github Moves .NET/C# data-access code from Oracle to PostgreSQL with Npgsql. Use it while migrating an application's code layer alongside its database. GitHub Copilot 10installs memory-engineering Alireza Rezvani This skill designs and audits agent memory, prices the write path, and enforces forgetting rules. Use it when a CLAUDE.md or memory store keeps growing. Claude Code 29installs xlsx official anthropics Creates, reads, edits, and converts spreadsheet files. Use it when the requested deliverable is an Excel workbook or another tabular file. Claude Code Claude.ai 187,223installs google-agents-cli-observability official Google This skill guides you through tracing and monitoring AI agents, including ADK agents. Use it when you need to inspect agent execution or monitor a deployed agent. Claude Code CX Codex Cursor +1 509,900installs caveman-evidence-review JuliusBrussee A read-only skill reviews Caveman Cloud evidence on LLM spend, traces, and routing. Use it to see where a project’s model budget goes. Claude Code CX Codex Cursor +1 103,500installs

Questions about supabase-postgres-best-practices

How do I install supabase-postgres-best-practices in Codex?

Run npx skills add openai/plugins --skill supabase-postgres-best-practices in your terminal. This downloads the skill files into your project.

What does this skill do?

It provides structured rules for inspecting SQL queries, missing indexes, connection pooling, and Row-Level Security policies.

How are the rule categories prioritized?

The guide organizes 8 categories by impact level. Query performance, connection management, and security take critical priority, while advanced features hold the lowest priority.

Source text

SKILL.md · MIT
---
name: supabase-postgres-best-practices
description: Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.
metadata:
  author: supabase
  version: "1.1.0"
  organization: Supabase
  date: January 2026
  abstract: Comprehensive Postgres performance optimization guide for developers using Supabase and Postgres. Contains performance rules across 8 categories, prioritized by impact from critical (query performance, connection management) to incremental (advanced features). Each rule includes detailed explanations, incorrect vs. correct SQL examples, query plan analysis, and specific performance metrics to guide automated optimization and code generation.
---

# 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

| 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:

```
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

- https://www.postgresql.org/docs/current/
- https://supabase.com/docs
- https://wiki.postgresql.org/wiki/Performance_Optimization
- https://supabase.com/docs/guides/database/overview
- https://supabase.com/docs/guides/auth/row-level-security

© supabase · MIT · openai/plugins

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor