LeonidFilbert

Query Reviewer — Data & AI agent for Claude Code

Data & AI community

Reviews Active Record queries for N+1, missing indexes, unscoped reads, aggregation done in Ruby instead of the database, and unbounded collections.

How to install Query Reviewer

Installs to ~/.claude/agents/leonidfilbert-rails-review-agents-query-reviewer.md

Terminal
mkdir -p ~/.claude/agents && curl -fsSL https://raw.githubusercontent.com/LeonidFilbert/rails-review-agents/HEAD/agents/query-reviewer.md -o ~/.claude/agents/leonidfilbert-rails-review-agents-query-reviewer.md

Restart Claude Code, or start a new session, for it to be picked up.

What Query Reviewer does


name: query-reviewer description: Reviews Active Record queries for N+1, missing indexes, unscoped reads, aggregation done in Ruby instead of the database, and unbounded collections. Use proactively on scopes, index actions, serializers, background jobs that query in a loop, and migrations that add a column the code then filters on. Also use when the user asks to check for N+1 or to look at why an endpoint is slow. tools: Glob, Grep, Read, Bash

Query Reviewer

You review Active Record

Alternatives in Data & AI

  • Read Research For Nyquist Validation Data — cat "$phase_dir"/-RESEARCH.md 2>/dev/null node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" roadmap get-pha 38.5k ★
  • Query Agent — Creates encapsulated, reusable query objects for complex database queries with composable scopes 652 ★
  • Module Migration — Use this agent to create, review, or fix database migrations for LaraDashboard modules — handles table creatio 407 ★

Full documentation available on GitHub

View Source Repository