postgresql-code-review

Installation
Summary

PostgreSQL code review assistant covering JSONB, arrays, custom types, schema design, and security best practices.

  • Reviews JSONB operations for indexing efficiency, array usage with GIN indexes, and proper containment operators
  • Evaluates schema design including ENUM types, CITEXT for case-insensitive data, TIMESTAMPTZ usage, and CHECK constraints
  • Identifies anti-patterns in function optimization, trigger design, and extension usage
  • Assesses Row Level Security (RLS) implementation, privilege management, and PostgreSQL-specific security features
  • Analyzes performance considerations including index strategy, window functions, and PostgreSQL-exclusive optimization techniques
SKILL.md

PostgreSQL Code Review Assistant

Expert PostgreSQL code review for ${selection} (or entire project if no selection). Focus on PostgreSQL-specific best practices, anti-patterns, and quality standards that are unique to PostgreSQL.

🎯 PostgreSQL-Specific Review Areas

JSONB Best Practices

-- ❌ BAD: Inefficient JSONB usage
SELECT * FROM orders WHERE data->>'status' = 'shipped';  -- No index support

-- ✅ GOOD: Indexable JSONB queries
CREATE INDEX idx_orders_status ON orders USING gin((data->'status'));
SELECT * FROM orders WHERE data @> '{"status": "shipped"}';

-- ❌ BAD: Deep nesting without consideration
UPDATE orders SET data = data || '{"shipping":{"tracking":{"number":"123"}}}';

-- ✅ GOOD: Structured JSONB with validation
Related skills

More from github/awesome-copilot

Installs
9.9K
GitHub Stars
32.8K
First Seen
Feb 25, 2026