Agent skill · Databases

supabase-postgres-best-practices

Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pg_cron, pgmq), vector/semantic search (pgvector), and restoring dumps (pg_restore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection

guanyanggithub.com/guanyangGitHub ↗
claude-codeMIT
Install
npx skills add guanyang/open-agent-hub --skill supabase-postgres-best-practices --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 40
SKILL.md size: 3 KB
Bundled scripts: none
Version: 1.1.1
Declared author: supabase
Path: skills/supabase-postgres-best-practices/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 940
Language: TypeScript

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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/query-partial-i

What's inside
Steps it walks through
  1. When to Apply
  2. Rule Categories by Priority
  3. How to Use
  4. References
Ships with 24 files
  • AGENTS.md
  • CHANGELOG.md
  • CLAUDE.md
  • README.md
  • references/_contributing.md
  • references/_sections.md
  • references/_template.md
  • references/advanced-full-text-search.md
  • references/advanced-jsonb-indexing.md
  • references/conn-idle-timeout.md
  • references/conn-limits.md
  • references/conn-pooling.md
  • references/conn-prepared-statements.md
  • references/data-batch-inserts.md
  • references/data-n-plus-one.md
  • references/data-pagination.md
  • references/data-upsert.md
  • references/lock-advisory.md
  • references/lock-deadlock-prevention.md
  • references/lock-short-transactions.md
  • references/lock-skip-locked.md
  • references/monitor-explain-analyze.md
  • references/monitor-pg-stat-statements.md
  • references/monitor-vacuum-analyze.md
first 24 of 40
More from open-agent-hub
All skills →
About this skill
What does the supabase-postgres-best-practices skill do?

Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pg_cron, pgmq), vector/semantic search (pgvector), and restoring dumps (pg_restore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection

How do I install it?

Run `npx skills add guanyang/open-agent-hub --skill supabase-postgres-best-practices --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From guanyang/open-agent-hub, a repository with 940 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going