AI 学习指南
社区已审核中等风险

$supabase-postgres-best-practices

Supabase Postgres Best Practices

为 Supabase Postgres 的 Schema、查询、索引、安全和性能提供结构化检查清单。

Claude CodeCodexCursor社区热门SupabasePostgreSQL

SKILL DOCUMENT

Original SKILL.md

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

PriorityCategoryImpactPrefix
1Query PerformanceCRITICALquery-
2Connection ManagementCRITICALconn-
3Security & RLSCRITICALsecurity-
4Schema DesignHIGHschema-
5Concurrency & LockingMEDIUM-HIGHlock-
6Data Access PatternsMEDIUMdata-
7Monitoring & DiagnosticsLOW-MEDIUMmonitor-
8Advanced FeaturesLOWadvanced-

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

何时应该使用

  • 设计 Supabase 数据库
  • 优化 Postgres 查询
  • 审查 RLS 与索引

何时不应该使用

  • 未经备份直接修改生产数据库
  • 替代数据库监控

安装与调用

npx skills add https://github.com/supabase/agent-skills --skill supabase-postgres-best-practices

建议位置:Agent Skills 目录

安装后可在 Codex/Claude Code 中显式提及 $supabase-postgres-best-practices,也可由 Agent 根据 Skill 描述自动匹配。

文件结构

抓取时共识别 36 个文件;页面只展示资源类型,不镜像第三方完整内容。

SKILL.md参考资料元数据

依赖与权限

命令

psql

环境变量

无明确依赖

MCP 服务

无明确依赖

网络访问:需要或可能需要

安全、许可证与审核

审核状态
已审核
风险等级
中等风险
许可证
MIT
  • 数据库变更可能影响数据和权限,生产操作前需备份、迁移与回滚方案