Skip to content

ericrisco/rsc-harness / skills/postgresdb

postgresdb

Verified

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`).

FileKindSize
SKILL.mdskill md17.3 KB
evals/README.mdmarkdown2.6 KB
evals/cases.yamlconfig5.9 KB
references/migrations.mdmarkdown11.5 KB
references/operations-and-security.mdmarkdown11.5 KB
references/query-optimization.mdmarkdown13.2 KB
references/schema-and-indexing.mdmarkdown14.1 KB
scripts/verify.shexecutablescript7.1 KB

evals/README.md

View on GitHub
# Eval harness — `postgresdb`

This harness checks two things: **triggering** (does the skill fire on the right
prompts and stay quiet on near-misses?) and **capability** (does loading the skill
measurably improve the answer?). Cases live in `cases.yaml`. These run through an
**agent harness**, not a pure shell script — a human or a driver agent feeds prompts
and grades outputs. Keep grading honest.

## 1. Triggering

For each prompt in `cases.yaml`:

1. Start a fresh agent session with **only the `postgresdb` skill** discoverable
   (its `SKILL.md` description in scope; no sibling skills loaded).
2. Paste the prompt verbatim. Observe whether the agent invokes / routes to
   `postgresdb`.
3. Run **3–5 trials per prompt** (the trigger decision is stochastic).
4. Score:
   - `should_trigger`: PASS if the skill fires in the majority of trials.
   - `should_not_trigger`: PASS if the skill does **not** fire. When the case names
     a `route_to` sibling, sanity-check the agent would plausibly route there (or to
     `none`); a wrong-but-not-postgresdb route still passes this skill's gate.

**Pass bar:** ≥ 90% trigger accuracy across all `should_trigger` + `should_not_trigger`
prompts (i.e. at most ~1 miss out of the 14 cases). A `should_trigger` that fires < 50%
of trials is a fail; a `should_not_trigger` that fires at all in a majority of trials is
a fail.

## 2. Capability

For each `capability` scenario, run it **twice**:

- **WITHOUT** the skill: a clean agent, no `postgresdb` skill available.
- **WITH** the skill: same prompt, `postgresdb` loaded.

Grade each transcript against that scenario's `must_include` checklist — one point per
bullet that is correctly and specifically covered (not just name-dropped). Compute
coverage = points / total bullets.

**Pass bar:**
- WITH the skill: ≥ 80% of `must_include` bullets covered.
- The skill must **measurably improve** the output: WITH coverage should clearly beat
  WITHOUT (target ≥ +30 percentage points, or crossing from fail→pass). If a baseline
  agent already nails the rubric without the skill, the rubric is too easy — tighten it.

## Notes

- Prompts are deliberately varied: some never say "Postgres", "SQL", or "index"
  (slow-query, multi-tenant isolation, duplicate-job-processing) — these test intent
  recognition, not keyword matching.
- Near-misses route to the genuinely correct sibling (`fastapi`, `flutter`,
  `deployment`, `security-audit`) or `none` when the request is out of every sibling's
  scope (Prisma ORM trap, Redis caching).
- This is judgment-based grading. Record trial counts and the per-bullet verdicts so a
  reviewer can audit; don't report a bare pass/fail.
deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall