Postgres best practices
Skill sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills-claude/skills/postgres-best-practices
Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.From its SKILL.md
npx -y skills add sickn33/agentic-awesome-skills --skill postgres-best-practicesAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
2.2 KB, 449 tokens by cl100k_base, as published. Nobody here has run it
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 Use
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:
rules/query-missing-indexes.md
rules/schema-partial-indexes.md
rules/_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)
Full Compiled Document
For the complete guide with all rules expanded: AGENTS.md
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
What ships with it: 36 files
97.1 KB alongside SKILL.md
rules/
- advanced-full-text-search.md1.4 KB
- advanced-jsonb-indexing.md1.4 KB
- conn-idle-timeout.md1.3 KB
- conn-limits.md1.3 KB
- conn-pooling.md1.3 KB
- conn-prepared-statements.md1.5 KB
- _contributing.md4.0 KB
- data-batch-inserts.md1.3 KB
- data-n-plus-one.md1.3 KB
- data-pagination.md1.3 KB
- data-upsert.md1.4 KB
- lock-advisory.md1.5 KB
- lock-deadlock-prevention.md1.8 KB
- lock-short-transactions.md1.3 KB
- lock-skip-locked.md1.3 KB
- monitor-explain-analyze.md1.4 KB
- monitor-pg-stat-statements.md1.4 KB
- monitor-vacuum-analyze.md1.5 KB
- query-composite-indexes.md1.4 KB
- query-covering-indexes.md1.3 KB
- query-index-types.md1.4 KB
- query-missing-indexes.md1.2 KB
- query-partial-indexes.md1.3 KB
- schema-data-types.md1.4 KB
- schema-foreign-key-indexes.md1.6 KB
- schema-lowercase-identifiers.md1.7 KB
- schema-partitioning.md1.5 KB
- schema-primary-keys.md1.8 KB
- _sections.md1.6 KB
- security-privileges.md1.5 KB
- security-rls-basics.md1.3 KB
- security-rls-performance.md1.5 KB
- _template.md1.0 KB
- AGENTS.md43.9 KB
- metadata.json818 B
- README.md3.1 KB
Gives 0 of the 12 instructions most performance cost skills give in 449 tokens
Counted across 797 of the 1,117 authors here whose files we hold, read 2026-09-06
- Check for product marketing context firstin 46 of 797, across 20 files
- Measure before optimizingin 31 of 797, across 25 files
- Profile first to identify the actual bottleneckin 23 of 797, across 22 files
- Verify your robots.txt allows AI crawlersin 21 of 797, across 12 files
- Import directly and avoid barrel filesin 19 of 797, across 15 files
- Spawn all runs in the same turnin 18 of 797, across 11 files
- Write a draft of the skillin 17 of 797, across 10 files
- Understand the user's intentin 17 of 797, across 10 files
- Use React.cache for per-request deduplicationin 16 of 797, across 11 files
- Profile before optimizingin 16 of 797, across 14 files
- Include specific numbers with sourcesin 15 of 797, across 8 files
- Add lazy loading to below-fold imagesin 15 of 797, across 10 files
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.