Agent skill · Databases

postgres-readonly-queries

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

Nick44,086★ · +407/wk · 1 repos on radarProfile →
claude-codecodexcursorships scriptsMIT
Install
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.

Facts
Files in the skill folder: 5
SKILL.md size: 5 KB
Bundled scripts: yes
Declared author: sanjay3290
Path: skills/postgres-readonly-queries/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 44,414 · +328 this week
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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

What's inside
Steps it walks through
  1. When to Use
  2. Requirements
  3. Setup
  4. Config Fields
  5. Usage
  6. List configured databases
  7. Query a database
  8. List tables
  9. Show schema
  10. Limit results
  11. Database Selection
  12. Safety Features
  13. Troubleshooting
  14. Exit Codes
Ships with 4 files
  • README.md
  • connections.example.json
  • requirements.txt
  • scripts/query.py
Commands it runs
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
More from agentic-awesome-skills
All skills →
About this skill
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.

Keep going