postgres

Manage and query PostgreSQL databases from the command line via psql.

24|11|Updated Feb 19, 2026
One-click install
npx skills add https://github.com/clawdata/clawdata --skill postgres-clawdata
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres
Source: https://github.com/clawdata/clawdata/tree/main/skills/postgres
Command: npx skills add https://github.com/clawdata/clawdata --skill postgres-clawdata

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PostgreSQL administration and exploration tasks often require switching between tools and writing repetitive queries. This skill provides a concise guide to connecting to PostgreSQL, discovering databases, schemas, tables, and running common commands from the psql CLI, streamlining data work.

Core Features & Use Cases

  • Connect via connection string or environment variables (PGHOST, PGPORT, PGUSER, PGPASSWORD, PGDATABASE) to PostgreSQL servers.
  • List databases, schemas, tables, describe tables, and execute ad-hoc queries to inspect data.
  • Use for routine maintenance, data exploration, and quick database administration tasks in local or remote environments.

Quick Start

Install psql and set connection variables as needed, then connect and run a sample query to verify access.

Frequently Asked Questions about postgres

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

FAQPage Schema
How do I connect to a PostgreSQL database from the command line?

Connect to a PostgreSQL database by providing a connection string or setting PG environment variables like PGHOST, PGPORT, and PGUSER. This allows direct psql CLI access to local or remote servers for querying and administration.

How do I list databases, schemas, and tables in PostgreSQL?

List PostgreSQL databases, schemas, and tables using built-in psql commands. This streamlines database exploration and schema inspection directly from the CLI without writing repetitive SQL queries.

Can I run ad-hoc SQL queries on a remote PostgreSQL server using psql?

Yes, you can execute ad-hoc SQL queries on a remote PostgreSQL server. Configure the connection using environment variables or a connection string, then run your queries via the psql command line interface.

Do I need to install psql separately to manage PostgreSQL databases?

Yes, installing the psql client is required to manage PostgreSQL databases. Once installed, set your connection variables and connect to local or remote servers to perform routine maintenance and data exploration.

What is the best way to perform routine PostgreSQL administration tasks?

The best way to perform routine PostgreSQL administration is using the psql CLI for direct server access. It supports schema inspection, table descriptions, and ad-hoc querying, streamlining maintenance without switching tools.

Why does my PostgreSQL database exploration require switching between tools?

PostgreSQL database exploration often requires switching tools when lacking a consolidated CLI guide. Using psql commands directly addresses this by enabling schema discovery, table descriptions, and query execution in one interface.