# supabase-postgres-best-practices

> Official Supabase Postgres indexing, RLS policies, and query tuning

- **Publisher**: Supabase (Verified Publisher)
- **Upstream GitHub Repository**: https://github.com/supabase/agent-skills/tree/main/skills/supabase-postgres-best-practices
- **skills.sh Listing**: https://skills.sh/supabase/agent-skills/supabase-postgres-best-practices
- **License**: MIT
- **GitHub Stars**: 3,117
- **Canonical Web Page**: https://builderthread.dev/skill/supabase/agent-skills/supabase-postgres-best-practices
- **Parent Topic**: [supabase](https://builderthread.dev/skill/for/supabase.md)
- **Last Audited**: 2026-11-21
- **Supported Coding Agents**: Claude Code, Cursor, Codex, Windsurf

## Overview
Official MIT-licensed skill from supabase/agent-skills covering Postgres schema design, Row-Level Security performance, index selection, connection pooling, and safe migrations.

Inspect the full upstream `SKILL.md` source and license on GitHub before installing: https://github.com/supabase/agent-skills/tree/main/skills/supabase-postgres-best-practices

## Install Command
```bash
npx skills add supabase/agent-skills --skill supabase-postgres-best-practices
```

## When to Use This Skill
- Designing Postgres tables, indexes, and Row-Level Security policies on Supabase
- Diagnosing slow queries, missing FK indexes, or N+1 patterns
- Writing safe, reversible SQL migrations with the Supabase CLI

## Focus Areas
- Row-Level Security (RLS)
- Postgres indexing & EXPLAIN
- Connection pooling
- Zero-downtime migrations

## Upstream Package Files
- `skills/supabase-postgres-best-practices/SKILL.md`

---

## Ship With a Private Starter Repo, Living PRD & MCP Tasks

Builderthread pairs verified stack skills with a cited market brief, living PRD, private GitHub starter repo, and ordered MCP tasks for Claude Code, Cursor, and Codex.

- Supported languages: Rust, TypeScript, React Native (Expo), Python
- Starter stacks: Next.js SaaS, Hono API, FastAPI AI, Expo mobile, Tauri Rust desktop, WXT Chrome extension
- Start now: https://builderthread.dev/auth/signup
