postgres-sql-fundamentals

postgres-sql-fundamentals is a skill for Claude Code, Codex from vikasudasi/skill-vault. It costs 38 tokens per session (1,402 once invoked), scanned A, original, Apache-2.0.

A practical guide to PostgreSQL, a database server designed for multiple clients and concurrent work. It covers schemas, constraints, indexes, transactions, query analysis, backups, permissions, and connection pooling.

In plain words
What is it for?
Use it when moving an application from SQLite to PostgreSQL or designing a shared database with migrations, roles, indexes, transactions, backups, or pooled connections.
Why use it?
It explains when a single-file SQLite database is no longer enough, such as when several app processes need to write at once or stronger production controls are required.

Skill for Claude CodeCodex

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/vikasudasi/skill-vault/postgres-sql-fundamentals
Any agent
npx skills add vikasudasi/skill-vault --skill postgres-sql-fundamentals
Clone the repo
git clone --depth 1 https://github.com/vikasudasi/skill-vault

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 postgres-sql-fundamentals

README.md
[![agentmods](https://agentmods.dev/badge/skills/vikasudasi/skill-vault/postgres-sql-fundamentals.svg)](https://agentmods.dev/skills/vikasudasi/skill-vault/postgres-sql-fundamentals)
Your own site
<a href="https://agentmods.dev/skills/vikasudasi/skill-vault/postgres-sql-fundamentals"><img src="https://agentmods.dev/badge/skills/vikasudasi/skill-vault/postgres-sql-fundamentals.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,402 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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 $0.00038 $0.01402
Opus 5 $0.00019 $0.00701
Sonnet 5 $0.00008 $0.00280
Haiku 4.5 $0.00004 $0.00140

Measured 4d ago against content hash 207ae775482a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

postgres-sql-fundamentals 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 4d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/postgres_queries.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skill_vault/data/skills/postgres-sql-fundamentals/SKILL.md · 132 lines

How it starts

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

PostgreSQL Fundamentals (When You Outgrow SQLite)

Use when a single-file SQLite DB hits its ceilings — concurrent writes, a shared server with many clients, or multi-process isolation — and you move to a networked Postgres. This is the Postgres counterpart to Skill Vault's sqlite-optimization; where that skill tunes a single file, this one runs a real server with connections, roles, and a query planner.

SQLite → Postgres decision table

concern SQLite Postgres
concurrency single writer, WAL-readers MVCC: concurrent reads+writers
deployment embedded, one file server, clients connect over TCP
data types flexible/affinity strict, rich (arrays, JSONB, enum)
migration ad-hoc real migrations, DDL transactions
backups file copy / .backup pg_dump / WAL + PITR
user management none roles, grants, row-level security

Reach for Postgres when you have real concurrent writers, multiple app instances, or need production guarantees. For a single-user local tool, SQLite (WAL) is still the right call.

psql basics

psql "postgresql://user:pass@host:5432/db"
command purpose
\l list databases
\dt list tables
\d table describe table + indexes
\d+ table detailed (incl. sizes)
\x expanded output (friendly)
\timing show query time
\q quit

Connect with a URL or named database; use PGPASSWORD/~/.pgpass rather than typing secrets at the prompt in logs.

Read the full file on GitHub · 132 lines

Files

What ships with it

2 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. 4d ago First seen · 132 lines · 38 tokens per session scan A 207ae775482a

Subscribe to this mod's changes

postgres-sql-fundamentals is a skill published in the GitHub repository vikasudasi/skill-vault (0 stars, last pushed 19d ago), licensed Apache-2.0. It adds 38 tokens to every session and 1,402 once invoked, about $0.0002 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.