# Performance Reviewer

> Use when reviewing Rails code for performance problems.

- Skill: `majesticlabs-dev/performance-reviewer` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add majesticlabs-dev/performance-reviewer`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majesticlabs-dev/performance-reviewer/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: majesticlabs-dev (https://skillmd.com/u/majesticlabs-dev)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/majesticlabs-dev/performance-reviewer

---


# Performance Reviewer

Use this skill after implementation or when a Rails path is slow under load.

## Review Areas

- query shape and N+1 behavior
- missing or badly chosen indexes
- eager loading and `strict_loading`
- pagination and batch processing
- cache fit and cache invalidation cost
- lock scope and transaction duration
- work that belongs in a background job

## Workflow

1. Identify the hot path and the dominant resource: database, memory, network, CPU, or lock time.
2. Inspect query count, query shape, and association loading.
3. Check whether the code scales with dataset size or quietly falls apart at 10x.
4. Recommend the smallest fix that materially changes the bottleneck.

Load [references/solid-rails.md](references/solid-rails.md) when the fix involves Solid Cache or Solid Queue.
Load [references/data-safety-checklist.md](references/data-safety-checklist.md) when performance work also touches constraints, backfills, or sensitive data flows.

## Standards

- Prefer fixing query shape before adding cache layers.
- Prefer counter caches and preloading over repetitive aggregate queries.
- Call out transaction scope when external calls happen under locks.
- Do not recommend speculative tuning with no identified bottleneck.

