okf-postgresql

okf-postgresql is a skill for Claude Code, Codex from xSAVIKx/okf-skills. It costs 60 tokens per session (863 once invoked), scanned A, original, Apache-2.0.

A PostgreSQL connector that exports database schemas, tables, columns, keys, and comments into an Open Knowledge Format (OKF) bundle, and can sync descriptions back as PostgreSQL comments.

In plain words
What is it for?
Use it to catalogue PostgreSQL schemas, extract table and column comments, or update native database comments from an OKF bundle.
Why use it?
It keeps database structure and its human-written documentation together in a portable form, while allowing edited descriptions to return to the database.

Skill for Claude CodeCodex

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

Good fit Use it to catalogue PostgreSQL schemas, extract table and column comments, or update native database comments from an OKF bundle.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xsavikx/okf-skills/okf-postgresql
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 xSAVIKx/okf-skills --skill okf-postgresql
Clone the repo
git clone --depth 1 https://github.com/xSAVIKx/okf-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 okf-postgresql

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/xsavikx/okf-skills/okf-postgresql"><img src="https://agentmods.dev/badge/skills/xsavikx/okf-skills/okf-postgresql.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 863 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00060 $0.00863
Opus 5 $0.00030 $0.00432
Sonnet 5 $0.00012 $0.00173
Haiku 4.5 $0.00006 $0.00086

Measured 8d ago against content hash c518c3201918, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

okf-postgresql 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 8d 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.

skills/okf-postgresql/SKILL.md · 71 lines

How it starts

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

PostgreSQL OKF Connector

This skill provides a Go-based CLI tool to convert PostgreSQL database schemas and comments (table and column descriptions) into Open Knowledge Format (OKF) bundles, and synchronize comments back to a PostgreSQL database from an OKF bundle.

When to Use

Use this skill when you need to:

  1. Extract table structures, column definitions, keys, schemas, and native PostgreSQL comments (descriptions) from a schema into a portable OKF bundle.
  2. Synchronize business descriptions or documentation changes written in an OKF bundle back into native PostgreSQL table and column comments using native SQL comment mechanisms.

Setup

The connector requires Go 1.24+:

# Install the published binary (Go 1.24+) — no clone needed:
go install github.com/xSAVIKx/okf-skills/skills/[email protected]

# …or build from a clone of the repository:
cd skills/okf-postgresql
go build -o okf-postgresql .

How to Use

1. Produce an OKF Bundle

Extract database schema metadata and comments:

./okf-postgresql produce --host <host> --port <port> --user <user> --password <password> --db <database-name> --schema <schema-name> --out <output-bundle-dir> [--tables <comma-separated-table-names>] [--sample <N>] [--profile]

2. Ingest / Synchronize an OKF Bundle

Synchronize table/column descriptions from the OKF bundle back into database comments:

./okf-postgresql ingest --host <host> --port <port> --user <user> --password <password> --db <database-name> --schema <schema-name> --bundle <path-to-okf-bundle> [--sync]

Parameters:

  • --host (default localhost): PostgreSQL host.
  • --port (default 5432): PostgreSQL port.
  • --user (default postgres): PostgreSQL user.
  • --password (required): PostgreSQL password. May also be supplied via the PGPASSWORD environment variable to keep secrets out of the command line.
  • --db (required): Target database name.
  • --schema (default public): Target schema name.
  • --bundle (required for ingest): Path to the OKF bundle.
  • --out (required for produce): Path to output OKF bundle.
  • --tables (optional): Filter to extract only specific tables.
  • --sample <N> (optional): Embed up to N sample rows per table as a ## Sample section in each table doc (default 0 = none).
  • --profile (optional): Compute per-column statistics (non-null, null, distinct, min, max) and embed a ## Data Profile section.
  • --sync (optional for ingest): If provided, runs COMMENT ON TABLE ... and COMMENT ON COLUMN ... statements to synchronize descriptions.

Read the full file on GitHub · 71 lines

Files

What ships with it

12 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. 8d ago First seen · 71 lines · 60 tokens per session scan A c518c3201918

Subscribe to this mod's changes

okf-postgresql is a skill published in the GitHub repository xSAVIKx/okf-skills (33 stars, last pushed 9d ago), licensed Apache-2.0. It adds 60 tokens to every session and 863 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-30.

Related

Other skills, from other repositories

postgres

Execute queries on the Postgres database. Use this skill DIRECTLY whenever the user asks anything about database contents, counts, or data — do NOT read compose.yml or SQL migration files first.

CodelyTV/agentic_programming-course · 40 tokens

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.

google/skills · 72 tokens

cloud-sql-basics

This file generates or explains Cloud SQL resources. Use this file when the user asks to create a Cloud SQL instance or database for MySQL, PostgreSQL, or SQL Server. Cloud SQL manages third-party MySQL, PostgreSQL, and SQL Server instances as resources in Cloud SQL. For example, when Cloud SQL creates an open-source…

google/skills · 108 tokens

postgresql-table-design

Use this skill when designing or reviewing a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features.

wshobson/agents · 37 tokens

prisma-postgres-setup

Set up a new Prisma Postgres database and connect it to a local project using the Management API. Use when asked to "set up a database", "create a Prisma Postgres project", "get a connection string", "connect my app to Prisma Postgres", or "provision a database".

nitrocloudofficial/nitrostack · 67 tokens

prisma-postgres

Prisma Postgres setup and operations guidance across Console, create-db CLI, Management API, and Management API SDK. Use when creating Prisma Postgres databases, working in Prisma Console, provisioning with create-db/create-pg/create-postgres, or integrating programmatic provisioning with service tokens or OAuth.

nitrocloudofficial/nitrostack · 63 tokens