
Supabase postgres best practices
Postgres best practices maintained by Supabase, for Postgres running anywhere
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 3.1K
- Last commit
- 5 days ago
- License
- MIT
- Listing updated
- today
When your agent uses it
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.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 36 files (61 KB) on GitHub on 17 November 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Install
This skill ships in the postgres-best-practices plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add supabase/agent-skills
/plugin install postgres-best-practices@supabase-agent-skillsOr copy only this skill to ~/.claude/skills/supabase-postgres-best-practices:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/supabase/agent-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/supabase-postgres-best-practices &&
cp -R "$tmp/skills/supabase-postgres-best-practices" ~/.claude/skills/supabase-postgres-best-practices &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/supabase-postgres-best-practices inside it instead.
Copy the skill folder to ~/.agents/skills/supabase-postgres-best-practices to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/supabase/agent-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/supabase-postgres-best-practices &&
cp -R "$tmp/skills/supabase-postgres-best-practices" ~/.agents/skills/supabase-postgres-best-practices &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/supabase-postgres-best-practices inside it instead.
Copy the skill folder to ~/.cursor/skills/supabase-postgres-best-practices to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/supabase/agent-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/supabase-postgres-best-practices &&
cp -R "$tmp/skills/supabase-postgres-best-practices" ~/.cursor/skills/supabase-postgres-best-practices &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/supabase-postgres-best-practices inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/supabase/agent-skills.git --path skills/supabase-postgres-best-practicesOr copy the folder to ~/.gemini/skills/supabase-postgres-best-practices yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/supabase-postgres-best-practices:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/supabase/agent-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/supabase-postgres-best-practices &&
cp -R "$tmp/skills/supabase-postgres-best-practices" ~/.copilot/skills/supabase-postgres-best-practices &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/supabase-postgres-best-practices inside it instead.
Get the folder:
git clone --depth 1 https://github.com/supabase/agent-skills.gitThen copy agent-skills/skills/supabase-postgres-best-practices into your agent's skills folder as supabase-postgres-best-practices. Agents that support SKILL.md read one folder per skill.
Supabase postgres best practices FAQ
How do I install Supabase postgres best practices in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/supabase-postgres-best-practices to use it in all your projects, or to .claude/skills/supabase-postgres-best-practices in one project. Or install the postgres-best-practices plugin, which includes it: /plugin marketplace add supabase/agent-skills, then /plugin install postgres-best-practices@supabase-agent-skills.
Does Supabase postgres best practices run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Supabase postgres best practices?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Supabase postgres best practices?
The closest alternatives to Supabase postgres best practices are Bigquery pipeline audit, SQL server table reconciliation, Postgresql optimization, Pinecone rag and Supabase rls policies.
More from supabase/agent-skills
Alternatives to Supabase postgres best practices

Audits Python + BigQuery pipelines for cost safety, idempotency, and production readiness
- Open source
- 41.3K GitHub stars
- Databases

Use when: comparing SQL Server tables across instances, data migration validation, ETL verification, row mismatch detection, schema drift, r
- Open source
- 41.3K GitHub stars
- Databases

PostgreSQL-specific development assistant focusing on unique PostgreSQL features, advanced data types, and PostgreSQL-exclusive capabilities
- Open source
- 41.3K GitHub stars
- Databases

Pinecone rag
SkillBuild production RAG pipelines and persistent agent memory using Pinecone as the vector database backend
- Open source
- 41.3K GitHub stars
- Knowledge and memory

Write, review, and test Supabase Row Level Security (RLS) policies so that one user cannot read or change another user's rows
- Open source
- 41.3K GitHub stars
- Databases

Create, alter, and validate Snowflake semantic views using Snowflake CLI (snow)
- Open source
- 41.3K GitHub stars
- Databases
