Postgres best practices

From kumaran-is/claude-code-onboarding · View interactive version

Postgres best practices is an AI agent skill from the GitHub repository kumaran-is/claude-code-onboarding. Supabase PostgreSQL best practices library — 33 impact-rated rules (CRITICAL→LOW) covering connection pooling, RLS, locking, VACUUM, full-text search, and JSONB indexing. Use when writing, reviewing, or optimizing PostgreSQL queries, schema, or configuration.

How to use this skill

Skill file

Iron Law

NEVER TUNE WHAT YOU HAVEN'T MEASURED — CHECK pg_stat_statements AND pg_stat_activity BEFORE CHANGING CONFIGURATION OR ADDING INDEXES

When to Use This Skill

Do Not Use This Skill When

Rule Categories by Priority

| Priority | Category | Impact | Rules |

|----------|----------|--------|-------|

| 1 | Query Performance | CRITICAL | rules/query-*.md (5 rules) |

| 2 | Connection Management | CRITICAL | rules/conn-*.md (4 rules) |

| 3 | Security & RLS | CRITICAL | rules/security-*.md (3 rules) |

| 4 | Schema Design | HIGH | rules/schema-*.md (6 rules) |

| 5 | Concurrency & Locking | MEDIUM-HIGH | rules/lock-*.md (4 rules) |

| 6 | Data Access Patterns | MEDIUM | rules/data-*.md (4 rules) |

| 7 | Monitoring & Diagnostics | LOW-MEDIUM | rules/monitor-*.md (3 rules) |

| 8 | Advanced Features | LOW | rules/advanced-*.md (2 rules) |

Quick Rule Index

Connection Management (NEW — not in other skills)

Concurrency & Locking (NEW — not in other skills)

Security & RLS (NEW depth — not in other skills)

Monitoring & Maintenance (NEW — not in other skills)

Advanced Features (NEW — not in other skills)

Query Performance (complementary to sql-optimization-patterns)

Schema Design (complementary to database-schema-designer)

Stack Integration

Python / FastAPI (asyncpg + SQLAlchemy)

NestJS / Prisma

Java / Spring Boot WebFlux (R2DBC)

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.