agents · docs
supabase-postgres-best-practices
Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.
npx skills add erbilnas/skills/supabase-postgres-best-practicesskills/supabase-postgres-best-practices/SKILL.md · 664780e feat: add agent skills catalog site
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
Changelog
- 664780efeat: add agent skills catalog siteErbil Nas · 11/23/2026
Used with
- mcpsbaklava-design-systemsse: https://baklava-mcp-server.mars.tgointernals.com/sse
- mcpsbaklavuestdio: bunx @baklavue/mcp
- mcpscloudflarehttp: https://mcp.cloudflare.com/mcp
- mcpsconsole-ninjastdio: node .console-ninja/mcp/
- mcpsevoxstdio: npx add-mcp https://evox.mintlify.site/mcp
- mcpsexpohttp: https://mcp.expo.dev/mcp
- mcpsfigmahttp: https://mcp.figma.com/mcp
- mcpsgithubhttp: https://api.githubcopilot.com/mcp/
Related skills
- researchInvestigate a question against high-trust primary sources and capture the findings as a Markdown file in the repo. Use when the user wants a topic researched, docs or API facts gathered, or reading legwork delegated to a background agent.
- vercel-react-best-practicesReact and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
- writing-for-agentsWriting documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.
- animation-vocabularyReverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing when a popover opens" → Pop in; "the iOS rubber-band scroll" → Rubber-banding). Use when the user asks "what's it called when…", or describes a motion effect without knowing its name and wants the right word to prompt an AI or designer with. For naming an effect, not designing or building one.
- ask-mattAsk which skill or flow fits your situation. A router over the skills in this repo.
- bencium-innovative-ux-designerCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.