postgres-readonly-queries
Execute safe read-only SQL queries against PostgreSQL databases with multi-connection support and defense-in-depth write protection.
npx skills add sickn33/agentic-awesome-skills --skill postgres-readonly-queries --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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: ```bash chmod 600 connections.json ``` ```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
- When to Use
- Requirements
- Setup
- Config Fields
- Usage
- List configured databases
- Query a database
- List tables
- Show schema
- Limit results
- Database Selection
- Safety Features
- Troubleshooting
- Exit Codes
chmod 600 connections.json python3 scripts/query.py --list python3 scripts/query.py --db production --query "SELECT * FROM users LIMIT 10" python3 scripts/query.py --db production --tables python3 scripts/query.py --db production --schema python3 scripts/query.py --db production --query "SELECT * FROM orders" --limit 100
What does the postgres-readonly-queries skill do?
Execute safe read-only SQL queries against PostgreSQL databases with multi-connection support and defense-in-depth write protection.
How do I install it?
Run `npx skills add sickn33/agentic-awesome-skills --skill postgres-readonly-queries --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From sickn33/agentic-awesome-skills, a repository with 44,414 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.