postgres

postgres is a skill for Claude Code, Codex from dayfinggg/openai-codex-agent-skills. It costs 34 tokens per session (394 once invoked), scanned A, original, MIT.

A guide for PostgreSQL, a relational database that stores structured data in tables. It covers schemas, SQL, indexes, extensions, search, and database migrations.

In plain words
What is it for?
Use it to explore schemas, design tables and indexes, plan migrations, configure selected extensions, and build vector, text, spatial, or time-series data features.
Why use it?
It matches database work to the actual PostgreSQL version and connection scope instead of applying unsuitable SQL or changing the wrong schema.

Skill for Claude CodeCodex

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

Good fit Use it to explore schemas, design tables and indexes, plan migrations, configure selected extensions, and build vector, text, spatial, or time-series data features.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dayfinggg/openai-codex-agent-skills/postgres
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 dayfinggg/openai-codex-agent-skills --skill postgres
Clone the repo
git clone --depth 1 https://github.com/dayfinggg/openai-codex-agent-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 postgres

README.md
[![agentmods](https://agentmods.dev/badge/skills/dayfinggg/openai-codex-agent-skills/postgres/github.svg)](https://agentmods.dev/skills/dayfinggg/openai-codex-agent-skills/postgres)
Your own site
<a href="https://agentmods.dev/skills/dayfinggg/openai-codex-agent-skills/postgres"><img src="https://agentmods.dev/badge/skills/dayfinggg/openai-codex-agent-skills/postgres/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 postgres

Your own site · 80×15
<a href="https://agentmods.dev/skills/dayfinggg/openai-codex-agent-skills/postgres"><img src="https://agentmods.dev/badge/skills/dayfinggg/openai-codex-agent-skills/postgres.svg" alt="Reviewed on agentmods" width="80" 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 394 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.00034 $0.00394
Opus 5.5 $0.00014 $0.00158
Sonnet 5.5 $0.00007 $0.00079
Haiku 4.5 $0.00003 $0.00039

Measured today against content hash 4a3b4975846f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

postgres 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 today.

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.

codex/skills/postgres/SKILL.md · 26 lines

What it actually says

Use the PostgreSQL procedure that owns the requested result. Establish the database version, connection scope, and relevant schemas before applying version-sensitive SQL.

Read host integration once when using these bundled procedures.

Task Read
Understand an existing database or establish query meaning Schema exploration
Design tables, types, keys, constraints, or indexes Table design
Plan or perform a PostgreSQL schema migration Migration procedure
Design spatial data with PostGIS PostGIS tables
Implement vector similarity search with pgvector Vector search
Combine keyword and semantic search Hybrid text search
Configure an explicitly selected TimescaleDB deployment Hypertable setup
Evaluate existing tables for hypertable conversion Candidate analysis
Convert tables to hypertables Hypertable migration

Use the complete procedure overview only when a task spans several areas and the correct ownership remains unclear.

Load the selected procedure and only its task-relevant supporting files. Preserve plain PostgreSQL when an extension has not been selected. For database-independent rollout compatibility, use the installed database-migration-rollout skill when that release work is requested.

Files

What ships with it

25 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. today First seen · 26 lines · 34 tokens per session scan A 4a3b4975846f

Subscribe to this mod's changes

postgres is a skill published in the GitHub repository dayfinggg/openai-codex-agent-skills (8 stars, last pushed today), licensed MIT. It adds 34 tokens to every session and 394 once invoked, about $0.0001 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-10-30.

Related

Other skills, from other repositories

factory-data-layer

Database schema, ORM, and migration conventions across builds. Drizzle as default with domain-partitioned schema modules, shared timestamps helper, multi-tenancy keys with cascade delete, pgTableCreator prefixing, JSONB for flexible attributes, schema-derived type exports, polymorphic table patterns, ESLint Drizzle…

nonlinear-xyz/factory-kit · 84 tokens

database-reviewer

PostgreSQL specialist for evidence-backed review of query correctness and performance, schema design, indexes, transactions and migration safety in the assigned scope.

RaNDoM6913/claude-code-superkit · 32 tokens

postgresql-optimization

PostgreSQL optimization — query tuning, indexing strategies, EXPLAIN analysis, configuration, maintenance, and monitoring. Use when slow queries, missing indexes, vacuum lag, or performance bottlenecks are suspected.

RaNDoM6913/claude-code-superkit · 46 tokens

db-patterns

SocialApp database patterns — pgx usage, migrations, repository layer, transactions, common queries.

RaNDoM6913/claude-code-superkit · 22 tokens

review-database

Use when the user asks for a database review, SQL review, migration review, migration safety check, schema review, schema design review, query performance review, index review, connection pool review, transaction management review, "is this migration safe", "will this lock the table", or a squawk run. Applies to…

paultyng/skill-issue · 84 tokens

qlocalclonedb

Clone a staging tenant's database into a named local Postgres DB for realistic local testing — copies schema + data so you can reproduce issues against production-shaped data. Use before local E2E when you need real tenant data; qspinuplocal calls it when a project ships a local-DB bootstrap.

3awny/qship · 68 tokens