public-postgres-expert-base

public-postgres-expert-base is a skill for Claude Code, Codex from seed-forge/harness-ai-kit. It costs 57 tokens per session (696 once invoked), scanned A, original, Apache-2.0.

A reference guide to PostgreSQL, a relational database that stores structured data in tables. It covers table design, indexes, JSONB data, partitioning, and database extensions.

In plain words
What is it for?
Choosing data types and primary keys, designing indexes, storing flexible JSON data, partitioning large tables, and selecting PostgreSQL extensions.
Why use it?
It gives another skill a shared set of PostgreSQL design principles and terminology for planning or reviewing database work.

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/seed-forge/harness-ai-kit/public-postgres-expert-base
Any agent
npx skills add seed-forge/harness-ai-kit --skill public-postgres-expert-base
Clone the repo
git clone --depth 1 https://github.com/seed-forge/harness-ai-kit

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 public-postgres-expert-base

README.md
[![agentmods](https://agentmods.dev/badge/skills/seed-forge/harness-ai-kit/public-postgres-expert-base.svg)](https://agentmods.dev/skills/seed-forge/harness-ai-kit/public-postgres-expert-base)
Your own site
<a href="https://agentmods.dev/skills/seed-forge/harness-ai-kit/public-postgres-expert-base"><img src="https://agentmods.dev/badge/skills/seed-forge/harness-ai-kit/public-postgres-expert-base.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 696 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.1 $0.00057 $0.00696
Opus 5 $0.00028 $0.00348
Sonnet 5 $0.00011 $0.00139
Haiku 4.5 $0.00006 $0.00070

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

Security

Grade A, and why

public-postgres-expert-base 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 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.

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/public-postgres-expert-base/SKILL.md · 62 lines

How it starts

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

PostgreSQL Knowledge Base

Source: Adapted from planetscale/database-skills (PostgreSQL skill).

Schema Design

  • Prefer BIGSERIAL or BIGINT GENERATED ALWAYS AS IDENTITY for PKs.
  • Use TIMESTAMPTZ (with timezone) over TIMESTAMP.
  • TEXT and VARCHAR have similar performance in PostgreSQL — prefer TEXT unless length constraint is meaningful.
  • Use NUMERIC for money, never FLOAT/REAL.
  • JSONB (binary) over JSON (text) for structured data.

Indexing

Type Use for
B-Tree (default) Equality, range, sorting
GIN JSONB, fulltext, arrays, containment
GiST Geometry, range types, nearest-neighbor
BRIN Sequential data (timestamps, IDs) on large tables
Hash Equality only (rarely needed)
  • Partial indexes: CREATE INDEX ... WHERE condition — index only relevant rows.
  • Expression indexes: CREATE INDEX ... ON t (lower(name)).
  • Covering indexes: INCLUDE (col1, col2) for index-only scans.
  • CONCURRENTLY for creating indexes without blocking writes.

JSONB

  • Store structured, semi-structured, or variable-schema data.
  • Index with GIN: CREATE INDEX ... USING GIN (data jsonb_path_ops).
  • Query: data->>'key' (text), data->'key' (jsonb), data @> '{"key": "val"}' (containment).
  • Generated columns for frequently queried JSONB paths.

Partitioning

  • Declarative partitioning (range, list, hash) for large tables.
  • Partition key must be part of every unique/PK constraint.
  • ATTACH PARTITION / DETACH PARTITION for maintenance.
  • Partition pruning: queries automatically skip irrelevant partitions.

Extensions

  • pg_trgm: trigram similarity for fuzzy search.
  • pgvector: vector similarity search (AI/embeddings).
  • pg_stat_statements: query performance analysis.
  • uuid-ossp: UUID generation.
  • postgis: geospatial data.

Connection Management

  • Use connection pooling (PgBouncer) — PostgreSQL connections are expensive (~5-10 MB each).
  • Pool sizing: start with 2 * CPU cores + 1.
  • Use prepared_statements for parameterized queries.
  • Set statement_timeout to prevent runaway queries.

Read the full file on GitHub · 62 lines

Files

What ships with it

3 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 · 62 lines · 57 tokens per session scan A fe1582ef4bcb

Subscribe to this mod's changes

public-postgres-expert-base is a skill published in the GitHub repository seed-forge/harness-ai-kit (22 stars, last pushed 5d ago), licensed Apache-2.0. It adds 57 tokens to every session and 696 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

plan-rls-audit

Audit a Supabase/Postgres project for Row-Level Security and access-control gaps, then produce a phased remediation plan. Use when "RLS", "is my Supabase secure", "anyone can read my data", "lock down my tables". App-layer session/route gates → audit-auth-flows.

kensaurus/cursor-kenji · 69 tokens

backend-db-performance

Optimize slow queries, indexes, and N+1s. Use when "slow query", "database performance", "add an index", or "N+1". Schema consistency → audit-db-schema. RLS access control → plan-rls-audit.

kensaurus/cursor-kenji · 56 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

database-optimizer

Optimizes database queries and improves performance across PostgreSQL and MySQL systems. Use when investigating slow queries, analyzing execution plans, or optimizing database performance. Invoke for index design, query rewrites, configuration tuning, partitioning strategies, lock contention resolution.

Jeffallan/claude-skills · 54 tokens

postgres-pro

Use when optimizing PostgreSQL queries, configuring replication, or implementing advanced database features. Invoke for EXPLAIN analysis, JSONB operations, extension usage, VACUUM tuning, performance monitoring.

Jeffallan/claude-skills · 41 tokens

postgres-database-migration

Use this skill for planning, testing, and safely executing PostgreSQL schema migrations — especially when working with production data or shared databases. Trigger when user asks to: Test a schema migration before applying it to production Add, remove, or rename columns safely on a live table Change a column's data…

timescale/pg-aiguide · 220 tokens