Agent skill · writing content · sickn33
postgresql-cli
PostgreSQL interactive terminal (psql) reference and usage guide.
Why this skill is useful
Provides detailed usage patterns and commands for PostgreSQL's psql client that the AI wouldn't reliably generate on its own.
What it needs
Requires postgresql-client installed locally. About 9k tokens when loaded. Last updated 2026-08-07. 44,571 stars on the source repository.
What this skill does
psql — PostgreSQL Interactive Terminal psql is PostgreSQL's feature-rich interactive terminal. It lets you write and execute queries, inspect database objects, import/export data, script batch operations, and customize output formatting — all from the command line. Prerequisites Before using psql, verify it is installed and available: psql ships as part of the postgresql-client package. The server (postgresql) is not required — you only need the client to connect to a remote PostgreSQL instance. Quick Reference Connecting On connection failure: interactive mode keeps the previous connection; script mode closes it and all subsequent database commands fail until the next successful \c. Key flags: -h host, -p port, -U user, -d database, -w no password prompt, -W force password prompt, -1 single transaction, -f execute file, -c execute command, -t tuples only, -x expanded, -A unaligned, -E echo hidden queries (\d internals), -L log file, -X skip ~/.psqlrc. Connection precedence: CLI flags > environment variables > pgservice.conf > defaults. Password precedence: connection string/password flag > PGPASSWORD env > ~/.pgpass. Use ~/.pgpass instead of PGPASSWORD in production — PGPASSWORD is visible in process listings (ps aux). …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills sickn33/postgresql-cli--39de05