postgresql-code-review

Review PostgreSQL SQL scripts for anti-patterns and best practices.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/nashirabbash/autorepychatbot --skill postgresql-code-review-nashirabbash
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgresql-code-review
Source: https://github.com/nashirabbash/autorepychatbot/tree/main/.agents/skills/postgresql-code-review
Command: npx skills add https://github.com/nashirabbash/autorepychatbot --skill postgresql-code-review-nashirabbash

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PostgreSQL codebases often struggle with ensuring best practices, safe patterns, and optimal performance. This skill provides expert reviews to identify anti-patterns, validate design decisions, and optimize queries.

Core Features & Use Cases

  • JSONB Best Practices: Guidelines and examples to ensure indexable and safe JSONB usage.
  • Array Operations Review: Techniques for efficient array handling and indexing.
  • PostgreSQL Schema Design Review: Recommendations for robust, scalable schemas.
  • Custom Types & Domains: Guidance on using enums and domains for data integrity.
  • Extensions & Security: Best practices for leveraging extensions and securing data (including RLS).
  • Code Quality Checklist: A structured evaluation framework to drive quality.

Quick Start

Provide a PostgreSQL code review for the given SQL snippet or project.

Frequently Asked Questions about postgresql-code-review

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

FAQPage Schema
How do I perform a PostgreSQL code review for schema design and query performance?

To perform a PostgreSQL code review, evaluate SQL scripts and migrations against a structured checklist to enforce best practices, detect anti-patterns, and provide concrete optimization suggestions for robust schemas.

What are the best practices for using JSONB in PostgreSQL to ensure indexable queries?

Best practices for using JSONB in PostgreSQL involve following specific guidelines and examples to ensure safe usage and maintain indexable query performance, validated through a targeted code review checklist.

How do I check my PostgreSQL database for RLS and extension security anti-patterns?

To check PostgreSQL security, conduct a code review focused on extensions and Row Level Security (RLS) to validate safe patterns, identify anti-patterns, and ensure proper data protection across stored procedures.

Does this PostgreSQL review process cover array operations and custom types?

Yes, the PostgreSQL review process covers array operations by suggesting efficient handling and indexing techniques, and reviews custom types and domains to ensure data integrity using enums and domains.

How do I optimize PostgreSQL stored procedures and migrations using a code review?

To optimize PostgreSQL stored procedures and migrations, enforce best practices by evaluating the code against a defined checklist, which detects anti-patterns and generates reviewer-ready feedback with concrete optimization suggestions.