supabase-postgres-best-practices
Postgres best practices maintained by Supabase, for Postgres running anywhere.
Skill by supabase
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/dimon94-supabase-postgres-best-practices
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, backend, data, security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
supabase-postgres-best-practices- Description
- 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 exhaustion, locking, bloat, or rows visible to the wrong user or tenant. This is not just a performance guide — schema, migration, security, and SQL authoring tasks need these rules too, even for a one-column change or a single query.
- License
- MIT
- Metadata
- date: January 2026 · author: supabase · version: 1.1.1 · 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. · organization: Supabase
- Instructions
- 54 lines in SKILL.md · view on GitHub
Files (36)
- CHANGELOG.md
- SKILL.md
- _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 · references/
- query-composite-indexes.md · references/
- query-covering-indexes.md · references/
- query-index-types.md · references/
- query-missing-indexes.md · references/
- query-partial-indexes.md · references/
- schema-constraints.md · references/
- schema-data-types.md · references/
- schema-foreign-key-indexes.md · references/
- schema-lowercase-identifiers.md · references/
- schema-partitioning.md · references/
- schema-primary-keys.md · references/
- security-privileges.md · references/
- security-rls-basics.md · references/
- security-rls-performance.md · references/
SKILL.md (first lines)
# 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-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
From Dimon94/skills, MIT.
More from Dimon94/skills
- 0.771score
git-commit
Dimon94
Create narrow auditable local commits.
SkillAFreshness: A★ 107Claude Code +9 - 0.771score
git-push-pr
Dimon94
Push a verified branch and create or update exactly one GitHub pull request.
SkillAFreshness: A★ 107Claude Code +9 - 0.770score
epic-planner
Dimon94
为模糊的史诗需求启动或续接战略寻路。先建立目标、迷雾与 Issue 决策票,通过内部调研、外部研究、原型和拷问厘清战略,之后形成多地图 epic-plan。
SkillAFreshness: A★ 107Claude Code +9 - 0.770score
sync-upstream-skills
Dimon94
检查或更新本仓精选的第三方套件 Skill 快照。用于核对上游变化、刷新快照或处理同步漂移;只读检查可直接运行,写入更新必须由用户明确要求。
SkillAFreshness: A★ 107Claude Code +9 - 0.770score
vertical-slicing
Dimon94
把大 spec、地图或单张票切成能逐片合入、部署、体验的垂直切片,或审查现有拆票是否垂直。用于用户显式调用 /vertical-slicing 或 $vertical-slicing。
SkillAFreshness: A★ 107Claude Code +9 - 0.768score
gh-merge-pr
Dimon94
审查并在独立授权后合并一个 GitHub PR。用于单 PR 的 current-head SubAgent Review、按证据调用专项 Review、落地与 parity readback;裸分支或缺失 PR 转交 git-push-pr。
SkillAFreshness: A★ 107Claude Code +9 - 0.764score
investigate
Dimon94
只读调研本仓代码与历史,产出带引用的解释或方案推荐。用于「调研 / investigate」「搞清楚 X」「A 还是 B」「确定吗」类请求;机制走 how,动机叠加 why,不改代码。
SkillAFreshness: A★ 107Claude Code +9 - 0.764score
no-comments
Dimon94
清理无用注释,保留必要的外部约束与公开合同,并从根因消除注释掩盖的绕路代码。用于用户显式调用 /no-comments 或 $no-comments。
SkillAFreshness: A★ 107Claude Code +9 - 0.731score
productionize-app-with-services
Dimon94
Productize a working prototype by adding a bounded set of explicitly requested operational or product services.
SkillBFreshness: B★ 107Claude Code +9 - 0.727score
postmortem
Dimon94
Recall or record confirmed reusable failure lessons.
SkillBFreshness: B★ 107Claude Code +9 - 0.725score
git-rebase-main
Dimon94
Land a finished branch on local main with linear history — commit pending work, commit main's own dirt first, rebase onto main, fast-forward main.
SkillBFreshness: B★ 107Claude Code +9 - 0.725score
do-not-repeat-yourself
Dimon94
Find and reuse the nearest correct mechanism before adding another.
SkillBFreshness: B★ 107Claude Code +9
Signals
- Stars
- 107
- Forks
- 21
- Open issues
- 11
- Last commit (this folder)
- Sep 4, 2026 (1 month ago)
- Last release
- Jul 14, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 1.1.1
- License
- MIT
- Repository
- github.com/Dimon94/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.771score
supabase-postgres-best-practices
supabaseOfficial
Postgres best practices maintained by Supabase, for Postgres running anywhere.
SkillAFreshness: A★ 2.9KClaude Code +9 - 0.371score
supabase-postgres-best-practices
supabase
Postgres best practices maintained by Supabase, for Postgres running anywhere.
SkillBFreshness: B★ 980Claude Code +9 - 0.322score
supabase-postgres-best-practices
supabase
Postgres best practices maintained by Supabase, for Postgres running anywhere.
SkillAFreshness: A★ 1Claude Code +9 - 0.322score
supabase-postgres-best-practices
supabase
Postgres best practices maintained by Supabase, for Postgres running anywhere.
SkillAFreshness: A★ 1Claude Code +9 - 0.309score
supabase-postgres-best-practices
supabase
Postgres best practices maintained by Supabase, for Postgres running anywhere.
SkillAFreshness: AClaude Code +9 - 0.309score
supabase-postgres-best-practices
supabase
Postgres best practices maintained by Supabase, for Postgres running anywhere.
SkillAFreshness: AClaude Code +9 - 0.309score
supabase-postgres-best-practices
supabase
Postgres best practices maintained by Supabase, for Postgres running anywhere.
SkillAFreshness: AClaude Code +9 - 0.309score
supabase-postgres-best-practices
supabase
Postgres best practices maintained by Supabase, for Postgres running anywhere.
SkillAFreshness: AClaude Code +9 - 0.304score
supabase-postgres-best-practices
supabase
Postgres best practices maintained by Supabase, for Postgres running anywhere.
SkillBFreshness: B★ 2Claude Code +9 - 0.285score
supabase-postgres-best-practices
supabase
Postgres best practices maintained by Supabase, for Postgres running anywhere.
SkillBFreshness: BClaude Code +9 - 0.285score
supabase-postgres-best-practices
supabase
Postgres best practices maintained by Supabase, for Postgres running anywhere.
SkillBFreshness: BClaude Code +9 - 0.285score
supabase-postgres-best-practices
supabase
Postgres best practices maintained by Supabase, for Postgres running anywhere.
SkillBFreshness: BClaude Code +9
More from supabase
- 0.810score
supabase
supabaseOfficial
Use when doing ANY task involving Supabase.
SkillAFreshness: A★ 2.9KClaude Code +9 - 0.771score
supabase-postgres-best-practices
supabaseOfficial
Postgres best practices maintained by Supabase, for Postgres running anywhere.
SkillAFreshness: A★ 2.9KClaude Code +9 - 0.717score
AGENTS.md · supabase/supabase
supabase
AGENTS.md from supabase/supabase: 76 lines covering Structure, Common Commands, CI, Conventions and more.
TemplateAFreshness: A★ 113.9KCodex +5 - 0.633score
supabase-postgres-best-practices
supabase
Postgres performance optimization and best practices from Supabase.
SkillAFreshness: A★ 195Claude Code +9 - 0.595score
AGENTS.md · supabase/agent-skills
supabase
AGENTS.md from supabase/agent-skills: 228 lines covering Prerequisites, Repository Structure, Commands, Releases and more.
TemplateAFreshness: A★ 2.9KCodex +5 - 0.572score
supabase
supabase
Use when doing ANY task involving Supabase.
SkillBFreshness: B★ 12Claude Code +9
Cite this page
supabase-postgres-best-practices skill. Agent Mart. https://agentmart.dev/skills/dimon94-supabase-postgres-best-practices (last updated 2026-10-24)