postgres

Execute read-only SQL queries against configured PostgreSQL databases.

392|41|Updated Dec 22, 2025
One-click install
npx skills add https://github.com/sanjay3290/ai-skills --skill postgres-sanjay3290
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres
Source: https://github.com/sanjay3290/ai-skills/tree/main/skills/postgres
Command: npx skills add https://github.com/sanjay3290/ai-skills --skill postgres-sanjay3290

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires psycopg2-binary, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill allows you to safely query multiple PostgreSQL databases without the risk of accidental data modification, streamlining data exploration and analysis.

Core Features & Use Cases

  • Read-only Access: Ensures all queries are strictly read-only, preventing accidental writes or deletions.
  • Multi-Database Support: Connects to and queries multiple PostgreSQL databases, identified by descriptive names.
  • Schema and Table Exploration: Easily list tables and view database schemas to understand data structure.
  • Safe Query Execution: Enforces query validation, timeouts, and memory caps for secure and efficient operation.
  • Use Case: You need to find the total number of users in the production database and then check the schema of the analytics database for a specific table.

Quick Start

Use the postgres skill to list all tables in the production database.

Frequently Asked Questions about postgres

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

FAQPage Schema
How do I run read-only SQL queries against a PostgreSQL database?

This skill executes read-only SQL queries against PostgreSQL databases by enforcing single-statement validation and server-side read-only sessions, preventing accidental writes or deletions during data exploration.

Can I explore database schemas and list tables across multiple PostgreSQL databases?

Yes, this skill supports connecting to and querying multiple PostgreSQL databases identified by descriptive names, allowing you to list tables, view schemas, and run SELECT statements for comprehensive data exploration.

What protections prevent accidental data modification when querying PostgreSQL?

This skill prevents accidental data modification by implementing client-side query validation, single-statement enforcement, and server-side read-only sessions, along with execution timeouts and memory caps to ensure secure PostgreSQL querying.

Do I need psycopg2 to connect to and query PostgreSQL databases?

Yes, this skill requires the psycopg2-binary dependency to establish connections, explore schemas, and execute read-only SQL statements against configured PostgreSQL databases.

What are the limitations of using read-only SQL queries for data analysis?

Limitations include the inability to perform INSERT, UPDATE, or DELETE operations. This skill strictly enforces single-statement SELECT queries with memory caps and timeouts, restricting data modification but streamlining safe analysis.