Backend Test Worker
CorrectRoadH/OpenTickly
Build and verify real-Postgres Go tests and thin transport smoke for tracking behavior.
PostgreSQL interactive terminal (psql) reference and usage guide.
$ npx skills add sickn33/agentic-awesome-skills --skill postgresql-cli -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install sickn33/agentic-awesome-skills postgresql-cli --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/postgresql-cli .claude/skills/postgresql-cli && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "postgresql-cli" agent skill from https://github.com/sickn33/agentic-awesome-skills/tree/main/skills/postgresql-cli into .claude/skills/postgresql-cli/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "postgresql-cli", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/sickn33/agentic-awesome-skills/tree/main/skills/postgresql-cliType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add sickn33/agentic-awesome-skills --skill postgresql-cli -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install sickn33/agentic-awesome-skills postgresql-cli --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/postgresql-cli .agents/skills/postgresql-cli && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "postgresql-cli" agent skill from https://github.com/sickn33/agentic-awesome-skills/tree/main/skills/postgresql-cli into .agents/skills/postgresql-cli/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "postgresql-cli", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add sickn33/agentic-awesome-skills --skill postgresql-cli -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install sickn33/agentic-awesome-skills postgresql-cli --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/postgresql-cli .cursor/skills/postgresql-cli && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "postgresql-cli" agent skill from https://github.com/sickn33/agentic-awesome-skills/tree/main/skills/postgresql-cli into .cursor/skills/postgresql-cli/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "postgresql-cli", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/sickn33/agentic-awesome-skills.git --path skills/postgresql-cli--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add sickn33/agentic-awesome-skills --skill postgresql-cli -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install sickn33/agentic-awesome-skills postgresql-cli --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/postgresql-cli .gemini/skills/postgresql-cli && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "postgresql-cli" agent skill from https://github.com/sickn33/agentic-awesome-skills/tree/main/skills/postgresql-cli into .gemini/skills/postgresql-cli/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "postgresql-cli", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install sickn33/agentic-awesome-skills postgresql-cliInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add sickn33/agentic-awesome-skills --skill postgresql-cli -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/postgresql-cli .github/skills/postgresql-cli && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "postgresql-cli" agent skill from https://github.com/sickn33/agentic-awesome-skills/tree/main/skills/postgresql-cli into .github/skills/postgresql-cli/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "postgresql-cli", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add sickn33/agentic-awesome-skills --skill postgresql-cli -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install sickn33/agentic-awesome-skills postgresql-cli --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/postgresql-cli .opencode/skills/postgresql-cli && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "postgresql-cli" agent skill from https://github.com/sickn33/agentic-awesome-skills/tree/main/skills/postgresql-cli into .opencode/skills/postgresql-cli/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "postgresql-cli", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
postgresql-cliPostgreSQL interactive terminal (psql) reference and usage guide.
Postgresql CLI is an agent skill from sickn33/agentic-awesome-skills. PostgreSQL interactive terminal (psql) reference and usage guide.
Its SKILL.md is about 7.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including reference files (for example `references/cli-options-and-variables.md`, `references/meta-commands-core.md` and `references/meta-commands-formatting.md`).
It sits in Databases. It works with PostgreSQL. The repository describes itself as: AAS Core is the local, agent-first control plane for complete catalog discovery, agent-owned selection, stack validation, and planning, backed by 2,400+ agentic skills. Includes… The licence is Apache-2.0.
Read from SKILL.md and the folder at commit 1e53ce2. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
psqlbrewaptyumapkFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
postgresql.orgwiki.postgresql.orgFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Postgresql CLI loads about 7.4k tokens when it runs, and up to ~26k if it reads all its reference files. Until then it costs about 20 tokens; SKILL.md has 1,751 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
sudo apt install postgresql-clientsudo yum install postgresqlAutomated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from sickn33/agentic-awesome-skills at commit 1e53ce2, republished under its Apache-2.0 licence (© sickn33). 1,751 words, ~7,389 tokens.
.claude/skills/postgresql-cli/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.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.
Before using psql, verify it is installed and available:
# Check if psql is installed
psql --version
# If not found, install PostgreSQL client tools:
# macOS (Homebrew)
brew install libpq
brew link --force libpq
# Ubuntu / Debian
sudo apt install postgresql-client
# CentOS / RHEL
sudo yum install postgresql
# Alpine
apk add postgresql-client
# Windows — install PostgreSQL via the official installer or use WSLpsql 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.
# 1. CLI flags
psql -h host -p port -U user -d dbname
# 2. Connection URI
# WARNING: Password in URI is visible in shell history and process listings.
# Prefer ~/.pgpass for production use (see method 4 below).
psql "postgresql://user:YOUR_PASSWORD@host:port/dbname"
# 3. Environment variables (no flags needed)
export PGHOST=localhost
export PGPORT=5432
export PGDATABASE=mydb
export PGUSER=postgres
# WARNING: PGPASSWORD is visible in process listings (e.g. `ps aux`).
# Use ~/.pgpass in production instead.
export PGPASSWORD=YOUR_PASSWORD
psql # picks up all params from env
# 4. ~/.pgpass file (RECOMMENDED for passwords)
# Format: hostname:port:database:username:password
touch ~/.pgpass && chmod 600 ~/.pgpass
# Then manually edit ~/.pgpass and add entries (avoids password in shell history):
# hostname:port:database:username:password
# Example: localhost:5432:mydb:postgres:YOUR_PASSWORD
psql -h localhost -U postgres -d mydb # no password prompt
# 5. Execute and exit
psql -f script.sql dbname # execute file then exit
psql -c "SELECT 1" dbname # run single command then exit
psql -1 -f migration.sql dbname # run in single transaction
# 6. Service connection (reads from pg_service.conf)
psql service=mydb_prod
# 7. Reconnect within a session
\c dbname # reconnect to different db
\c -reuse-previous=on sslmode=require # change only sslmode
\c "host=newhost port=5432 dbname=mydb" # conninfo stringOn 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 > pg_service.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).
| Command | Shows |
|---|---|
\d | All tables, views, materialized views, sequences, foreign tables (equiv.\dtvmsE) |
\dP | Partitioned tables |
\dt | Tables only |
\dv | Views only |
\di | Indexes only |
\ds | Sequences only |
\dm | Materialized views only |
\det | Foreign tables (mnemonic: "external tables") |
\dT | Data types |
\df | Functions (use modifiers:a=aggregate, n=normal, p=procedure, t=trigger, w=window) |
\da | Aggregate functions |
\dn | Schemas |
\du / \dg | Roles |
\db | Tablespaces |
\dc | Conversions |
\dD | Domains |
\dl | Large objects (alias for \lo_list) |
\dF | Text search configurations |
\dFd | Text search dictionaries |
\dFp | Text search parsers |
\dFt | Text search templates |
\des | Foreign servers |
\deu | User mappings |
\dew | Foreign-data wrappers |
\dp | Privileges (GRANT/REVOKE) |
\drds | Per-role and per-database configuration settings |
\l | List databases (accepts pattern:\l test*) |
| \dA | Access methods |
| \dAc / \dAf / \dAo / \dAp | Operator classes, families, operators, support functions |
| \dC | Type casts |
| \dconfig | Server configuration parameters (\dconfig * for all, PostgreSQL 16+) |
| \dd | Object descriptions (comments) |
| \ddp | Default privileges |
| \dL | Procedural languages |
| \do | Operators (accepts arg type patterns) |
| \dO | Collations |
| \dP[itn] | Partitioned tables (t=tables, i=indexes, n=nested) |
| \drg | Granted role memberships |
| \dRp / \dRs | Replication publications / subscriptions |
| \dX | Extended statistics |
| \dx | Installed extensions |
| \dy | Event triggers |
| \sf[+] | Show function definition |
| \sv[+] | Show view definition |
| \z | Privileges (alias for \dp) |
Modifiers (append to most \d commands):
+ — extra info (size, description): \dt+, \l+, \du+S — include system objects: \dtS, \dfS+x — expanded display mode: \dt+x (note: \dx is a different command; x must follow S or +)Provide a name for details: \d table_name shows columns, types, indexes, constraints, foreign keys.
Pattern matching in \d commands:
* = any sequence of characters, ? = single character. separates schema from object: \dt public.* or \dt my_schema.users.. separates database.schema.object: \dt mydb.public.* (db must match current db)\dt "FOO" matches FOO not foo$ is matched literally (not regex anchor)[0-9] work: \dt user[0-9]* matches user1, user2search_path (not all objects in DB)*.* to see all objects in all schemas regardless of visibility| Command | Action |
|---|---|
; | Execute the current query buffer |
\g | Execute (like ;, but can add options) |
\gx | Execute with expanded output (like \g, forces \x on) |
\g filename | Execute and send output to file |
\g | command | Execute and pipe output to shell command |
\g (format=csv footer=off) file | Execute with one-shot formatting options |
\gdesc | Describe result columns without executing |
\gset [prefix] | Execute and store results in psql variables |
\gexec | Execute each cell of result as a SQL command |
\crosstabview | Display result as crosstab (pivot table) |
\watch | Re-execute query periodically (see below) |
\bind [params...] | Use extended query protocol with parameters. Works with \g, \gx, and \gset |
\bind_named stmt_name [params...] | Bind named prepared statement |
\parse stmt_name | Create prepared statement from current query buffer |
\close_prepared stmt_name | Close a prepared statement |
\; | Append semicolon to buffer without executing |
-- Server-side (requires superuser for file access, uses server filesystem)
COPY table TO '/path/file.csv' WITH (FORMAT csv, HEADER true);
COPY table FROM '/path/file.csv' WITH (FORMAT csv, HEADER true);
-- Client-side (runs with client permissions, no superuser needed) — preferred
\copy table TO '/path/file.csv' WITH (FORMAT csv, HEADER true)
\copy table FROM '/path/file.csv' WITH (FORMAT csv, HEADER true)
\copy (SELECT ...) TO '/path/output.csv' WITH (FORMAT csv, HEADER true)
-- Advanced: specific columns, NULL handling, custom delimiter
\copy table (col1, col2) FROM 'data.csv' WITH (FORMAT csv, HEADER true, NULL 'N/A')\copy is the go-to for day-to-day work — it uses the client's filesystem and permissions, not the server's.
\copy syntax detail:
-- FROM (import): sources are 'filename', program 'command', stdin, pstdin
\copy table FROM 'file.csv' WITH (FORMAT csv, HEADER true) [ WHERE condition ]
-- TO (export): destinations are 'filename', program 'command', stdout, pstdout
\copy table TO 'file.csv' WITH (FORMAT csv, HEADER true)For \copy ... FROM stdin, data rows continue until a line containing only \. is read or EOF is reached. Use pstdin/pstdout to always read/write psql's actual stdin/stdout regardless of \o setting.
WARNING: The program option executes a shell command. If constructed from user input, it can lead to command injection. Avoid string concatenation with untrusted data.
Tip: \copy takes the entire rest of the line as arguments (no variable interpolation). When you need variable interpolation or multi-line queries, use SQL COPY ... TO STDOUT with \g instead:
-- This allows variable interpolation and multi-line queries
COPY (SELECT * FROM :table WHERE id > :min_id) TO STDOUT WITH (FORMAT csv, HEADER true) \g /tmp/output.csv\a Toggle aligned/unaligned output
\x Toggle expanded display (vertical vs table)
\t Toggle tuples only (no headers/footers)
\pset format FORMAT Set output format: aligned, asciidoc, csv, html, latex, latex-longtable, troff-ms, unaligned, wrapped
\pset border N Set border style (0-2; 3 for latex data-row lines)
\pset null STRING Display NULL as STRING
\pset pager [off] Control pager usage
\pset title 'TEXT' Set table title
\pset recordsep SEP Set record separator for unaligned mode
\pset fieldsep SEP Set field separator for unaligned mode (default: |)
\pset footer [on|off] Toggle row count footer
\pset columns N Set target width for wrapped format
\pset csv_fieldsep C Set CSV field separator (default: comma)
\pset numericlocale [on|off] Toggle locale-specific number formatting
\pset linestyle STYLE Set border style: ascii, old-ascii, unicode
\pset pager_min_lines N Minimum lines before pager activates
\pset xheader_width MODE Expanded header width: full, column, page, or N (PostgreSQL 17+)
\H Toggle HTML output (shortcut)
\C [title] Set table title (shortcut for \pset title)
\f [string] Set field separator (shortcut for \pset fieldsep)
\T table_options Set HTML table attributes (shortcut for \pset tableattr)\lo_import filename [comment] Import file as large object, returns OID
\lo_export loid filename Export large object to file
\lo_list[x+] List all large objects
\lo_unlink loid Delete large objectLarge object OIDs are persistent references. Always associate a human-readable comment on import. Use \lo_list to find OIDs.
\i filename Execute file (relative to current working directory)
\ir filename Execute file (relative to the script being processed)
\o [filename] Redirect query output to file (or pipe with |cmd)
\o Stop output redirection
\qecho TEXT Output text to redirected output
\echo TEXT Output text to stdout (-n suppresses trailing newline)
\warn TEXT Output text to stderr
\! command Execute shell command
\cd [dir] Change working directory
\set NAME VALUE Set psql variable
\unset NAME Unset psql variable
\prompt [TEXT] NAME Prompt user for variable value
\getenv psql_var env_var Copy environment variable into psql variable
\setenv name [value] Set or unset environment variable
\p Print current query buffer
\w filename Write query buffer to file (or pipe with |cmd)
-- Conditional execution (useful in scripts)
\if EXPR
\echo 'true branch'
\else
\echo 'false branch'
\endif
\elif EXPR Else-if inside \if block\if and \elif evaluate their argument as a boolean. Valid values (case-insensitive, unambiguous prefix matching): true, false, 1, 0, on, off, yes, no. Expressions that don't evaluate to true/false generate a warning and are treated as false. Variable references in skipped lines are NOT expanded.
Variables in SQL: :'varname' (quoted string value, escapes embedded quotes), :"varname" (double-quoted identifier), :'varname'::type (with cast), :varname (unquoted — can break SQL), :{?varname} (tests existence, expands to TRUE/FALSE).
\c [dbname [user]] Connect to database (or reconnect)
\conninfo Display connection info (includes SSL info)
\encoding [ENC] Set or show client encoding
\password [USER] Change password (does NOT appear in command history or server log)
\q Quit psql. In a script file, only that script is terminated. In interactive mode, the entire program exits.
\r Reset (clear) the query buffer
\e Edit query buffer in external editor
\ef [FUNCNAME] Edit function definition
\ev [VIEWNAME] Edit view definition
\sf[+] FUNCNAME Show function definition (read-only)
\sv[+] VIEWNAME Show view definition (read-only)
\s [FILE] Print command history (or save to file)
\restrict KEY Enter restricted mode (only \unrestrict allowed)
\unrestrict KEY Exit restricted mode
\timing [on\|off] Toggle query execution time display (milliseconds)
\errverbose Repeat last error at maximum verbosity
\? [topic] Help: commands, options, or variables
\h [command] SQL syntax help (use * for all: \h *)
\copyright Show PostgreSQL copyright\startpipeline
SELECT $1 \bind 42 \sendpipeline
SELECT $1 \bind 100 \sendpipeline
\getresults
\endpipelinePipeline mode sends multiple queries without waiting for each result, reducing round-trip latency. All queries use the extended query protocol.
Pipeline commands:
\startpipeline — begin pipeline block\endpipeline — end pipeline block and process remaining results\sendpipeline — append current query buffer to pipeline without waiting\syncpipeline — send sync message without ending pipeline\flushrequest — request server flush without sync\flush — manually push unsent data to server\getresults [N] — read pending results (N=0 or omitted means all)Pipeline limitations:
COPY is not supported in pipeline mode\g, \gx, \gdesc are not allowed inside a pipeline\bind, \bind_named, \parse, \close_prepared, or \sendpipeline within pipelines%P prompt variable shows pipeline status (on, off, or abort)\watch [i[nterval]=SECONDS] [c[ount]=TIMES] [m[in_rows]=ROWS] [SECONDS]count and min_rows require PostgreSQL 17+.
interval — seconds between executions (default: 2, overridable via WATCH_INTERVAL variable)count — stop after N executionsmin_rows — stop if query returns fewer than N rowsIf the query buffer is empty, \watch re-executes the most recently sent query.
Examples:
SELECT * FROM pg_stat_activity WHERE state = 'active';
\watch interval=5 count=10 -- every 5s, stop after 10 runs
SELECT count(*) FROM queue WHERE status = 'pending';
\watch i=1 min_rows=1 -- every 1s, stop when queue is empty| Code | Meaning |
|---|---|
| 0 | Successful completion |
| 1 | A fatal error occurred (server error, connection failure, etc.) |
| 2 | Connection failed (could not connect to the server) |
| 3 | Script execution ended due to ON_ERROR_STOP |
Before running any destructive SQL, verify impact first:
-- BEFORE DELETE: check how many rows are affected
SELECT count(*) FROM users WHERE condition; -- verify scope
BEGIN;
DELETE FROM users WHERE condition RETURNING *; -- see what was deleted
-- ROLLBACK if wrong; COMMIT only after verification
-- BEFORE DROP TABLE: verify no foreign keys depend on it
\d table_name -- check "Referenced by" section
-- Consider renaming first: ALTER TABLE old RENAME TO old_backup;| Command/Pattern | Risk | Mitigation |
|---|---|---|
\gexec | Executes generated SQL without confirmation | Always inspect the generating query first by running it without \gexec; set ON_ERROR_STOP on |
\! command | Arbitrary shell execution | No sandboxing; commands run with psql user's full privileges |
\copy ... program 'cmd' | Shell command injection if filename comes from user input | Never concatenate untrusted input into the program string |
\deu+ | May display remote user passwords | Avoid using \deu+ in shared/piped output; use \deu without + |
DELETE/UPDATE without WHERE | Affects every row in the table | Always use WHERE; wrap in BEGIN/ROLLBACK to preview |
DROP DATABASE/TABLE | Irreversible data loss | Verify you're on the correct database with \conninfo first |
psql variables are plain text substitution, not parameterized queries. This means:
-- UNSAFE: if :name contains "Robert'); DROP TABLE users;--" it will execute the injection
SELECT * FROM users WHERE name = :'name';
-- SAFER: use \prompt for interactive input (user sees what they typed)
\prompt 'Enter name: ' search_name
SELECT * FROM users WHERE name = :'search_name';
-- SAFEST: use \bind for programmatic parameter passing (truly parameterized)
SELECT * FROM users WHERE name = $1;
\bind 'Robert' \gThe :'varname' form (quoted) is always safer than :varname (unquoted), because unquoted substitution can break SQL syntax or enable injection. Use :"varname" for identifiers (table/column names) — it properly escapes embedded double quotes.
| Scenario | Recommended Command |
|---|---|
| Quick table inspection | \d table_name |
| List all tables in schema | \dt schema.* |
| Check indexes on a table | \di+ table_name* or \d table_name |
| Export query to CSV | \copy (SELECT ...) TO 'file.csv' WITH (FORMAT csv, HEADER) |
| Import CSV into table | \copy table FROM 'file.csv' WITH (FORMAT csv, HEADER) |
| Run migration script | psql -1 -f migration.sql dbname |
| Watch a live query | SELECT ... \watch 5 |
| Pivot query results | SELECT ... \crosstabview |
| Script with conditional logic | \if :var ... \endif |
| Batch-insert many rows | Use \startpipeline / \endpipeline |
| SQL syntax help | \h CREATE TABLE |
| psql command help | \? commands |
| Check query execution time | \timing on then run query |
| Debug error details | \errverbose |
| Handle large result sets | \set FETCH_COUNT 1000 then run query |
| Auto-savepoint on errors | \set ON_ERROR_ROLLBACK on then use transactions |
references/meta-commands-core.md — Core meta-commands: query buffer behavior, argument parsing rules, connection management, query execution, \copy syntax, and scripting commands (\if, \i, \o, backquote expansion). Read this when you need exact syntax or behavioral details for any backslash command.references/meta-commands-inspection.md — Full \d command reference: all object inspection commands, modifiers (S, +, x), and pattern matching rules. Read this when exploring database schema or when the user needs to inspect tables, indexes, views, functions, privileges, etc.references/meta-commands-formatting.md — Output formatting (\pset options and all format descriptions), pipeline mode, \watch, \crosstabview, and session management (\e, \ef, \ev, \timing, etc.). Read this when the user needs to control output format or use pipeline mode.references/cli-options-and-variables.md — All CLI flags, environment variables, psql internal variables (AUTOCOMMIT, ON_ERROR_STOP, ECHO, FETCH_COUNT, etc.), prompt customization, ~/.psqlrc configuration, and SQL interpolation syntax. Read this when configuring psql startup behavior, writing scripts that depend on variable state, or customizing prompts.references/tips-workflows.md — Practical workflows (exploring a new database, understanding table structure), scripting patterns (safe scripts, conditional execution, \gexec), output control for automation, and data import/export patterns. Read this when the user asks how to accomplish a specific task with psql.references/tips-advanced.md — Performance tips, debugging/introspection (EXPLAIN, lock analysis, ECHO_HIDDEN), safety best practices (ON_ERROR_STOP, transaction patterns, search_path safety), and common gotchas. Read this for lock analysis, query plan inspection, and troubleshooting.psql handles two comment styles differently:
/* ... */): Passed to the server for processing and removal.--): Removed by psql itself, before sending to the server.This distinction matters when writing scripts that rely on comment behavior — only SQL-standard comments are stripped client-side.
psql allows indirect variable references through \set:
\set foo 'my_table'
\set bar :foo -- copies the value of foo into bar
\echo :bar -- outputs: my_tableWhile constructs like \set :foo 'something' are syntactically valid, they produce "soft links" that have limited practical use. For straightforward variable copying, use \set new_var :old_var.
psql works best with servers of the same or an older major version. Backslash commands (especially \d family) may fail with newer server versions. When connecting to multiple server versions, use the newest available psql client. The \d commands generally work with servers back to version 9.2.
© sickn33, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 6 other files (references) in skills/postgresql-cli of sickn33/agentic-awesome-skills.
Open the folder on GitHubat commit 1e53ce2
We found 5 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in sickn33/agentic-awesome-skills, which our catalogue first saw on October 7, 2026.
Postgresql CLI next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Postgresql CLI this skillsickn33/agentic-awesome-skills | 47k | 1 repos | ~7.4k | Automated safety check: Notes | Apache-2.0 | |
| Backend Test WorkerCorrectRoadH/OpenTickly | 306 | — | ~1.3k | Automated safety check: Pass | AGPL-3.0 | |
| Ef Core Migrationsjihadkhawaja/Egroo | 178 | — | ~673 | Automated safety check: Pass | Apache-2.0 | |
| Add Oliphaunt Extensionf0rr0/oliphaunt | 105 | — | ~1.4k | Automated safety check: Pass | MIT | |
| Diagnose Cloud SessionFreakStudioCN/mpy-hardware-extension | 118 | — | ~809 | Automated safety check: Notes | Custom licence | |
| DB AdminEliasOulkadi/shokunin | 114 | — | ~2k | Automated safety check: Notes | MIT |
CorrectRoadH/OpenTickly
Build and verify real-Postgres Go tests and thin transport smoke for tracking behavior.
jihadkhawaja/Egroo
Handle EF Core schema changes in Egroo. An agent skill from jihadkhawaja/Egroo.
f0rr0/oliphaunt
Add, update, or remove an Oliphaunt PostgreSQL contrib or external extension, including source pins, build recipes, target support, SDK metadata, release products, carrier identities, and package…
FreakStudioCN/mpy-hardware-extension
用户报告 Blockless 扩展在云端实测时出问题(卡死/灰屏/跳步/构建失败),但本地复现不了、日志不在本地文件里时,用这个从云端托管数据库拉真实 session 定位症状与根因 / Use when a user reports an in-product Blockless bug from live cloud-backend testing and the real session…
EliasOulkadi/shokunin
PostgreSQL database administration — backup/restore (pgdump, PITR, WAL archiving), health monitoring (connections, bloat, cache hit ratio, dead tuples), connection pooling (PgBouncer), replication…
ynulihao/AgentSkillOS
Design a PostgreSQL-specific schema. An agent skill from ynulihao/AgentSkillOS.
sickn33/agentic-awesome-skills
Implements an interface in one of two named color modes, iridescent white or colorful black, from a parameterized starter that reports measured color intensity.
sickn33/agentic-awesome-skills
Saves a user's project decisions, rules and preferences into a project-local mdbase so later sessions and other agents can recover the intent.
sickn33/agentic-awesome-skills
Keeps project decisions, research and verified results available across coding-agent sessions through LWC memory, a document Wiki graph and a CodeGraph code index.
sickn33/agentic-awesome-skills
Guides an agent through assessing its own owner for cofounder fit, publishing an approved profile, and ranking complementary profiles other agents published for their owners.
sickn33/agentic-awesome-skills
Integracao com WhatsApp Business Cloud API (Meta). An agent skill from sickn33/agentic-awesome-skills.
sickn33/agentic-awesome-skills
Acts as a proxy for the Cline CLI, dispatching coding tasks one at a time, monitoring runs by hard evidence, relaying decisions to you and learning per-project preferences.
Works with
Categories
PostgreSQL interactive terminal (psql) reference and usage guide. Postgresql CLI is an agent skill from sickn33/agentic-awesome-skills. PostgreSQL interactive terminal (psql) reference and usage guide.
Postgresql CLI fits situations like: databases work in your project.
Run `npx skills add sickn33/agentic-awesome-skills --skill postgresql-cli -a claude-code`. Or copy the skill folder (skills/postgresql-cli in sickn33/agentic-awesome-skills) into .claude/skills/postgresql-cli in your project. Claude Code loads it when a task matches its description.
Run `npx skills add sickn33/agentic-awesome-skills --skill postgresql-cli -a codex`. Or copy the skill folder (skills/postgresql-cli in sickn33/agentic-awesome-skills) into .agents/skills/postgresql-cli in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sickn33/agentic-awesome-skills --skill postgresql-cli -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/postgresql-cli, .gemini/skills/postgresql-cli, .github/skills/postgresql-cli and .opencode/skills/postgresql-cli in your project.
Going by SKILL.md and its folder, Postgresql CLI needs the command-line tools its instructions call (psql, brew, apt, yum and apk).
SKILL.md names 2 domains. As links in the text: postgresql.org and wiki.postgresql.org. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (runs commands with sudo), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Postgresql CLI is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 7.4k tokens (SKILL.md is roughly 30k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 18k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Postgresql CLI: Backend Test Worker (CorrectRoadH/OpenTickly, 306 stars), Ef Core Migrations (jihadkhawaja/Egroo, 178 stars), Add Oliphaunt Extension (f0rr0/oliphaunt, 105 stars) and Diagnose Cloud Session (FreakStudioCN/mpy-hardware-extension, 118 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
sickn33 (a GitHub user) maintains it in sickn33/agentic-awesome-skills, which has 47,304 GitHub stars. The repository holds 1,394 skills in this directory. The repository was last updated on October 6, 2026.
Source: sickn33/agentic-awesome-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.