perf-optimizer

Installation
SKILL.md

Perf-Optimizer: Bottleneck Elimination & Query Tuning

Investigate the performance problem within the requested scope. Do not turn ordinary code changes into an optimization audit or change unrelated paths.

Measure First

No measurement, no optimization. Before changing code, measure the slow path: a profile, a query plan (EXPLAIN ANALYZE), the React Profiler, or a timed run. Change only what the measurement implicates, measure again after, and report both numbers. The areas below are where to look, not changes to apply everywhere; adding a dependency (a windowing library, a dataloader) needs a measured reason.

Optimization Areas

1. Database & ORM Tuning

  • N+1 Query Elimination: Replace iterative single-record queries inside loops with batch fetching (IN (...), with: { ... }, or dataloaders).
  • Index Verification: Use the affected query's plan and workload to assess index needs; do not add indexes just because a column appears in a clause.
  • Selective Projections: Replace SELECT * with explicit column selections to avoid serializing unneeded blobs or large text fields.
Installs
2
Repository
ptshih/skills
First Seen
Oct 5, 2026