supabase-postgres-best-practices · openai — скилл для Codex: что делает
Скилл содержит правила оптимизации Postgres от команды Supabase. Помогает писать SQL-запросы, проектировать схемы и настраивать RLS.
npx skills add openai/plugins --skill supabase-postgres-best-practices
npx skills add openai/plugins --skill supabase-best-practices -a codexЧто делает supabase-postgres-best-practices
Скилл добавляет в базу знаний агента правила оптимизации Postgres от команды Supabase. Внутри собрано руководство по 8 категориям. Они охватывают производительность запросов, управление подключениями, RLS и блокировки.
Каждое правило лежит в отдельном файле каталога references/ с префиксами вроде query- или schema-. В них даны примеры ошибочного и исправленного SQL-кода, пояснения и разбор планов EXPLAIN. Использовать их можно при ревью медленных запросов, проектировании схем или настройке пула соединений.
Ставить скилл стоит разработчикам, которые пишут сложные запросы к Postgres и настраивают права доступа. Для простых таблиц без кастомного SQL он избыточен.
Какие задачи решает
- Найти медленные SQL-запросы без подходящих индексов
- Настроить пул соединений базы данных
- Спроектировать правила Row-Level Security для таблиц
- Устранить конфликты блокировок при конкурентном доступе
Примеры запросов агенту
- «Проверь этот SQL-запрос по правилам query- и найди недостающие индексы»
- «Помоги настроить RLS для таблицы профилей с учётом рекомендаций Supabase»
- «Проанализируй вывод EXPLAIN для медленной выборки»
Как установить supabase-postgres-best-practices
1Через Skills CLI (Vercel)
npx skills add openai/plugins --skill supabase-postgres-best-practicesnpx skills add openai/plugins --skill supabase-best-practices -a codex2Вручную: положить файлы
.agents/skills/supabase-best-practices/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add openai/plugins --skill supabase-best-practices -a claude-code2Вручную: положить файлы
~/.claude/skills/supabase-best-practices/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/supabase-best-practices/
Вручную: положить файлы
.cursor/skills/supabase-best-practices/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install openai/plugins supabase-best-practices2Вручную: положить файлы
.github/skills/supabase-best-practices/SKILL.mdКомандой платформы
gemini skills install https://github.com/openai/plugins --path plugins/build-web-apps/skills/supabase-best-practicesВручную: положить файлы
.devin/skills/supabase-best-practices/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
Из того же набора201
Весь набор →Другие версии supabase-postgres-best-practices
Похожие
Вопросы о supabase-postgres-best-practices
Как установить supabase-postgres-best-practices в Codex?
Выполните команду npx skills add openai/plugins --skill supabase-postgres-best-practices. Скилл загрузится в окружение проекта.
Что делает этот скилл?
Он даёт агенту набор правил для проверки SQL-запросов, правильной индексации, настройки пула соединений и политик RLS.
По какому принципу расставлены приоритеты в правилах?
Руководство делит 8 категорий по силе воздействия. Критический приоритет получили скорость выполнения запросов, управление подключениями и безопасность, а расширенные функции отнесены в конец списка.
Исходный текст
SKILL.md · MIT
--- name: supabase-postgres-best-practices description: Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations. metadata: author: supabase version: "1.1.0" organization: Supabase date: January 2026 abstract: Comprehensive Postgres performance optimization guide for developers using Supabase and Postgres. Contains performance rules across 8 categories, prioritized by impact from critical (query performance, connection management) to incremental (advanced features). Each rule includes detailed explanations, incorrect vs. correct SQL examples, query plan analysis, and specific performance metrics to guide automated optimization and code generation. --- # 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/schema-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 - https://www.postgresql.org/docs/current/ - https://supabase.com/docs - https://wiki.postgresql.org/wiki/Performance_Optimization - https://supabase.com/docs/guides/database/overview - https://supabase.com/docs/guides/auth/row-level-security
© supabase · MIT · openai/plugins