Skills for Real Engineers. Straight from my .agents directory.
supabase-postgres-best-practices
Agent skill fromsupabase/agent-skills
Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pg_cron, pgmq), vector/semantic search (pgvector), and restoring dumps (pg_restore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection exhaustion, locking, bloat, or rows visible to the wrong user or tenant. This is not just a performance guide — schema, migration, security, and SQL authoring tasks need these rules too, even for a one-column change or a single query.
How to install supabase-postgres-best-practices
npx skills add supabase/agent-skills# or add only this skill to Claude Code: copy the folder
skills/supabase-postgres-best-practices/
# into
~/.claude/skills/supabase-postgres-best-practices/ (all projects)
.claude/skills/supabase-postgres-best-practices/ (one project)
1# Supabase Postgres Best Practices23Comprehensive performance optimization guide for Postgres, maintained by Supabase. Contains rules across 8 categories, prioritized by impact to guide automated query optimization and schema design.45## When to Apply67Reference these guidelines when:8- Writing SQL queries or designing schemas9- Implementing indexes or query optimization10- Reviewing database performance issues11- Configuring connection pooling or scaling12- Optimizing for Postgres-specific features13- Working with Row-Level Security (RLS)1415## Rule Categories by Priority1617| Priority | Category | Impact | Prefix |18|----------|----------|--------|--------|19| 1 | Query Performance | CRITICAL | `query-` |20| 2 | Connection Management | CRITICAL | `conn-` |21| 3 | Security & RLS | CRITICAL | `security-` |22| 4 | Schema Design | HIGH | `schema-` |23| 5 | Concurrency & Locking | MEDIUM-HIGH | `lock-` |24| 6 | Data Access Patterns | MEDIUM | `data-` |25| 7 | Monitoring & Diagnostics | LOW-MEDIUM | `monitor-` |26| 8 | Advanced Features | LOW | `advanced-` |2728## How to Use2930Read individual rule files for detailed explanations and SQL examples:3132```33references/query-missing-indexes.md34references/query-partial-indexes.md35references/_sections.md36```3738Each rule file contains:39- Brief explanation of why it matters40- Incorrect SQL example with explanation41- Correct SQL example with explanation42- Optional EXPLAIN output or metrics43- Additional context and references44…
Excerpt shown under the repository's MIT license.
More skills in agent-skills
Similar skill repositories
An agentic skills framework & software development methodology that works.
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
Public repository for Agent Skills
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
An AI skill that provides design intelligence for building professional UI/UX across multiple platforms.
