postgres-patterns

Provide PostgreSQL query optimization, schema design, indexing, and security patterns.

Updated Mar 2, 2026
One-click install
npx skills add https://github.com/unju-ai/ecc --skill postgres-patterns-unju-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres-patterns
Source: https://github.com/unju-ai/ecc/tree/main/docs/ja-JP/skills/postgres-patterns
Command: npx skills add https://github.com/unju-ai/ecc --skill postgres-patterns-unju-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides best practices and quick references for optimizing PostgreSQL database performance, including query efficiency, schema design, indexing strategies, and security configurations.

Core Features & Use Cases

  • Query Optimization: Offers guidance on writing efficient SQL queries and understanding index usage.
  • Schema Design: Recommends appropriate data types and indexing strategies for common scenarios.
  • Security: Includes patterns for Row Level Security (RLS) and secure configurations.
  • Use Case: When designing a new table or troubleshooting a slow query, consult this Skill for recommended indexing patterns and data types to ensure optimal performance.

Quick Start

Use the postgres-patterns skill to find the recommended index type for a 'WHERE col = value' query pattern.

Frequently Asked Questions about postgres-patterns

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

FAQPage Schema
How do I optimize slow PostgreSQL queries and choose the right index?

To optimize slow PostgreSQL queries, you must analyze SQL query patterns and apply recommended indexing strategies. This skill provides quick references for selecting appropriate index types, such as choosing a B-Tree index for a 'WHERE col = value' pattern, to resolve query efficiency issues.

What are the best practices for PostgreSQL schema design and data types?

Best practices for PostgreSQL schema design involve selecting appropriate data types and applying indexing strategies for common scenarios. This skill recommends optimal data types and configurations to ensure table structures maintain peak database performance.

How do I implement Row Level Security (RLS) in Supabase and PostgreSQL?

Implementing Row Level Security (RLS) requires applying specific secure configuration patterns to your database tables. This skill provides RLS patterns based on Supabase best practices to help you enforce data access controls directly at the database layer.

What are common PostgreSQL anti-patterns and how can I detect them?

Common PostgreSQL anti-patterns include inefficient query structures and missing or incorrect indexes. This skill helps detect anti-patterns during SQL query creation and schema design by providing quick reference guides on what patterns to avoid.

How do I configure connection pooling for PostgreSQL?

Configuring connection pooling requires specific database configuration templates to manage concurrent connections efficiently. This skill addresses connection pooling configuration scenarios to help you maintain stable and scalable database connections.