
Postgres
This is a read-only PostgreSQL client that lets Claude query your databases safely. You set up connections in a JSON config file with descriptions like "user accounts and profiles" or "sales transactions," and Claude can auto-select the right database based on context. The security model is solid: connections are opened in read-only mode, query validation blocks anything that's not a SELECT, and there's a 30-second timeout plus 10,000 row limit to prevent runaway queries. The schema exploration commands (list tables, show structure) are genuinely useful for letting Claude understand your data model before writing queries. If you're doing data analysis or exploration with an AI assistant, this handles the boring connection plumbing while keeping your data safe from accidental writes.
- skills.sh installs
- 646
- GitHub stars
- 454
- last updated
- Aug 21, 2026
Install
$ npx -y skills add sanjay3290/ai-skills --skill postgres --agent claude-codeInstalls into .claude/skills of the current project.
Files
PostgreSQL Read-Only Query Skill
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
Sponsors
Details
- Repository
- github.com/sanjay3290/ai-skills
- Categories
- Backend & APIs, AI & Agent Building, Databases
- License
- Apache-2.0
- First seen
- Jun 3, 2026