Execute read-only SQL queries against multiple PostgreSQL databases. Use when: (1) querying PostgreSQL databases, (2) exploring database schemas/tables, (3) running SELECT queries for data analysis, (4) checking database contents. Supports multiple database connections with descriptions for intelligent auto-selection. Blocks all write operations (INSERT, UPDATE, DELETE, DROP, etc.) for safety.
The PostgreSQL Read-Only Query Skill allows users to execute safe, read-only SQL queries against multiple PostgreSQL databases. This skill addresses the need for efficient querying and analysis without the risk of modifying data, making it ideal for data analysts, developers, and database administrators who require access to database contents while ensuring data integrity. By blocking all write operations and providing a secure environment for executing queries, this skill offers peace of mind when interacting with critical database systems.
Main features include support for multiple database connections with intelligent auto-selection based on user intent, query validation to ensure only safe operations are performed, and configurable SSL modes for secure connections. The skill also incorporates various safety features such as read-only sessions, query timeouts, and limits on the number of rows returned, ensuring optimal performance without compromising system stability. Additionally, users can explore database schemas and tables, making it easier to understand the structure and contents of the databases they are working with.
This skill is particularly useful in scenarios where users need to conduct data analysis, explore database structures, or check the current state of database contents without altering any data. Target users include data analysts, business intelligence professionals, and developers who need to interact with PostgreSQL databases in a read-only capacity, ensuring that they can obtain the necessary information while maintaining the integrity and security of the underlying data.
Run the command `python3 scripts/query.py --list`.
The skill requires Python 3.8 or higher.
No, this skill is strictly for read-only operations and blocks all write actions.
You can try setting the sslmode to 'disable' in your connections.json file for local databases.
Yes, the skill limits the results to a maximum of 10,000 rows per query.
Quick Setup:
.claude/skills/Repository
sanjay3290/ai-skills