Dev10x:db-psql

Execute read-only SQL queries against PostgreSQL databases with psql.

7|2|Updated Apr 24, 2026
One-click install
npx skills add https://github.com/Dev10x-Guru/Dev10x-Claude --skill dev10x-db-psql-dev10x-guru
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Dev10x:db-psql
Source: https://github.com/Dev10x-Guru/Dev10x-Claude/tree/main/skills/db-psql
Command: npx skills add https://github.com/Dev10x-Guru/Dev10x-Claude --skill dev10x-db-psql-dev10x-guru

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires psql, python, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a secure, read-only wrapper for PostgreSQL queries within Claude Code, ensuring that database operations are safe and auditable.

Core Features & Use Cases

  • Read-Only SQL Execution: Safely execute SELECT, WITH (CTEs), EXPLAIN, and SHOW queries.
  • Pre-Execution Validation: Blocks non-SELECT queries before they reach psql.
  • Connection-Level Safety: Ensures connections are read-only.
  • Timeouts and Error Handling: Prevents runaway queries and provides clear error messages.
  • Integration with Dev10x:db: Works alongside Dev10x:db for query planning and schema discovery.
  • Use Case: Ideal for developers who need to run ad-hoc SQL queries within Claude Code without the risk of data modification.

Quick Start

Execute a read-only SQL query against a configured database using the 'Dev10x:db-psql' skill.

Frequently Asked Questions about Dev10x:db-psql

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run read-only SQL queries against a PostgreSQL database safely?

To run read-only SQL queries safely, this Skill enforces connection-level read-only permissions and pre-execution validation, blocking non-SELECT statements before they reach psql. It ensures your PostgreSQL database operations remain safe and auditable.

Can I execute PostgreSQL queries within Claude Code without risking data modification?

Yes, you can execute PostgreSQL queries within Claude Code without risking data modification. The Skill acts as a secure wrapper, allowing only SELECT, WITH (CTEs), EXPLAIN, and SHOW queries while blocking any data modification statements.

What do I need to install to execute ad-hoc SQL queries with Claude Code?

To execute ad-hoc SQL queries with Claude Code, you need psql and Python installed in your environment. These dependencies are required to run the read-only validation and query execution scripts against your PostgreSQL database.

What is the best way to prevent runaway queries when running ad-hoc SQL in Claude Code?

The best way to prevent runaway queries is to use a Skill that implements built-in timeouts and error handling. This approach automatically terminates long-running PostgreSQL queries and provides clear error messages to ensure database stability.

Does this PostgreSQL query wrapper support schema discovery and query planning?

Yes, this PostgreSQL query wrapper supports schema discovery and query planning. It integrates directly with the Dev10x:db Skill to help you plan queries and discover database schemas securely within Claude Code.

What types of SQL statements are blocked by the read-only validation?

The read-only validation blocks all non-SELECT statements, including INSERT, UPDATE, DELETE, and other data modification commands. It ensures only SELECT, WITH (CTEs), EXPLAIN, and SHOW queries reach your PostgreSQL database via psql.