agentsclimarketplace

Sql review

Skill vaibhavsaxena022/skills/sql-review

Review a SQL query (Postgres/MySQL) for performance and safety before it ships. Use when given a slow query, a new query, or asked to optimize SQL. Flags missing indexes, full scans, N+1 patterns, risky writes, and inefficient pagination.From its SKILL.md

Install
npx -y skills add vaibhavsaxena022/skills --skill sql-review

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

1.7 KB, 285 tokens by cl100k_base, as published. Nobody here has run it

SQL Review

Audit the provided SQL for performance and correctness.

Checklist

  • Indexes — are the WHERE / JOIN / ORDER BY columns indexed? Suggest composite indexes in the correct column order (equality first, then range).
  • Index-defeating patterns — SELECT *, leading-wildcard LIKE '%x', functions/casts on indexed columns.
  • Joins — are join keys indexed? Any fan-out producing duplicate rows?
  • N+1 — is this query executed inside a loop? Suggest batching (IN (...)) or a join.
  • Pagination — OFFSET on large tables gets slower with depth; suggest keyset (seek) pagination.
  • Write safety — UPDATE/DELETE without WHERE, missing transaction, implicit type casts.

Output

  1. Verdict — ship, or fix first.
  2. Findings — each as: problem → why it's slow/unsafe → concrete fix.
  3. If helpful, a rewritten query and the CREATE INDEX statements.

Rules

  • Ask for the table schema, approximate row counts, or EXPLAIN (ANALYZE) output when the fix depends on them.
  • Prefer covering indexes and keyset pagination; don't over-index — every index adds write cost.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.