Token导航 LogoToken导航TokenDH.com
开发规范需要联网github未标认证来源可访问clear审计通过

supabase-best-practicesSupabase 最佳实践

Agent Skill

supabase-best-practices 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

7,614

周安装

308

GitHub Stars

公开资料未说明

下载量

2,390
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:supabase-best-practices(Supabase 最佳实践)
来源仓库:https://github.com/pedrobarretocw/supabase-best-practices
仓库路径:skills/supabase-best-practices
安装命令:
npx skills add https://github.com/pedrobarretocw/supabase-best-practices --skill supabase-best-practices
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/pedrobarretocw/supabase-best-practices --skill supabase-best-practices

简介

针对具有 Clerk 身份验证集成的 Supabase 项目的 40 多个安全和性能规则。

  • 涵盖按影响优先顺序排列的 10 个规则类别:行级安全性和职员集成(关键)、数据库安全性和身份验证模式(高),以及存储、实时、边缘功能和测试
  • 每条规则都包含解释、错误/正确代码示例、例外情况和官方文档链接
  • 按用例组织:新项目设置、RLS 策略编写、模式设计、实时功能、存储桶配置和代码审查
  • 强调关键模式,例如始终启用 RLS、在 JWT 模板上使用第三方身份验证集成以及在服务器端验证 JWT 声明

SKILL.md

Supabase Best Practices

Comprehensive security and performance optimization guide for Supabase applications with Clerk authentication integration. Contains 40+ rules across 10 categories, prioritized by impact to guide secure development and code review.

When to Apply

Reference these guidelines when:

  • Setting up a new Supabase project
  • Integrating Clerk authentication with Supabase
  • Writing Row Level Security (RLS) policies
  • Designing database schemas
  • Implementing real-time features
  • Configuring Storage buckets
  • Writing Edge Functions
  • Reviewing code for security issues

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Row Level SecurityCRITICALrls-
2Clerk IntegrationCRITICALclerk-
3Database SecurityHIGHdb-
4Authentication PatternsHIGHauth-
5API SecurityHIGHapi-
6Storage SecurityMEDIUM-HIGHstorage-
7Realtime SecurityMEDIUMrealtime-
8Edge FunctionsMEDIUMedge-
9TestingMEDIUMtest-
10SecurityMEDIUMsecurity-

Quick Reference

1. Row Level Security (CRITICAL)

  • rls-always-enable - Always enable RLS on public schema tables
  • rls-wrap-functions-select - Wrap auth functions with (SELECT...) for performance
  • rls-add-indexes - Add indexes on columns used in RLS policies
  • rls-specify-roles - Specify roles with TO authenticated clause
  • rls-security-definer - Use SECURITY DEFINER functions for complex policies
  • rls-minimize-joins - Minimize joins in RLS policies
  • rls-explicit-auth-check - Use explicit auth.uid() checks
  • rls-restrictive-policies - Use RESTRICTIVE policies for additional constraints

2. Clerk Integration (CRITICAL)

  • clerk-setup-third-party - Use Third-Party Auth integration (not JWT templates)
  • clerk-client-server-side - Use accessToken callback for server-side clients
  • clerk-client-client-side - Use useSession() hook for client-side clients
  • clerk-role-claim - Configure role: authenticated claim in Clerk
  • clerk-org-policies - Use organization claims for multi-tenant RLS
  • clerk-mfa-policies - Enforce MFA with RESTRICTIVE policies
  • clerk-no-jwt-templates - Never use deprecated JWT template integration

3. Database Security (HIGH)

  • db-migrations-versioned - Use versioned migrations for schema changes
  • db-schema-design - Follow proper schema design patterns
  • db-indexes-strategy - Implement proper indexing strategy
  • db-foreign-keys - Always use foreign key constraints
  • db-triggers-security - Secure trigger functions properly
  • db-views-security-invoker - Use SECURITY INVOKER for views

4. Authentication Patterns (HIGH)

  • auth-jwt-claims-validation - Always validate JWT claims
  • auth-user-metadata-safety - Treat user_metadata as untrusted
  • auth-app-metadata-authorization - Use app_metadata for authorization
  • auth-session-management - Implement proper session management

5. API Security (HIGH)

  • api-filter-queries - Always filter queries even with RLS
  • api-publishable-keys - Use publishable keys correctly
  • api-service-role-server-only - Never expose service role key to client

6. Storage Security (MEDIUM-HIGH)

  • storage-rls-policies - Enable RLS on storage.objects
  • storage-bucket-security - Configure bucket-level security
  • storage-signed-urls - Use signed URLs for private files

7. Realtime Security (MEDIUM)

  • realtime-private-channels - Use private channels for sensitive data
  • realtime-rls-authorization - RLS policies apply to realtime
  • realtime-cleanup-subscriptions - Clean up subscriptions on unmount

8. Edge Functions (MEDIUM)

  • edge-verify-jwt - Always verify JWT in edge functions
  • edge-cors-handling - Handle CORS properly
  • edge-secrets-management - Use secrets for sensitive data

9. Testing (MEDIUM)

  • test-pgtap-rls - Test RLS policies with pgTAP
  • test-isolation - Isolate tests properly
  • test-helpers - Use test helper functions

10. Security (MEDIUM)

  • security-validate-inputs - Validate all inputs before processing
  • security-audit-advisors - Regularly run Security Advisor checks

How to Use

Read individual rule files for detailed explanations and code examples:

references/rules/rls-always-enable.md
references/rules/clerk-setup-third-party.md
references/rules/_sections.md

Each rule file contains:

  • Brief explanation of why it matters
  • Incorrect code example with explanation
  • Correct code example with explanation
  • When NOT to use the pattern
  • Reference links to official documentation

Full Compiled Document

For the complete guide with all rules expanded: references/supabase-guidelines.md

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.43%
按下载量换算679

Antigravity

23.22%
按下载量换算555

Cursor

15.26%
按下载量换算365

Gemini CLI

11.28%
按下载量换算270

OpenCode

7.87%
按下载量换算188

Codex

2.78%
按下载量换算66

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills