postgres-patterns

Identify PostgreSQL design and query patterns for performance and security.

12|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/aurorie-co/AURORIE-TEAMS --skill postgres-patterns-aurorie-co
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres-patterns
Source: https://github.com/aurorie-co/AURORIE-TEAMS/tree/main/teams/backend/skills/postgres-patterns
Command: npx skills add https://github.com/aurorie-co/AURORIE-TEAMS --skill postgres-patterns-aurorie-co

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PostgreSQL patterns for query optimization, schema design, indexing, and security based on Supabase best practices.

Core Features & Use Cases

  • Pattern Catalog: guidelines for index design, constraints, and access control to improve performance and security.
  • Anti-pattern Detection: identify common mistakes that degrade performance or compromise security.
  • Practical Templates: upsert, pagination, and other data-model patterns with examples.
  • Use Case: optimize a slow query by adding a composite index and enabling RLS where appropriate.

Quick Start

Review your PostgreSQL schema and apply documented patterns to optimize queries and enforce security.

Frequently Asked Questions about postgres-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are common PostgreSQL anti-patterns that degrade database performance?

PostgreSQL anti-patterns include missing composite indexes for frequent query combinations and inadequate constraints, which degrade query performance and compromise data security. Identifying these anti-patterns early helps optimize routine database design.

How do I optimize slow PostgreSQL queries using indexing strategies?

Optimize slow PostgreSQL queries by applying index design patterns, specifically adding composite indexes tailored to your query structure. This query optimization technique targets specific columns to significantly improve database performance.

How does Row Level Security work for access control in PostgreSQL?

Row Level Security (RLS) in PostgreSQL enforces access-control policies directly at the database level, restricting row access based on user roles. This security pattern ensures safe SQL templates enforce data protection during routine database design.

What is the best way to implement upsert patterns in PostgreSQL?

Implement PostgreSQL upsert patterns using practical SQL templates that safely handle insert-or-update conflicts. This data-model pattern relies on proper constraints to ensure reliable query optimization during database migrations.

When do I need to enable RLS policies in my database design?

Enable RLS policies in your database design whenever multi-tenant access control is required. Applying this PostgreSQL security pattern ensures data isolation, complementing indexing strategies to maintain overall query performance.