跳到正文
Skillpedia
数据库48k · #5883

supabase-postgres-best-practices

它能做什么

这个工具可以按照 Supabase 推荐的最佳实践,帮你优化 PostgreSQL 数据库的性能。它会提供建议,告诉你如何编写更快的查询、组织数据,以及更安全、高效地配置数据库。

适用场景

  • ✓当你编写新的查询或整理数据表时。
  • ✓当你的数据库运行变慢时。
  • ✓当你设置数据库安全时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/supabase-postgres-best-practices/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/supabase-postgres-best-practices/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“怎样才能让我的 SQL 查询更快?”

每周 5 个新技能,1 分钟读完。

工作原理

这个工具会参考一份完整的优化指南。它会分析你的查询、数据表设计和数据库配置,然后提出改进建议。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Supabase Postgres Best Practices

When to Use

Use this skill when you need postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.

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

Limitations

  • Use this skill only when the task clearly matches its upstream product or API scope.
  • Verify commands, API behavior, pricing, quotas, credentials, and deployment effects against current official documentation before making changes.
  • Do not treat generated examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.
常见问题

什么是“索引”(indexes)?

索引就像书的目录。它能帮助数据库快速找到信息,而不需要逐页翻阅全部内容。

什么是“行级安全”(Row-Level Security,RLS)?

RLS 是一种控制方式,可以按行设置谁能查看或修改数据库中的哪些数据。

这个工具会自动修改内容吗?

不会,它只提供建议和示例。你需要自己把这些改动应用到数据库中。

详情

作者的原始描述

Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#5883
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能