Agent skill

Postgresdb

by ericrisco in ericrisco/rsc-harness

A skill your agent uses when PostgreSQL engine behaviour decides the answer — schema and type design, index choice, reading EXPLAIN on a slow query, zero-downtime DDL and backfills, or ops (roles…

MITAuto-check passedDatabases

Install Postgresdb

skills CLI
$ npx skills add ericrisco/rsc-harness --skill postgresdb -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ericrisco/rsc-harness postgresdb --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ericrisco/rsc-harness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/postgresdb .claude/skills/postgresdb && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
postgresdb
GitHub stars
156
Token cost
~4.4k tokens
SKILL.md length
1,484 words
Files
8 (incl. scripts, references)
Skills in repo
229
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when PostgreSQL engine behaviour decides the answer — schema and type design, index choice, reading EXPLAIN on a slow query, zero-downtime DDL and backfills, or ops (roles…

  • Works in 4 steps: Estimated vs actual rows — a large gap… → The most expensive node — highest actual… → Seq Scan on a big table where you… → …
  • PostgreSQL engine behaviour decides the answer — schema and type design
  • SKILL.md covers Decision rules, Copy-paste patterns, DDL on a live table and Anti-patterns, plus 3 more sections
  • Runs Shell scripts from its folder

What it does

Postgresdb is an agent skill from ericrisco/rsc-harness. Use when PostgreSQL engine behaviour decides the answer — schema and type design, index choice, reading EXPLAIN on a slow query, zero-downtime DDL and backfills, or ops (roles, RLS, pooling, vacuum, partitioning, PITR). PG16, ORM-agnostic. NOT portable query logic (that is sql), NOT a managed provider's platform surface (that is neon).

Its SKILL.md is about 4.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including scripts and reference files (for example `evals/README.md`, `evals/cases.yaml` and `references/migrations.md`).

It sits in Databases, covering ORMs and data access, Query optimization and Database administration. It works with PostgreSQL and SQL. The repository describes itself as: Your agent invents things because it has no memory, and can't touch your database because it has no arms. rsc is the meta-harness that gives it both, plus the trade to know the… The licence is MIT.

When your agent uses it

  • PostgreSQL engine behaviour decides the answer — schema and type design
  • Reading EXPLAIN on a slow query
  • Zero-downtime DDL and backfills

Example prompts

  • “/postgresdb”

Requirements

  • A Bash shell

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Estimated vs actual rows — a large gap means stale stats; run ANALYZE.
  2. The most expensive node — highest actual time × loops.
  3. Seq Scan on a big table where you expected an index.
  4. Rows Removed by Filter — the predicate was not pushed to an index.

What it can do on your machine

Read from SKILL.md and the folder at commit 92fde8f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Shell), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Postgresdb loads about 4.4k tokens when it runs, and up to ~17k if it reads all its reference files. Until then it costs about 88 tokens; SKILL.md has 1,484 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~88
When it runs · the whole SKILL.md, loaded when a task matches
~4.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~17k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from ericrisco/rsc-harness at commit 92fde8f, republished under its MIT licence (© ericrisco). 1,484 words, ~4,403 tokens.

Download SKILL.mdSave it as .claude/skills/postgresdb/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
postgresdb
description
Use when PostgreSQL engine behaviour decides the answer — schema and type design, index choice, reading EXPLAIN on a slow query, zero-downtime DDL and backfills, or ops (roles, RLS, pooling, vacuum, partitioning, PITR). PG16, ORM-agnostic. NOT portable query logic (that is `sql`), NOT a managed provider's platform surface (that is `neon`).
tags
postgres, sql, database, migrations
recommends
secure-coding
origin
risco

PostgreSQL — schema, indexing, queries, ops

Engine-level PostgreSQL 16 guidance: design correct schemas, pick the right index, read EXPLAIN and fix slow SQL, run zero-downtime migrations, and operate/secure the database. Tooling-agnostic; every example is runnable.

New, non-trivial feature with no approved spec + plan under 02-DOCS/wiki/sdd/? Hand off to specify before writing feature code (method: sdd); build straight from here only for a genuinely one-line, low-risk change.

Deep dives: schema-and-indexing (types, constraints, every index kind, bloat) · query-optimization (EXPLAIN, joins, concurrency, JSONB/FTS/pgvector) · migrations (zero-downtime DDL, per-ORM) · operations-and-security (roles, RLS, pooling, vacuum, partitioning, backups).

Not this skill. ORM-API ergonomics (Prisma updateMany count trap, SQLAlchemy session lifecycle) and per-runner migration wiring → that tool's own docs; this skill owns the SQL the ORM emits and the engine behavior underneath. Other engines → mysql, sqlite-turso, clickhouse-analytics (different MVCC, locking, planner). App-layer caching / Redis / Kafka as products are out — only Postgres-as-queue via SKIP LOCKED is in scope. Cloud-vendor console clicks → deployment; we give the SQL and params, not the RDS/Cloud SQL UI path.

Decision rules

Fast lookups; runnable DDL lives in the references.

Pick the column type
Use caseCorrect typeAvoidWhy
Surrogate PK (internal)bigint GENERATED ALWAYS AS IDENTITYserial, intidentity is SQL-standard, no sequence-ownership gotchas; bigint avoids 2.1B overflow
Surrogate PK (public/distributed)uuid v7uuid v4v7 is time-ordered → less B-tree fragmentation than random v4
Natural text id (slug, sku)text + UNIQUE + CHECKvarchar(n)length via CHECK; no rewrite to widen later
Money / exact decimalnumeric(19,4)float8, moneybinary floats drift; money has locale issues
Timestamp (event)timestamptztimestampstores a UTC instant; naive timestamp loses zone
Durationintervalint secondsself-documenting, arithmetic-safe
Small closed set, stableenumtext w/o CHECKtype safety; but see lookup-table note
Evolving set, joinablelookup table + FKenumALTER TYPE ... ADD VALUE is awkward; FK gives joins + soft-retire
Flagbooleanint, varcharthree-valued NULL still possible — add NOT NULL DEFAULT
Tags (read-mostly)text[] + GINcomma stringarray ops + GIN containment
Tags (relational)join tabletext[]when you need FK integrity / per-tag rows
Semi-structuredjsonbjson, textbinary, indexable, dedup keys; promote hot keys to columns
IP / CIDRinet / cidrtextvalidation + operators
Time range (booking)tstzrange + GiSTtwo columns&& overlap + exclusion constraint
Pick the index
Access patternIndexDDLNotes
= / < > / range / ORDER BYbtree (default)CREATE INDEX ix_orders_status ON orders (status)also enforces uniqueness
LIKE 'prefix%'btree + text_pattern_opsCREATE INDEX ix_users_email_pat ON users (email text_pattern_ops)only for C-locale/prefix; not %suffix
Case-insensitive eqexpr index or citextCREATE INDEX ix_users_lemail ON users (lower(email))query must use lower(email) too
@> jsonb / array containmentGINCREATE INDEX ix_orders_meta ON orders USING gin (meta)jsonb_path_ops if only @>
Full-text @@GIN on tsvectorCREATE INDEX ix_orders_search ON orders USING gin (search)index a generated tsvector column
Range overlap / exclusion / geoGiSTCREATE INDEX ix_book_during ON bookings USING gist (during)also PostGIS geometry
Huge append-only time-seriesBRINCREATE INDEX ix_events_ts ON events USING brin (created_at)needs physical correlation
Vector similarityhnsw (pgvector)CREATE INDEX ix_docs_embed ON docs USING hnsw (embedding vector_cosine_ops)see query-optimization
Dedup onlyunique btreeCREATE UNIQUE INDEX uq_users_email ON users (email)constraint = index

Hash indexes: almost never — equality-only, no multicolumn, rarely beats btree even though WAL-logged since PG10.

Read the plan before adding an index — EXPLAIN (ANALYZE, BUFFERS) or it didn't happen. An index the planner never picks is pure write tax on every insert and update, forever.

When NOT to add an index
  • Low-selectivity boolean / status with few distinct values (planner ignores it; seq scan wins).
  • Tiny tables (a seq scan reads one page; the index adds maintenance for nothing).
  • Write-heavy columns rarely filtered — every index is a write tax.
  • A column already the left prefix of an existing composite index.
  • Redundant with a UNIQUE constraint — the constraint already created an index.

Copy-paste patterns

Canonical table (types + constraints + identity)
sql
-- GOOD: identity PK, public uuid, FK with action, numeric money, timestamptz,
-- status via lookup FK, generated tsvector, CHECK constraints.
CREATE TABLE orders (
    id           bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    public_id    uuid NOT NULL DEFAULT gen_random_uuid(),  -- v4; see schema ref for v7
    user_id      bigint NOT NULL REFERENCES users (id) ON DELETE RESTRICT,
    status       text NOT NULL REFERENCES order_statuses (code) ON UPDATE CASCADE,
    amount       numeric(19,4) NOT NULL CHECK (amount >= 0),
    currency     text NOT NULL CHECK (length(currency) = 3),
    note         text,
    search       tsvector GENERATED ALWAYS AS (to_tsvector('simple', coalesce(note, ''))) STORED,
    created_at   timestamptz NOT NULL DEFAULT now(),
    updated_at   timestamptz NOT NULL DEFAULT now(),
    UNIQUE (public_id)
);
CREATE INDEX ix_orders_user_id ON orders (user_id);     -- FKs are NOT auto-indexed
CREATE INDEX ix_orders_status  ON orders (status);
sql
-- BAD: every column is a future migration or a bug.
CREATE TABLE orders (
    id          serial PRIMARY KEY,            -- sequence-ownership gotchas; use IDENTITY
    user_id     int REFERENCES users(id),      -- int overflows at 2.1B; no FK index
    status      varchar(20),                   -- length hack; no constraint on values
    amount      float,                         -- money drift
    created_at  timestamp DEFAULT now()        -- naive: loses the zone
);

updated_at is not auto-maintained — add a BEFORE UPDATE trigger (see schema ref) or set it in the app; Postgres has no ON UPDATE clause.

Composite index column order

Equality columns first, then the range/sort column.

sql
-- Query: WHERE user_id = $1 AND created_at >= $2 ORDER BY created_at DESC
-- GOOD: equality (user_id) then range (created_at)
CREATE INDEX ix_orders_user_created ON orders (user_id, created_at DESC);

-- BAD: range-first index cannot satisfy the equality efficiently for this query
CREATE INDEX ix_orders_created_user ON orders (created_at, user_id);

Confirm with EXPLAIN that the plan shows Index Cond: (user_id = ... AND created_at >= ...), not a Filter:.

Partial + covering (INCLUDE) index
sql
-- Partial: index only the rows you query (smaller, hotter)
CREATE INDEX ix_orders_active ON orders (user_id, created_at DESC)
WHERE status <> 'cancelled';

-- Covering: INCLUDE non-key columns to enable an index-only scan
CREATE INDEX ix_orders_user_cover ON orders (user_id) INCLUDE (amount, created_at);

Index-only scan requires a recently-VACUUMed table; confirm Heap Fetches: 0 in EXPLAIN (ANALYZE).

Keyset (cursor) pagination — not OFFSET
sql
-- GOOD: keyset on a stable composite sort; uses ix_orders_user_created
SELECT id, amount, created_at
FROM orders
WHERE user_id = $1
  AND (created_at, id) < ($2, $3)   -- row-value comparator = last row of prev page
ORDER BY created_at DESC, id DESC
LIMIT 20;

-- BAD: OFFSET scans and discards 100000 rows every page (O(n))
SELECT * FROM orders WHERE user_id = $1 ORDER BY created_at DESC LIMIT 20 OFFSET 100000;

The index must match the ORDER BY direction exactly; include the tiebreaker (id).

UPSERT done right
sql
-- GOOD: insert-or-update; EXCLUDED is the row that failed to insert
INSERT INTO inventory (sku, qty)
VALUES ($1, $2)
ON CONFLICT (sku)
DO UPDATE SET qty = inventory.qty + EXCLUDED.qty
WHERE inventory.qty + EXCLUDED.qty >= 0   -- guard
RETURNING id, qty;

-- DO NOTHING returns no row on conflict; wrap to always get the row:
WITH ins AS (
    INSERT INTO tags (name) VALUES ($1)
    ON CONFLICT (name) DO NOTHING
    RETURNING id
)
SELECT id FROM ins
UNION ALL
SELECT id FROM tags WHERE name = $1 LIMIT 1;
Queue with SKIP LOCKED
sql
-- GOOD: contention-free job claim; concurrent workers never block each other
UPDATE jobs
SET status = 'processing', locked_at = now()
WHERE id = (
    SELECT id FROM jobs
    WHERE status = 'pending'
    ORDER BY created_at
    FOR UPDATE SKIP LOCKED
    LIMIT 1
)
RETURNING id, payload;

SKIP LOCKED skips rows another txn holds; FOR UPDATE alone would serialize all workers.

Kill the N+1
sql
-- BAD: application loops, one query per order (N+1)
--   for o in orders: SELECT * FROM order_items WHERE order_id = o.id
-- GOOD: one set-based query
SELECT o.id, json_agg(i.*) AS items
FROM orders o
JOIN order_items i ON i.order_id = o.id
WHERE o.user_id = $1
GROUP BY o.id;

-- Top-N-per-group: JOIN LATERAL, not a window-filter scan
SELECT u.id, recent.*
FROM users u
JOIN LATERAL (
    SELECT id, amount, created_at FROM orders
    WHERE user_id = u.id ORDER BY created_at DESC LIMIT 3
) recent ON true;

An ORM emitting N queries is the same bug — fix it at the SQL boundary, not with a cache.

EXPLAIN, the right way
sql
EXPLAIN (ANALYZE, BUFFERS, SETTINGS, FORMAT TEXT)
SELECT * FROM orders WHERE user_id = $1 AND created_at >= $2;

Read these four first:

  1. Estimated vs actual rows — a large gap means stale stats; run ANALYZE.
  2. The most expensive node — highest actual time × loops.
  3. Seq Scan on a big table where you expected an index.
  4. Rows Removed by Filter — the predicate was not pushed to an index.

Full method in query-optimization.

Show full SKILL.md (671 more words)Show less

DDL on a live table

Full sequences (zero-downtime expand-contract, batched backfills, per-ORM runners) in migrations. These four are absolute because each one is a lock you cannot take back once traffic is on the table:

  1. Index creation on a live table is always CONCURRENTLY — plain CREATE INDEX holds ACCESS EXCLUSIVE for the entire build and blocks every writer. It therefore cannot run inside a txn.
  2. Never ADD COLUMN ... NOT NULL without a default/backfill plan, and never add a volatile default (now(), gen_random_uuid()) on a large table without a batched backfill — a volatile default rewrites the whole table under ACCESS EXCLUSIVE. A non-volatile constant is instant (PG11+).
  3. SET lock_timeout + SET statement_timeout around DDL on hot tables, so a blocked statement fails fast instead of parking an ACCESS EXCLUSIVE request that every reader behind it then queues on.
  4. Migrations are forward-only in prod; never edit an applied migration — it has already run somewhere, so the next environment replays a history that no longer matches the one in production.

Lock modes: CREATE INDEX CONCURRENTLY takes SHARE UPDATE EXCLUSIVE (allows writes); plain CREATE INDEX, ALTER TABLE ... TYPE, ADD COLUMN with a volatile default, and VACUUM FULL take ACCESS EXCLUSIVE (blocks everything). Full table in migrations.

Anti-patterns

ClaimReality
"I'll add the FK index later, the query works now"Unindexed FK = seq scan + heavy lock cascade on parent DELETE/UPDATE. Index it now.
"UUID PK is fine everywhere"Random v4 fragments the B-tree and bloats WAL. Use IDENTITY internally or uuid v7.
"SELECT count(*) to check existence"Counts the whole match. Use EXISTS (SELECT 1 ...).
"CTEs are just for readability"Pre-12 they were optimization fences; PG12+ inlines unless MATERIALIZED. Know which you want.
"NOT IN (subquery)"NULL-unsafe (one NULL → empty result) and slow. Use NOT EXISTS.
"Store money as float, round on display"Silent drift across arithmetic. numeric(19,4).
"ADD COLUMN ... NOT NULL DEFAULT now()"Volatile default rewrites the table under ACCESS EXCLUSIVE. Non-volatile constant is instant (PG11+).
"One big jsonb blob beats columns"No constraints, no per-key stats, GIN bloat. Promote hot keys to typed columns.
"RLS is on, so the table is protected"RLS is opt-in per table and the table owner bypasses it. Verify with a non-owner role; add FORCE ROW LEVEL SECURITY to cover the owner too.
"RLS policy calling auth.uid() per row"Re-evaluated per row. Wrap: (SELECT auth.uid()) so it runs once.
"CREATE INDEX in the migration is fine"Blocks writes for the whole build. CREATE INDEX CONCURRENTLY (outside a txn).
"VACUUM FULL will fix bloat"Takes ACCESS EXCLUSIVE, rewrites the table. Use autovacuum tuning / REINDEX CONCURRENTLY.

Quick reference

Isolation levels
LevelPreventsUse whenNote
Read Committed (default)dirty readsmost OLTPeach statement sees a fresh snapshot
Repeatable Read+ non-repeatable / phantom (snapshot)multi-statement consistent readmay raise 40001; retry
Serializable (SSI)+ write skewinvariants across rowsretry 40001 with backoff

Retry the txn on SQLSTATE 40001 (serialization_failure) and 40P01 (deadlock_detected).

Diagnostic one-liners
sql
-- Unindexed foreign keys
SELECT c.conrelid::regclass AS tbl, a.attname AS col
FROM pg_constraint c
JOIN pg_attribute a ON a.attrelid = c.conrelid AND a.attnum = ANY (c.conkey)
WHERE c.contype = 'f'
  AND NOT EXISTS (
    SELECT 1 FROM pg_index i
    WHERE i.indrelid = c.conrelid AND (i.indkey::int2[])[0] = a.attnum
  );

-- Top slow queries (needs pg_stat_statements)
SELECT calls, round(mean_exec_time::numeric, 2) AS mean_ms,
       round(total_exec_time::numeric, 2) AS total_ms, query
FROM pg_stat_statements ORDER BY total_exec_time DESC LIMIT 20;

-- Dead tuples / bloat candidates
SELECT relname, n_dead_tup, n_live_tup, last_autovacuum
FROM pg_stat_user_tables WHERE n_dead_tup > 1000 ORDER BY n_dead_tup DESC;

-- Blocking locks
SELECT blocked.pid AS blocked_pid, blocking.pid AS blocking_pid, blocked.query AS blocked_query
FROM pg_stat_activity blocked
JOIN pg_locks bl ON bl.pid = blocked.pid AND NOT bl.granted
JOIN pg_locks gl ON gl.locktype = bl.locktype AND gl.database IS NOT DISTINCT FROM bl.database
  AND gl.relation IS NOT DISTINCT FROM bl.relation AND gl.granted
JOIN pg_stat_activity blocking ON blocking.pid = gl.pid;

-- Cache hit ratio (aim > 0.99)
SELECT sum(heap_blks_hit) / nullif(sum(heap_blks_hit + heap_blks_read), 0) AS ratio
FROM pg_statio_user_tables;

-- Unused indexes
SELECT relname, indexrelname, idx_scan
FROM pg_stat_user_indexes WHERE idx_scan = 0 ORDER BY relname;

Verify

Run scripts/verify.sh from your project root: it lints discovered SQL with sqlfluff (if configured), syntax-sanity-checks migration files (the quote/paren balance check is dollar-quote and block-comment aware), flags foot-guns (CREATE INDEX without CONCURRENTLY in a migration, ADD COLUMN ... NOT NULL without DEFAULT, VACUUM FULL), and — only if DATABASE_URL and psql are present — checks that pg_stat_statements is enabled. It exits non-zero only on a real sqlfluff lint error; everything else (missing tools, heuristic warnings, DB unreachable) is advisory [skip]/[warn]. Runs on stock macOS bash 3.2; never writes, never connects without DATABASE_URL.

Project grounding

In a project with a 02-DOCS/ layer (the harness Karpathy wiki), read 02-DOCS/wiki/stack/postgresdb.md first and stay consistent with it. Missing or stale? Write the project's real choices there — schema and naming conventions, migration tool, indexing/partitioning decisions, pooling setup, RLS policies — index it in 02-DOCS/wiki/index.md (the Knowledge map; root CLAUDE.md keeps only a pointer), and bump its Updated date in the same change, so the next agent inherits the conventions instead of re-deriving them. No 02-DOCS/ layer? Skip silently (optionally suggest harness) — technical conventions are recorded, not gated; never block the task on this.

© ericrisco, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (scripts, references) in skills/postgresdb of ericrisco/rsc-harness.

  • SKILL.md
  • evals/README.md
  • evals/cases.yaml
  • references/migrations.md
  • references/operations-and-security.md
  • references/query-optimization.md
  • references/schema-and-indexing.md
  • scripts/verify.sh

Open the folder on GitHubat commit 92fde8f

Compare with similar skills

Postgresdb next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Postgresdb compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Postgresdb this skillericrisco/rsc-harness156—~4.4kAutomated safety check: PassMIT
Discover Databaserand/cc-polymath181—~2kAutomated safety check: PassMIT
PostgreSQL Documentation Reference2025Emma/vibe-coding-cn23k1 repos~19kAutomated safety check: PassMIT
DB SculptorEliasOulkadi/shokunin114—~3.1kAutomated safety check: NotesMIT
Dsqlawslabs/agent-plugins912—~6.9kAutomated safety check: PassApache-2.0
Matlab Use Databasematlab/matlab-agentic-toolkit1.1k—~3.1kAutomated safety check: PassCustom licence

Similar skills

  • Discover Database

    rand/cc-polymath

    Automatically discover database skills when working with SQL, PostgreSQL, MongoDB, Redis, database schema design, query optimization, migrations, connection pooling, ORMs, or database selection.

    181 GitHub stars~2k tokensUpdated 7 mo ago
    DatabasesAuto-check passed
  • PostgreSQL Documentation Reference

    2025Emma/vibe-coding-cn

    PostgreSQL database documentation - SQL queries, database design, administration, performance tuning, and advanced features. Use when working with PostgreSQL…

    23k GitHub starsUsed in 1 repo~19k tokens
    DatabasesAuto-check passed
  • DB Sculptor

    EliasOulkadi/shokunin

    Design database schemas with Prisma/Drizzle, PostgreSQL index strategy (B-tree, GIN, GiST, BRIN, Hash), query optimization (EXPLAIN ANALYZE), migration safety (expand/contract, zero-downtime), and…

    114 GitHub stars~3.1k tokensUpdated 2 days ago
    DatabasesAuto-check: notes
  • Dsql

    awslabs/agent-plugins

    Official

    Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, diagnose cluster performance, load data, and develop applications with a serverless, distributed…

    912 GitHub stars~6.9k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Matlab Use Database

    matlab/matlab-agentic-toolkit

    Reads from, writes to, and manages relational databases using MATLAB Database Toolbox.

    1.1k GitHub stars~3.1k tokensUpdated 7 days ago
    DatabasesAuto-check passed
  • SQL Toolkit

    LeoYeAI/openclaw-master-skills

    Query, design, migrate, and optimize SQL databases. An agent skill from LeoYeAI/openclaw-master-skills.

    2.2k GitHub stars~3k tokensUpdated 2 mo ago
    DatabasesAuto-check passed

More from ericrisco/rsc-harness

All 229 skills in this repo
  • Ab Testing

    ericrisco/rsc-harness

    A skill your agent uses when designing or analyzing a controlled experiment — falsifiable hypothesis, sample size from an MDE, reading significance/CI/power, CUPED, or rescuing tests that won't go…

    156 GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Accessibility

    ericrisco/rsc-harness

    A skill your agent uses when making a web UI conform to WCAG 2.2 Level AA — axe-core or Lighthouse a11y violations, keyboard operability, focus management, ARIA roles/names/live regions, contrast…

    156 GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Ads

    ericrisco/rsc-harness

    A skill your agent uses when running or fixing paid acquisition on Google or Meta — campaign structure (Performance Max, Demand Gen, Search, Advantage+), platform-fit creative, budget/scaling rules…

    156 GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Agent Eval

    ericrisco/rsc-harness

    A skill your agent uses when measuring whether an LLM or agent system actually got better and gating merges on it: golden sets, fixing an inflated LLM-as-judge, scoring RAG (faithfulness, contextual…

    156 GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • AI Media

    ericrisco/rsc-harness

    A skill your agent uses when a creative goal must become a finished media file: pick and order generative-media models per modality — AI voiceover, image-to-video clips, score — then glue them with…

    156 GitHub stars~3.3k tokensUpdated today
    Auto-check passed
  • Analytics

    ericrisco/rsc-harness

    A skill your agent uses when instrumenting product or web analytics — GA4/PostHog SDK wiring, event taxonomy, funnels, double-counted events, consent gating, PII scrubbing.

    156 GitHub stars~2.8k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Postgresdb

What does Postgresdb do?

A skill your agent uses when PostgreSQL engine behaviour decides the answer — schema and type design, index choice, reading EXPLAIN on a slow query, zero-downtime DDL and backfills, or ops (roles…. Postgresdb is an agent skill from ericrisco/rsc-harness. Use when PostgreSQL engine behaviour decides the answer — schema and type design, index choice, reading EXPLAIN on a slow query, zero-downtime DDL and backfills, or ops (roles, RLS, pooling, vacuum, partitioning, PITR).

When should I use Postgresdb?

Postgresdb fits situations like: postgreSQL engine behaviour decides the answer — schema and type design; reading EXPLAIN on a slow query; zero-downtime DDL and backfills.

How do I install Postgresdb in Claude Code?

Run `npx skills add ericrisco/rsc-harness --skill postgresdb -a claude-code`. Or copy the skill folder (skills/postgresdb in ericrisco/rsc-harness) into .claude/skills/postgresdb in your project. Claude Code loads it when a task matches its description.

How do I install Postgresdb in Codex?

Run `npx skills add ericrisco/rsc-harness --skill postgresdb -a codex`. Or copy the skill folder (skills/postgresdb in ericrisco/rsc-harness) into .agents/skills/postgresdb in your project. Codex loads it when a task matches its description.

Can I use Postgresdb in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ericrisco/rsc-harness --skill postgresdb -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/postgresdb, .gemini/skills/postgresdb, .github/skills/postgresdb and .opencode/skills/postgresdb in your project.

What does Postgresdb need to run?

Going by SKILL.md and its folder, Postgresdb needs a shell for the scripts in its folder. Our summary lists: A Bash shell.

Does Postgresdb access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Postgresdb safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Postgresdb use?

Postgresdb is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Postgresdb use?

About 4.4k tokens (SKILL.md is roughly 18k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 13k tokens, read only when the agent opens those files.

What are the alternatives to Postgresdb?

Skills that share tags, products or a category with Postgresdb: Discover Database (rand/cc-polymath, 181 stars), PostgreSQL Documentation Reference (2025Emma/vibe-coding-cn, 23k stars), DB Sculptor (EliasOulkadi/shokunin, 114 stars) and Dsql (awslabs/agent-plugins, 912 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Postgresdb?

ericrisco (a GitHub user) maintains it in ericrisco/rsc-harness, which has 156 GitHub stars. The repository holds 229 skills in this directory. The repository was last updated on October 6, 2026.

Source: ericrisco/rsc-harness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.