PostgreSQL

PostgreSQL is a skill for Claude Code, Codex from pledgeandgrow/pledge-skills. It costs 34 tokens per session (1,907 once invoked), scanned B, original, MIT.

A reference guide to PostgreSQL 17, a database system that stores structured application data and lets programs query it with SQL. It covers tables, queries, indexes, transactions, search, replication, and advanced data types.

In plain words
What is it for?
Use it to create tables, write and tune SQL queries, add indexes, search text, manage transactions and concurrent access, and plan replication or partitioning.
Why use it?
It brings database design, querying, reliability, and performance information together when you need to store or retrieve application data.

Skill for Claude CodeCodex

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

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.

agentmods
npx agentmods add skills/pledgeandgrow/pledge-skills/postgresql
Any agent
npx skills add pledgeandgrow/pledge-skills --skill postgresql
Clone the repo
git clone --depth 1 https://github.com/pledgeandgrow/pledge-skills

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/pledgeandgrow/pledge-skills/postgresql.svg)](https://agentmods.dev/skills/pledgeandgrow/pledge-skills/postgresql)
Your own site
<a href="https://agentmods.dev/skills/pledgeandgrow/pledge-skills/postgresql"><img src="https://agentmods.dev/badge/skills/pledgeandgrow/pledge-skills/postgresql.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,907 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
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.00034 $0.01907
Opus 5 $0.00017 $0.00954
Sonnet 5 $0.00007 $0.00381
Haiku 4.5 $0.00003 $0.00191

Measured 6d ago against content hash 791c5207d961, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade B, and why

PostgreSQL scanned grade B with 1 finding 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 6d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo apt install postgresql-17
skills/postgresql/SKILL.md · 233 lines

How it starts

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

PostgreSQL 17 Documentation Skill

Overview

PostgreSQL is a powerful, open source object-relational database system that uses and extends the SQL language combined with many features that safely store and scale the most complicated data workloads. With more than 35 years of active development, PostgreSQL has earned a strong reputation for reliability, feature robustness, and performance.

Key Benefits

  • ACID-compliant — full transactional integrity with MVCC
  • Extensible — custom types, functions, operators, indexes, procedural languages
  • Standards-compliant — SQL:2023 conformance with extensive extensions
  • Scalable — parallel queries, partitioning, logical replication, connection pooling
  • Rich type system — numeric, text, temporal, geometric, network, JSON, arrays, ranges, custom types
  • Full text search — built-in tsvector/tsquery with dictionaries and ranking
  • Procedural languages — PL/pgSQL, PL/Tcl, PL/Perl, PL/Python, and more
  • High availability — streaming replication, log-shipping, hot standby, logical replication

File Index

File Topics
getting-started.md Installation, architecture, tutorial (SQL basics, joins, aggregates, views, foreign keys, transactions, window functions, inheritance)
sql-language.md SQL syntax, data types (40+ types), DDL (tables, constraints, schemas, partitioning, inheritance), DML, queries (CTEs, window functions, GROUPING SETS), functions & operators, indexes (B-Tree, Hash, GiST, SP-GiST, GIN, BRIN), full text search, concurrency control (MVCC, isolation levels, locking), performance tips (EXPLAIN, statistics), parallel query
server-admin.md Server configuration (200+ parameters), client authentication (pg_hba.conf, 10+ auth methods), database roles & privileges, managing databases, localization, maintenance (VACUUM, ANALYZE), backup & restore (pg_dump, PITR, file system), high availability & replication (streaming, synchronous, cascading, hot standby), monitoring (pg_stat_activity, pg_stat_statements, progress reporting), WAL, logical replication (publications, subscriptions, row filters), JIT compilation
server-programming.md Extending SQL (functions, procedures, aggregates, types, operators, extensions), triggers (row-level, statement-level, INSTEAD OF), event triggers, PL/pgSQL (structure, declarations, control structures, cursors, transaction management, errors), PL/Tcl, PL/Perl, PL/Python, SPI, logical decoding, contrib modules (48 extensions: pg_stat_statements, postgres_fdw, hstore, pgcrypto, pg_trgm, ltree, dblink, citext, unaccent, uuid-ossp, etc.), SQL command reference (140+ commands)
internals-reference.md Client interfaces (libpq C API: connection, execution, async, pipeline, COPY, notify, SSL, env vars, .pgpass; large objects; ECPG embedded SQL), internals (architecture, query pipeline, 60+ system catalogs, 36 system views, frontend/backend protocol v3, message types, replication protocol), reference (21 client applications: psql/createdb/pg_dump/etc., 14 server applications: initdb/pg_ctl/postgres/etc.), appendixes (error codes: 30+ classes with common codes, SQL key words: reserved/unreserved, external projects: drivers/ORMs/GUI tools/poolers/HA/monitoring/migration/extensions)

Read the full file on GitHub · 233 lines

Files

What ships with it

5 files 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. 6d ago First seen · 233 lines · 34 tokens per session scan B 791c5207d961

Subscribe to this mod's changes

PostgreSQL is a skill published in the GitHub repository pledgeandgrow/pledge-skills (10 stars, last pushed 1mo ago), licensed MIT. It adds 34 tokens to every session and 1,907 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories