agentsclimarketplace

Database

Skill v0idOS/performance-deity/skills/database

A ruthlessly strict algorithmic optimization methodology for AI coding agents. Forces your agent to profile, benchmark, and mathematically prove performance gains before writing code.

Install
npx -y skills add v0idOS/performance-deity --skill database

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

  • 2 stars2 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.

What its author says it does

Copied from the file, not written here

Diagnose and fix slow database queries. Runs EXPLAIN ANALYZE, identifies missing indexes, eliminates N+1 ORM patterns, and provides exact CREATE INDEX statements.

SKILL.md

1.2 KB, as published. Nobody here has run it

Execute all three phases in order.

Phase 1 — Analysis

  1. Take the slow query or ORM code.
  2. Generate the equivalent raw SQL.
  3. Either instruct the user to run EXPLAIN QUERY PLAN (SQLite) or EXPLAIN ANALYZE (Postgres/MySQL), or infer missing indexes directly from the WHERE, JOIN, and ORDER BY clauses.

Phase 2 — N+1 Audit

Check whether queries are issued inside a loop. If yes, rewrite using:

  • IN (...) batch clause
  • SQL JOIN
  • ORM eager loading:
    • .include() — Prisma
    • .populate() — Mongoose
    • select_related() / prefetch_related() — Django

Phase 3 — Rewrite

  1. Provide the optimized SQL or ORM code.
  2. Provide the exact CREATE INDEX statements required.
  3. Explain the disk I/O reduction: Full Table Scan O(N) → Index Lookup O(log N).

Before/after query plan summary:

MetricBeforeAfter
Scan typeFull Table ScanIndex Lookup
ComplexityO(N)O(log N)
Query count (per page load)N+11

Keep looking

Skills are one crate of 328,083. 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.