PostgreSQL reference patterns for query optimization, schema design, indexing, security, and configuration.
- What it does
- Provides a quick-reference guide to PostgreSQL best practices, including an index cheat sheet, data type recommendations, and common SQL patterns such as composite, covering, and partial indexes, RLS policies, upserts, cursor pagination, and queue processing. It also includes anti-pattern detection queries for unindexed foreign keys, slow queries, and table bloat, plus configuration templates for connection limits, timeouts, monitoring, and security defaults. The skill is instructions only and produces no files or scripts.
- When to use it
- Use it when writing SQL queries or migrations, designing a database schema, troubleshooting slow queries, implementing Row Level Security, or setting up connection pooling.
- Requirements
- No tools, packages, or credentials are required beyond the agent; it is instructions only and ships no scripts. Some referenced queries assume PostgreSQL extensions such as pg_stat_statements.