{"schemaVersion":1,"id":"skill-supabase-postgres-best-practices","name":"Supabase Postgres Best Practices","locale":"en","canonicalUrl":"https://base.akulich.dev/en/library/skill-supabase-postgres-best-practices/","officialUrl":"https://github.com/supabase/agent-skills/tree/main/skills/supabase-postgres-best-practices","isCatalog":false,"description":"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.","tasks":["Review SQL and a migration before running them","Resolve a slow query and connection shortages","Check user data isolation through RLS"],"categoryIds":["skills","backend","quality"],"subcategoryIds":["skills.platforms","backend.databases","quality.performance","quality.security"],"tags":["PostgreSQL","RLS","SQL","EXPLAIN"],"aliases":[],"platforms":[],"stack":["PostgreSQL"],"compatibility":null,"pricing":"free","freeUsage":"The skill is free under MIT.","paidUsage":null,"license":"MIT","selectionGuide":{"purpose":"Review SQL and a migration before running them","chooseWhen":["Review SQL and a migration before running them","Resolve a slow query and connection shortages","Check user data isolation through RLS"],"considerInstead":[],"requirements":["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":["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."],"faq":[{"question":"What can you use for free in Supabase Postgres Best Practices?","answer":"The skill is free under MIT."},{"question":"What are the access terms for Supabase Postgres Best Practices?","answer":"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."},{"question":"What do you need to use Supabase Postgres Best Practices?","answer":"The entire skill directory with references is required, not just the instruction file."},{"question":"Which environment can you use Supabase Postgres Best Practices in?","answer":"Tech stack: PostgreSQL."},{"question":"How do you get started with Supabase Postgres Best Practices?","answer":"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."},{"question":"What should you consider when choosing Supabase Postgres Best Practices?","answer":"The current name in SKILL.md is supabase-postgres-best-practices."},{"question":"Is this only an indexing guide?","answer":"No. The eight categories include query performance, connections, Security/RLS, schema, concurrency/locking, access patterns, monitoring, and advanced features."},{"question":"How should a rule be chosen for slow SQL?","answer":"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."}],"related":[],"sources":["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/LICENSE","https://raw.githubusercontent.com/supabase/agent-skills/HEAD/skills/supabase-postgres-best-practices/SKILL.md"]},"selectionCheckedAt":null,"applicationGuide":{"inputs":["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":["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."],"checks":["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."],"goal":"Example workflow with Supabase Postgres Best Practices: Review SQL and a migration before running them."},"sources":["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/LICENSE","https://raw.githubusercontent.com/supabase/agent-skills/HEAD/skills/supabase-postgres-best-practices/SKILL.md"],"checkedAt":"2026-10-03","reviewScope":"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.","relatedIds":[],"dataVersion":"cbbe7123b47a5ae80983","type":"Skill","kind":"skill","pricingNote":"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.","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.","labeledSources":[{"url":"https://github.com/supabase/agent-skills/tree/main/skills/supabase-postgres-best-practices","label":"Source code"},{"url":"https://github.com/supabase/agent-skills/blob/main/skills/supabase-postgres-best-practices/SKILL.md","label":"Source code"},{"url":"https://github.com/supabase/agent-skills/blob/main/LICENSE","label":"License"},{"url":"https://raw.githubusercontent.com/supabase/agent-skills/HEAD/skills/supabase-postgres-best-practices/SKILL.md","label":"Official source"}],"licenseGuides":[{"id":"mit","title":"MIT — permissive license","scope":null,"summary":"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.","url":"https://opensource.org/license/mit"}],"entryIds":[],"composition":null}