postgres-code-review

Review PostgreSQL SQL for indexing, JSONB, connection, and transaction issues.

Updated Feb 17, 2026
One-click install
npx skills add https://github.com/javierhbr/random-poc --skill postgres-code-review-javierhbr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres-code-review
Source: https://github.com/javierhbr/random-poc/tree/main/custom-skills/beagle-main/plugins/beagle-python/skills/postgres-code-review
Command: npx skills add https://github.com/javierhbr/random-poc --skill postgres-code-review-javierhbr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers write more efficient and robust PostgreSQL code by identifying common anti-patterns related to indexing, JSONB usage, connection management, and transaction safety.

Core Features & Use Cases

  • Index Strategy Review: Analyzes queries and schemas for missing or inefficient indexes.
  • JSONB Optimization: Checks for correct operator usage and GIN indexing for JSONB columns.
  • Connection & Transaction Safety: Reviews connection pooling, leak prevention, and transaction isolation levels.
  • Use Case: Before deploying a new feature that heavily queries a database, use this Skill to review the SQL code and ensure it adheres to best practices, preventing performance bottlenecks and potential deadlocks.

Quick Start

Use the postgres-code-review skill to analyze the provided SQL query for potential performance issues.

Frequently Asked Questions about postgres-code-review

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

FAQPage Schema
How do I review PostgreSQL queries for missing indexes and performance bottlenecks?

Review PostgreSQL queries by analyzing SQL code and schemas to identify missing indexes and inefficient indexing strategies, preventing performance bottlenecks before deploying new database-heavy features.

What is the correct way to optimize JSONB operations in PostgreSQL?

Optimizing JSONB operations in PostgreSQL involves checking for correct operator usage and implementing GIN indexing on JSONB columns to ensure efficient data retrieval and prevent performance degradation during querying.

How do I prevent connection leaks and manage transaction isolation levels in PostgreSQL?

Prevent connection leaks and manage transaction isolation levels in PostgreSQL by reviewing connection pooling configurations and transaction code for leak prevention and improper isolation settings that could cause deadlocks.

Can I use an automated review to check database schemas for transaction safety?

Yes, you can review database schemas for transaction safety by analyzing SQL code to detect improper transaction isolation levels and connection leaks, ensuring robust and efficient PostgreSQL database operations.

What are common PostgreSQL anti-patterns related to connection pooling?

Common PostgreSQL anti-patterns related to connection pooling include connection leaks and improper transaction isolation levels, which can cause performance bottlenecks and potential deadlocks if not reviewed and corrected prior to deployment.