db-executor

Execute PostgreSQL queries with dry-run previews and explicit confirmation for writes.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/paulovictor237/PeveAgent --skill db-executor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-executor
Source: https://github.com/paulovictor237/PeveAgent/tree/main/.agents/skills/db-executor
Command: npx skills add https://github.com/paulovictor237/PeveAgent --skill db-executor

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Prevents accidental data loss and unsafe database changes by enforcing a safety-first workflow for querying and modifying PostgreSQL databases.

Core Features & Use Cases

  • Safe Write Operations: Enforces WHERE validation, performs dry-run previews with affected row counts and sample rows, and requires explicit confirmation before executing UPDATE or DELETE statements.
  • Flexible Execution: Runs queries via native psql or auto-detected Docker containers and supports CSV-formatted outputs for efficient parsing.
  • Schema Discovery & Inspection: Provides table search, schema inspection, and list-tables helpers to find and understand table structures before writing queries.
  • Use Case: Inspect a users table, preview the rows that would be affected by an UPDATE, and safely apply the change only after verifying the dry-run and typing yes to confirm.

Quick Start

Ask the skill to run a SELECT or to preview and then safely execute an UPDATE/DELETE while following its mandatory dry-run and explicit yes confirmation.

Frequently Asked Questions about db-executor

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

FAQPage Schema
How do I safely execute UPDATE or DELETE queries on a PostgreSQL database?

Safe PostgreSQL writes require WHERE clause validation and a mandatory dry-run preview showing affected row counts and sample rows before requiring explicit confirmation to execute. This prevents accidental data loss during development or production debugging.

Can I run PostgreSQL queries inside a Docker container without installing psql locally?

Yes, PostgreSQL queries can run via auto-detected Docker containers as a fallback when native psql is unavailable. The execution engine automatically routes queries through Docker, outputting CSV-formatted results for efficient parsing.

How do I inspect a PostgreSQL database schema to find specific tables before writing queries?

Schema discovery and inspection tools provide table search, schema inspection, and list-tables helpers to find and understand table structures in PostgreSQL. These features help you locate target tables and review column definitions before writing queries.

What is a dry-run preview for PostgreSQL write operations and why is it necessary?

A dry-run preview for PostgreSQL writes shows the exact row count and sample rows that would be affected by an UPDATE or DELETE statement before execution. It is necessary to verify the WHERE clause targets the correct data and prevents destructive accidental modifications.

Do I need to configure database connections before executing PostgreSQL queries?

Yes, database connections are configurable via a .claude/db-settings.json file. This configuration defines the target databases for query execution and schema inspection, enabling the skill to route operations to the correct PostgreSQL instance.

What are the limitations of using Docker to execute PostgreSQL queries?

Docker-based PostgreSQL query execution depends on auto-detected running containers, requiring a properly configured container environment. If no matching container is found or Docker is unavailable, native psql must be installed as the primary execution method.