Complete AI TrainingYourJobSkills for your job

Skills / data

postgres-readonly-queries

Execute safe read-only SQL queries against PostgreSQL databases with multi-connection support and defense-in-depth write protection.

Finance & AccountingIT & Software DevelopmentData & Analyticsdatabasepostgresread-onlysql

PostgreSQL Read-Only Query Skill

When to Use

  • Use when querying PostgreSQL databases and access must stay strictly read-only
  • Use when exploring schemas, tables, and data across multiple configured connections
  • Use when you want defense-in-depth protection against accidental INSERT/UPDATE/DELETE or DDL

Execute safe, read-only queries against configured PostgreSQL databases.

Requirements

  • Python 3.8+
  • psycopg2-binary: pip install -r requirements.txt

Setup

Create connections.json in the skill directory or ~/.config/claude/postgres-connections.json.

Security: Set file permissions to 600 since it contains credentials:

chmod 600 connections.json
{
  "databases": [
    {
      "name": "production",
      "description": "Main app database - users, orders, transactions",
      "host": "db.example.com",
      "port": 5432,
      "database": "app_prod",
      "user": "readonly_user",
      "password": "your-password",
      "sslmode": "require"
    }
  ]
}

Config Fields

FieldRequiredDescription
nameYesIdentifier for the database (case-insensitive)
descriptionYesWhat data this database contains (used for auto-selection)
hostYesDatabase hostname
portNoPort number (default: 5432)
databaseYesDatabase name
userYesUsername

Subscribers only

The full skill, its 5 bundled files and every download is included with every paid Complete AI plan.

Details

Sourcesanjay3290/ai-skills
LicenseApache-2.0
Risk labelsafe ("critical" means the skill may run commands or touch files — read before use)
FilesREADME.md, SKILL.md, connections.example.json, requirements.txt, scripts/query.py
Added2026-07-09

Related skills

alpha-vantage

Access 20+ years of global financial data: equities, options, forex, crypto, commodities, economic indicators, and 50+ technical indicators.

amplitude-automation

Automate Amplitude tasks via Rube MCP (Composio): events, user activity, cohorts, user identification. Always search tools first for current schemas.

analytics-product

Analytics de produto — PostHog, Mixpanel, eventos, funnels, cohorts, retencao, north star metric, OKRs e dashboards de produto.

analytics-tracking

Design, audit, and improve analytics tracking systems that produce reliable, decision-ready data.

arrowspace

Spectral vector search using graph Laplacian eigenstructure. Use when cosine/L2 similarity misses latent structure in your embeddings.

data-engineer

Build scalable data pipelines, modern data warehouses, and real-time streaming architectures. Implements Apache Spark, dbt, Airflow, and cloud-native data platforms.