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
| Field | Required | Description |
|---|---|---|
| name | Yes | Identifier for the database (case-insensitive) |
| description | Yes | What data this database contains (used for auto-selection) |
| host | Yes | Database hostname |
| port | No | Port number (default: 5432) |
| database | Yes | Database name |
| user | Yes | Username |
Subscribers only
The full skill, its 5 bundled files and every download is included with every paid Complete AI plan.
Details
| Source | sanjay3290/ai-skills |
|---|---|
| License | Apache-2.0 |
| Risk label | safe ("critical" means the skill may run commands or touch files — read before use) |
| Files | README.md, SKILL.md, connections.example.json, requirements.txt, scripts/query.py |
| Added | 2026-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.
