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.
npx agentmods add skills/unique-divine/jiyuu/postgresql-psqlnpx skills add Unique-Divine/jiyuu --skill postgresql-psqlgit clone --depth 1 https://github.com/Unique-Divine/jiyuuWrote 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.
[](https://agentmods.dev/skills/unique-divine/jiyuu/postgresql-psql)<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="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00064 | $0.00634 |
| Opus 5 | $0.00032 | $0.00317 |
| Sonnet 5 | $0.00013 | $0.00127 |
| Haiku 4.5 | $0.00006 | $0.00063 |
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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PostgreSQL psql Skill
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
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.
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.
- 5d ago First seen · 93 lines · 64 tokens per session scan A 0468c2536845
postgresql-psql is a skill published in the GitHub repository Unique-Divine/jiyuu (6 stars, last pushed 23d ago), licensed MIT. It adds 64 tokens to every session and 634 once invoked, about $0.0003 per session on Opus 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.
Other skills, from other repositories
postgres-performance
PostgreSQL latency, load, locks, connections, WAL, vacuum, planner, and capacity depth reference.
postgres-schema-design
Relational identity, cardinality, invariant, constraint, lifecycle, and migration depth reference.
postgres
Use when designing, querying, or managing a PostgreSQL database. Enforces enterprise production rules for advanced querying, composite indexing, JSONB data handling, and strict optimization patterns (avoiding N+1). Keywords: PostgreSQL query, JSONB, pg, pgvector, RLS, Postgres migration. MUST-ASK: Require explicit…
postgresql-table-design
Design a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features.
sql-optimization-patterns
Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries. Use when debugging slow queries, designing database schemas, or optimizing application performance.
alloydb-basics
Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates with AlloyDB Model Context Protocol (MCP) tools for automated database operations. Use when creating, configuring, or administering AlloyDB databases. Do NOT use for general PostgreSQL instances (e.g. Cloud SQL) or other GCP databases.