postgres-query-review

postgres-query-review is a skill for Claude Code, Codex from woliveiras/geremmyas. It costs 48 tokens per session (372 once invoked), scanned A, original, MIT.

A review guide for PostgreSQL, a database system, covering SQL queries, schema changes called migrations, indexes, and query plans.

In plain words
What is it for?
Use it when optimizing PostgreSQL SQL, reviewing EXPLAIN output, or checking a migration's safety and rollback approach.
Why use it?
It helps find correctness problems, slow queries, unsafe database changes, lock risks, and excessive transaction or connection use before they affect users.

Skill for Claude CodeCodex

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

Good fit Use it when optimizing PostgreSQL SQL, reviewing EXPLAIN output, or checking a migration's safety and rollback approach.

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

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-query-review

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/woliveiras/geremmyas/postgres-query-review"><img src="https://agentmods.dev/badge/skills/woliveiras/geremmyas/postgres-query-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 372 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.00048 $0.00372
Opus 5 $0.00024 $0.00186
Sonnet 5 $0.00010 $0.00074
Haiku 4.5 $0.00005 $0.00037

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

Security

Grade A, and why

postgres-query-review 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 10d 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.

content/skills/postgres-query-review/SKILL.md · 45 lines

What it actually says

Postgres Query Review

Review PostgreSQL changes through correctness, plan shape, and operational risk.

Process

  1. Identify the query or migration, expected data volume, critical path, and latency or safety target.
  2. Check correctness first: joins, filters, null handling, constraints, transactions, and isolation assumptions.
  3. Inspect indexes used by WHERE, JOIN, ORDER BY, uniqueness, and policy predicates.
  4. Request or read EXPLAIN / EXPLAIN ANALYZE for important queries on realistic data.
  5. For migrations, review locks, table rewrites, backfills, concurrent index creation, and rollback strategy.
  6. Check connection pool impact and transaction duration.
  7. Propose the smallest change that addresses the measured issue.

Rules

  • Do not add indexes without a query pattern and expected benefit.
  • Do not use production EXPLAIN ANALYZE on dangerous writes.
  • Do not hold transactions open across network calls or user interaction.
  • Run destructive migrations or large rewrites autonomously only on a verified local, disposable, or test database with rollback or recreation, prefixing guarded commands with GEREMMYAS_TARGET=local, test, or disposable. Production execution requires explicit user authorization; an ambiguous database is protected.

Output

  • Correctness findings
  • Plan/index observations
  • Migration/lock risk
  • Recommended SQL or migration change
  • Verification command or metric
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. 10d ago First seen · 45 lines · 48 tokens per session scan A bf8b92d7b4de

Subscribe to this mod's changes

postgres-query-review is a skill published in the GitHub repository woliveiras/geremmyas (10 stars, last pushed 1mo ago), licensed MIT. It adds 48 tokens to every session and 372 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

tom-lane-perspective

A perspective skill based on research about Tom Lane, a PostgreSQL core maintainer. PostgreSQL is an open-source database; the skill applies his documented ways of thinking to project governance, patch review, and debugging decisions.

digoal/blog · 389 tokens

postgresql

PostgreSQL schema design, query optimization, indexing, and administration. Use when writing schemas, queries, migrations, or mentions PostgreSQL, Postgres, JSONB, partitioning, RLS, CTEs, window functions, EXPLAIN ANALYZE, or connection pooling.

iliaal/whetstone · 61 tokens

ia-postgresql

PostgreSQL schema design, query optimization, indexing, and administration. Use when working with PostgreSQL, JSONB, partitioning, RLS, CTEs, window functions, or EXPLAIN ANALYZE.

iliaal/whetstone · 49 tokens

sqlike

Check SQL with sqlike — deterministic static analysis (validity, anti-patterns, rewrites, index advice) and query-equivalence verification. Use whenever you write, edit, review, or rewrite a SQL query, or need to prove two queries return the same results. Requires the sqlike MCP server (@sqlike/mcp) or the sqlike CLI…

orifisher2/sqlike · 81 tokens

postgresql-rails-analyzer

Comprehensive PostgreSQL configuration and usage analysis for Rails applications. Use when Claude Code needs to analyze a Rails codebase for database performance issues, optimization opportunities, or best practice violations. Detects N+1 queries, missing indexes, suboptimal database configurations, anti-patterns, and…

el-feo/ai-context · 111 tokens

agent-database-reviewer

PostgreSQL database specialist for query optimization, schema design, security, and performance. Use PROACTIVELY when writing SQL, creating migrations, designing schemas, or troubleshooting database performance. Incorporates Supabase best practices.

KunanonJ/ai-skills-hub · 50 tokens