postgresql-psql

postgresql-psql is a skill for Claude Code, Codex from Unique-Divine/jiyuu. It costs 64 tokens per session (634 once invoked), scanned A, original, MIT.

A guide to psql, PostgreSQL's command-line program for connecting to databases and running SQL or psql-specific commands. PostgreSQL is a database system, while psql is its interactive terminal client.

In plain words
What is it for?
Use it to query PostgreSQL, create and manage databases and database objects, automate administration, export results, handle transactions, and debug SQL.
Why use it?
It gives one reference for interactive database work, scripts, connections, output formatting, transactions, permissions, and troubleshooting instead of relying on remembered commands.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to query PostgreSQL, create and manage databases and database objects, automate administration, export results, handle transactions, and debug SQL.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/unique-divine/jiyuu/postgresql-psql
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Unique-Divine/jiyuu --skill postgresql-psql
Clone the repo
git clone --depth 1 https://github.com/Unique-Divine/jiyuu

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for postgresql-psql

README.md
[![agentmods](https://agentmods.dev/badge/skills/unique-divine/jiyuu/postgresql-psql/github.svg)](https://agentmods.dev/skills/unique-divine/jiyuu/postgresql-psql)
Your own site
<a href="https://agentmods.dev/skills/unique-divine/jiyuu/postgresql-psql"><img src="https://agentmods.dev/badge/skills/unique-divine/jiyuu/postgresql-psql/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for postgresql-psql

Your own site · 80×15
<a href="https://agentmods.dev/skills/unique-divine/jiyuu/postgresql-psql"><img src="https://agentmods.dev/badge/skills/unique-divine/jiyuu/postgresql-psql.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 634 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00064 $0.00634
Opus 5.5 $0.00026 $0.00254
Sonnet 5.5 $0.00013 $0.00127
Haiku 4.5 $0.00006 $0.00063

Measured 3d ago against content hash d7724b8c5067, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

postgresql-psql scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

ai-skills/postgresql-psql/SKILL.md · 94 lines

How it starts

The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PostgreSQL psql Skill

Version: 1.0.0.

PostgreSQL psql (PostgreSQL interactive terminal) is the primary command-line client for interacting with PostgreSQL databases. It provides both interactive query execution and powerful scripting capabilities for database management and administration.

When to Use This Skill

Use this skill when:

  • Connecting to PostgreSQL databases from the command line
  • Executing SQL queries interactively
  • Writing SQL scripts for automation
  • Creating and managing databases and schemas
  • Managing database objects (tables, views, indexes, functions)
  • Backing up and restoring databases
  • Configuring connections and authentication
  • Formatting and exporting query results
  • Managing transactions and permissions
  • Debugging SQL queries
  • Automating database administration tasks
  • Setting up replication and high availability
  • Creating stored procedures and functions

Core Concepts

REPL Model

  • psql operates as an interactive REPL (Read-Eval-Print Loop)
  • Accepts SQL commands and meta-commands (backslash commands)
  • Maintains connection state across commands within a session
  • Supports command history and editing

Command Types

  • SQL Commands: Standard SQL statements (SELECT, INSERT, UPDATE, DELETE, etc.)
  • Meta-Commands: psql-specific commands prefixed with backslash (e.g., \dt, \d)
  • Backslash Commands: Control query output, session variables, and psql behavior

Connection Model

  • Single database connection per session
  • Can switch databases without reconnecting
  • Connection state includes current database, user, and search path
  • Environmental variables and .pgpass for credential management

Reference Pointers

Detailed command lists, flags, and configuration options are available in reference.md:

  • Connect and Authenticate
  • Meta-Commands
  • Output and Formatting
  • Files, Editor, and Scripting
  • Command-Line Flags
  • Import and Export
  • Backup and Restore
  • Performance and Debug Toolbox
  • Troubleshooting

Read the full file on GitHub · 94 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago Changed · +1 lines d7724b8c5067
  2. 1mo ago First seen · 93 lines · 64 tokens per session scan A 0468c2536845

Subscribe to this mod's changes

postgresql-psql is a skill published in the GitHub repository Unique-Divine/jiyuu (6 stars, last pushed 4d ago), licensed MIT. It adds 64 tokens to every session and 634 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.