S
supabase
@mayurrathi
⭐ 40.7k GitHub stars

Postgres Best Practices

Postgres Best Practices is an writing AI skill with a core value of Postgres performance optimization and best practices from Supabase. It helps developers solve real-world problems in the writing domain, boosting efficiency, automating repetitive tasks, and optimizing workflows.

Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.

Last verified on: 2026-07-07

Quick Facts

Category writing
Works With Claude
Source sickn33/antigravity-awesome-skills
Stars ⭐ 40.7k
Last Verified 2026-07-07
Risk Level Low
mkdir -p ./skills/postgres-best-practices && curl -sfL https://raw.githubusercontent.com/sickn33/antigravity-awesome-skills/main/skills/postgres-best-practices/SKILL.md -o ./skills/postgres-best-practices/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

# 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:


text
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.

🎯 Best For

  • Engineering teams doing code reviews
  • Open source maintainers
  • Claude users
  • Content creators
  • Writers

💡 Use Cases

  • Reviewing pull requests for security vulnerabilities
  • Checking code style consistency
  • Content creation
  • Style guide enforcement

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Postgres Best Practices to Your Work

    Provide context for your task — paste source material, describe your audience, or share existing work to guide the AI.

  4. 4

    Review and Refine

    Edit the AI output for accuracy, tone, and completeness. Add human insight where the AI lacks context.

❓ Frequently Asked Questions

Does this skill check for OWASP Top 10?

Security-focused review skills often include OWASP checks. Check the skill content for specific vulnerability categories covered.

Can Postgres Best Practices maintain my brand voice?

Yes — provide style guides or example content in your prompt for consistent brand-aligned output.

How do I install Postgres Best Practices?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/postgres-best-practices/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Blindly accepting AI suggestions

Always verify AI-generated review comments. Some suggestions may not apply to your specific codebase conventions.

Publishing unedited drafts

AI writing needs human editing for facts, flow, and authentic voice.

🔗 Related Skills