# Supabase Postgres Best Practices

[BASE product page](<https://base.akulich.dev/en/library/skill-supabase-postgres-best-practices/>) · [Resource](<https://github.com/supabase/agent-skills/tree/main/skills/supabase-postgres-best-practices>)

ID: skill\-supabase\-postgres\-best\-practices · Language: en
Schema version: 1 · Data version: cbbe7123b47a5ae80983

This is editorial data. An unknown field neither confirms nor rules out a capability.
dataVersion is a dataset fingerprint, not evidence of a recent fact check.

A ready\-made skill for generating and reviewing PostgreSQL: schemas, migrations, indexes, RLS, connection pools, locking, and EXPLAIN\. Applies to PostgreSQL in any environment, not only Supabase\.

## Type

Skill

## Entry type

skill

## Separate catalog

No

## [Access conditions](<https://base.akulich.dev/en/library/skill-supabase-postgres-best-practices/#resource-access>)

free

## [What you can use for free](<https://base.akulich.dev/en/library/skill-supabase-postgres-best-practices/#resource-access>)

The skill is free under MIT\.

## [Access and limitations](<https://base.akulich.dev/en/library/skill-supabase-postgres-best-practices/#resource-access>)

The skill is free under MIT\. Execution checks require an available PostgreSQL database; a local database is possible\. Supabase Cloud is optional and has its own pricing\.

## [Use cases](<https://base.akulich.dev/en/library/skill-supabase-postgres-best-practices/#resource-tasks>)

- Review SQL and a migration before running them
- Resolve a slow query and connection shortages
- Check user data isolation through RLS

## Tech stack

- PostgreSQL

## Category IDs

- skills
- backend
- quality

## Subcategory IDs

- skills\.platforms
- backend\.databases
- quality\.performance
- quality\.security

## Tags

- PostgreSQL
- RLS
- SQL
- EXPLAIN

## [Selection purpose](<https://base.akulich.dev/en/library/skill-supabase-postgres-best-practices/#resource-selection>)

Review SQL and a migration before running them

## [Choose this when](<https://base.akulich.dev/en/library/skill-supabase-postgres-best-practices/#resource-selection>)

- Review SQL and a migration before running them
- Resolve a slow query and connection shortages
- Check user data isolation through RLS

## [Requirements](<https://base.akulich.dev/en/library/skill-supabase-postgres-best-practices/#resource-selection>)

- The entire skill directory with references is required, not just the instruction file\.
- Keep references together with SKILL\.md; individual SQL rules are read separately, including incorrect/correct examples\.

## [Limitations](<https://base.akulich.dev/en/library/skill-supabase-postgres-best-practices/#resource-selection>)

- Access terms: The skill is free under MIT\. Execution checks require an available PostgreSQL database; a local database is possible\. Supabase Cloud is optional and has its own pricing\.
- Terms of use: MIT
- The entire skill directory with references is required, not just the instruction file\.
- PostgreSQL rules also apply outside Supabase; Supabase\-specific notes are labeled separately, and listing metrics does not prove your database has become faster\.

## [Questions before use](<https://base.akulich.dev/en/library/skill-supabase-postgres-best-practices/#resource-faq>)

### What can you use for free in Supabase Postgres Best Practices?

The skill is free under MIT\.

### What are the access terms for Supabase Postgres Best Practices?

The skill is free under MIT\. Execution checks require an available PostgreSQL database; a local database is possible\. Supabase Cloud is optional and has its own pricing\.

### What do you need to use Supabase Postgres Best Practices?

The entire skill directory with references is required, not just the instruction file\.

### Which environment can you use Supabase Postgres Best Practices in?

Tech stack: PostgreSQL\.

### How do you get started with Supabase Postgres Best Practices?

For the task “Review SQL and a migration before running them”: submit a bounded section for review with its context and criteria\. Assess findings by impact; confirm each issue in the code or a reproducible example\. Fix confirmed causes and repeat the same check on the changed result\.

### What should you consider when choosing Supabase Postgres Best Practices?

The current name in SKILL\.md is supabase\-postgres\-best\-practices\.

### Is this only an indexing guide?

No\. The eight categories include query performance, connections, Security/RLS, schema, concurrency/locking, access patterns, monitoring, and advanced features\.

### How should a rule be chosen for slow SQL?

Categories are ordered by impact; references contain an explanation, incorrect and corrected SQL, and sometimes EXPLAIN and context\. Your database's specific plan must be checked separately\.

## Sources for the selection guide

- [https://github\.com/supabase/agent\-skills/tree/main/skills/supabase\-postgres\-best\-practices](<https://github.com/supabase/agent-skills/tree/main/skills/supabase-postgres-best-practices>)
- [https://github\.com/supabase/agent\-skills/blob/main/skills/supabase\-postgres\-best\-practices/SKILL\.md](<https://github.com/supabase/agent-skills/blob/main/skills/supabase-postgres-best-practices/SKILL.md>)
- [https://github\.com/supabase/agent\-skills/blob/main/LICENSE](<https://github.com/supabase/agent-skills/blob/main/LICENSE>)
- [https://raw\.githubusercontent\.com/supabase/agent\-skills/HEAD/skills/supabase\-postgres\-best\-practices/SKILL\.md](<https://raw.githubusercontent.com/supabase/agent-skills/HEAD/skills/supabase-postgres-best-practices/SKILL.md>)

## [Possible workflow](<https://base.akulich.dev/en/library/skill-supabase-postgres-best-practices/#resource-scenario>)

Example workflow with Supabase Postgres Best Practices: Review SQL and a migration before running them\.

A possible workflow; this is not a report of hands-on testing.

## Before you start

- A diff or a small section of code, and a description of the expected behavior\.
- The tech stack version and a reproducible example of the issue or a baseline measurement\.
- From the tech stack mentioned on this page, choose an option that suits your project: PostgreSQL; check version compatibility in the documentation\.

## Steps

1. For the task “Review SQL and a migration before running them”: submit a bounded section for review with its context and criteria\.
2. Assess findings by impact; confirm each issue in the code or a reproducible example\.
3. Fix confirmed causes and repeat the same check on the changed result\.

## Check your result

- Findings identify a specific cause and consequence; unconfirmed assumptions are kept separate\.
- The improvement is measured or confirmed through behavior; recommendations match the project's version\.

## [License](<https://base.akulich.dev/en/library/skill-supabase-postgres-best-practices/#resource-license>)

MIT

## License explanations for the specified scope

### MIT — permissive license

You can use, modify, distribute, and sell the code, including in a closed\-source commercial product\. When sharing copies or substantial portions of the code, retain the license text and copyright notice\. You do not need to open\-source your entire project; the author provides no warranties\.

[License terms](<https://opensource.org/license/mit>)

## [Usage details](<https://base.akulich.dev/en/library/skill-supabase-postgres-best-practices/#resource-notes>)

The current name in SKILL\.md is supabase\-postgres\-best\-practices\. The entire skill directory with references is required, not just the instruction file\. Recommendations apply to PostgreSQL outside Supabase\.

## [Sources](<https://base.akulich.dev/en/library/skill-supabase-postgres-best-practices/#resource-sources>)

- [Source code](<https://github.com/supabase/agent-skills/tree/main/skills/supabase-postgres-best-practices>)
- [Source code](<https://github.com/supabase/agent-skills/blob/main/skills/supabase-postgres-best-practices/SKILL.md>)
- [License](<https://github.com/supabase/agent-skills/blob/main/LICENSE>)
- [Official source](<https://raw.githubusercontent.com/supabase/agent-skills/HEAD/skills/supabase-postgres-best-practices/SKILL.md>)

## Editorial review date

2026\-10\-03

## Editorial review scope

The purpose and published terms have been reviewed against the cited primary sources\. This page does not confirm that the product was run or tested in every environment\.

Dates refer to the stated editorial review, not hands-on testing, a product update, or a recent review of all sources.
