supabase-postgres-best-practices · openai — скилл для Codex: правила
Набор правил по производительности Postgres от Supabase. Пригодится, когда агент пишет запросы, проектирует схему или разбирает медленную базу.
npx skills add openai/plugins --skill supabase-postgres-best-practices -a codexЧто делает supabase-postgres-best-practices
Скилл подключает к агенту справочник по оптимизации Postgres. Правила разбиты на 8 категорий и отсортированы по влиянию: сначала производительность запросов, управление соединениями и безопасность с RLS, потом проектирование схемы, блокировки, паттерны доступа к данным, мониторинг и продвинутые возможности. У каждого правила свой префикс в имени файла — query-, conn-, security-, schema-, lock-, data-, monitor-, advanced-.
Внутри — файлы в references/, например references/query-missing-indexes.md и references/query-partial-indexes.md. В каждом разборе есть объяснение, почему это важно, пример неправильного SQL, пример правильного и вывод EXPLAIN или метрики. Отдельно идут заметки под Supabase.
Ставить стоит, если вы работаете с Postgres и Supabase и хотите, чтобы агент сразу предлагал индексы и не плодил лишние соединения. Если база маленькая и запросы простые, справочник мало что изменит.
Какие задачи решает
- найти запрос, которому не хватает индекса
- разобрать вывод EXPLAIN и понять узкое место
- спроектировать схему с учётом типов и связей
- настроить пул соединений под нагрузку
- проверить политики Row-Level Security
Примеры запросов агенту
- посмотри этот запрос и скажи, каких индексов не хватает
- проверь схему таблиц orders и users по правилам schema-
- почему этот запрос медленный? разбери план выполнения
Как установить supabase-postgres-best-practices
1Через Skills CLI (Vercel)
npx skills add openai/plugins --skill supabase-postgres-best-practices -a codex2Вручную: положить файлы
.agents/skills/supabase-postgres-best-practices/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add openai/plugins --skill supabase-postgres-best-practices -a claude-code2Вручную: положить файлы
~/.claude/skills/supabase-postgres-best-practices/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/supabase-postgres-best-practices/
Вручную: положить файлы
.cursor/skills/supabase-postgres-best-practices/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install openai/plugins supabase-postgres-best-practices2Вручную: положить файлы
.github/skills/supabase-postgres-best-practices/SKILL.mdКомандой платформы
gemini skills install https://github.com/openai/plugins --path plugins/supabase/skills/supabase-postgres-best-practicesВручную: положить файлы
.devin/skills/supabase-postgres-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 -a codex. Файл скилла появится в .agents/skills/supabase-postgres-best-practices/SKILL.md.
Что делает этот скилл?
Даёт агенту правила оптимизации Postgres: индексы, соединения, RLS, схема, блокировки. Агент опирается на них, когда пишет или проверяет SQL.
Нужен ли доступ к самому Supabase?
Нет, это текстовый справочник. Агент читает файлы правил и применяет их к вашему коду.
Исходный текст
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. license: MIT metadata: author: supabase version: "1.1.1" 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/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 - 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