postgres-patterns

Provide PostgreSQL best-practice patterns for indexing, schema design, and security.

41|8|Updated Feb 7, 2026
One-click install
npx skills add https://github.com/codelably/harmony-claude-code --skill postgres-patterns-codelably
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres-patterns
Source: https://github.com/codelably/harmony-claude-code/tree/main/docs/zh-TW/skills/postgres-patterns
Command: npx skills add https://github.com/codelably/harmony-claude-code --skill postgres-patterns-codelably

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PostgreSQL 最佳實務快速參考,基於 Supabase 最佳實務。詳細指南請使用 database-reviewer agent。

Core Features & Use Cases

  • 提供索引類型與查詢模式的快速參考,協助提升 SQL 效能。
  • 覆蓋模式設計、資料型別選擇、分區與安全實務(如 RLS)等要點,降低常見坑。
  • 使用情境:在設計新表或優化慢查詢時,可以參考本技能中的範例與建議並直接實作。

Quick Start

Use the postgres-patterns skill to quickly reference best-practice patterns for indexing, data types, and security in PostgreSQL.

Frequently Asked Questions about postgres-patterns

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

FAQPage Schema
What are the best practices for PostgreSQL query optimization and indexing?

PostgreSQL query optimization best practices involve selecting appropriate index types and matching query patterns to reduce SQL latency. This skill provides quick-reference patterns for indexing, data types, and schema design to improve database performance directly.

How do I implement Row Level Security in PostgreSQL for secure database design?

Implementing Row Level Security (RLS) in PostgreSQL restricts data access at the row level based on user roles. This skill supplies security best-practice patterns, including RLS setup and data type selection, to ensure fast and secure database schemas.

What are common PostgreSQL anti-patterns for schema design and data types?

Common PostgreSQL anti-patterns involve poor data type choices and inefficient schema structures that degrade performance. This skill outlines these anti-patterns and offers best-practice guidance for partitioning and schema design to avoid common database pitfalls.

When should I use different PostgreSQL index types for database tuning?

Different PostgreSQL index types should be used based on specific query patterns and data structures for effective database tuning. This skill provides practical examples and quick-start guidance for matching indexing types to your queries to optimize performance.

Does this PostgreSQL patterns reference work for Supabase database development?

Yes, this PostgreSQL patterns reference is based on Supabase best practices. It applies directly to database developers, data engineers, and ops teams designing schemas, tuning queries, or implementing security within Supabase or standard PostgreSQL environments.