postgresql-psql

Automate PostgreSQL administration using psql command-line operations.

Updated Dec 17, 2025
One-click install
npx skills add https://github.com/miethe/meatycapture --skill postgresql-psql-miethe
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgresql-psql
Source: https://github.com/miethe/meatycapture/tree/main/.claude/skills/postgresql-psql
Command: npx skills add https://github.com/miethe/meatycapture --skill postgresql-psql-miethe

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a complete, actionable reference for PostgreSQL's psql client, enabling users to perform interactive querying, script execution, and administration without flipping between docs.

Core Features & Use Cases

  • Complete Meta-Command Reference: covers backslash commands, object inspection, formatting options, and session controls.
  • Connection & Session Management: supports connecting to databases, SSL/TLS configurations, and SSH tunneling for remote access.
  • Scripting & Automation: run SQL scripts, batch commands, and manage variables with psql's scripting features.
  • Output & Data Export: formatting output with \pset, exporting data with \copy, and integrating results into reports.
  • Use Case: a developer connects to a database, runs maintenance tasks, and exports results for CI/CD reporting.

Quick Start

Use the psql skill to connect to a running PostgreSQL instance and list tables in the public schema.

Frequently Asked Questions about postgresql-psql

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

FAQPage Schema
How do I automate PostgreSQL database administration tasks using the psql command-line client?

You can automate PostgreSQL database administration with the psql command-line client by running SQL scripts, executing batch commands, and managing variables for development and operations tasks. This enables interactive querying and script execution without manual intervention.

What are psql meta-commands and how do they help with PostgreSQL object inspection?

psql meta-commands are backslash commands that enable object inspection, formatting options, and session controls within a PostgreSQL database. They provide a fast reference for interactive querying, allowing you to quickly inspect database objects without writing full SQL queries.

How do I connect to a remote PostgreSQL database using psql with SSL and SSH tunneling?

Connecting to a remote PostgreSQL database with psql involves configuring SSL/TLS certificates for encrypted connections and establishing SSH tunneling for secure remote access. This session management ensures safe access to databases across networks.

Can I export query results and format output in PostgreSQL using psql?

Yes, you can format output with the psql \pset command and export data using the \copy command in PostgreSQL. This allows you to integrate query results into reports and manage data export for CI/CD reporting workflows.

Does the psql command-line client support transaction control for batch SQL script execution?

Yes, the psql command-line client supports transaction control during batch SQL script execution in PostgreSQL. You can run SQL scripts and manage transactions to ensure database consistency during automated maintenance and operations tasks.

What is the best way to manage PostgreSQL maintenance tasks and export results for CI/CD reporting?

The best way to manage PostgreSQL maintenance tasks for CI/CD reporting is using the psql command-line client to connect to the database, run batch scripts, and export results with \copy. This automates database administration and integrates outputs into reporting pipelines.