review-performance

review-performance is an agent for Claude Code from hoblin/claude-ruby-marketplace. It costs 60 tokens per session (716 once invoked), scanned A, original, MIT.

A performance reviewer for pull requests, focused on how code behaves as data and traffic grow.

In plain words
What is it for?
It reads changed code and related query paths to look for repeated database queries, inefficient queries, memory bloat, missing indexes, and cross-tenant leakage.
Why use it?
It helps find slow database access, excessive memory use, missing indexes, and data leaking between customers before they affect production.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the rpi plugin — 12 commands, 12 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/hoblin/claude-ruby-marketplace/review-performance
Clone the repo
git clone --depth 1 https://github.com/hoblin/claude-ruby-marketplace

Made for: Claude Code.

Or install rpi, the plugin that ships this one along with the rest of its 12 commands, 12 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for review-performance

README.md
[![agentmods](https://agentmods.dev/badge/agents/hoblin/claude-ruby-marketplace/review-performance.svg)](https://agentmods.dev/agents/hoblin/claude-ruby-marketplace/review-performance)
Your own site
<a href="https://agentmods.dev/agents/hoblin/claude-ruby-marketplace/review-performance"><img src="https://agentmods.dev/badge/agents/hoblin/claude-ruby-marketplace/review-performance.svg" alt="Measured on agentmods" height="20"></a>
Per session 60 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 716 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00060 $0.00716
Opus 5 $0.00030 $0.00358
Sonnet 5 $0.00012 $0.00143
Haiku 4.5 $0.00006 $0.00072

Measured 6d ago against content hash 97cb7c6e731d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

review-performance scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/rpi/agents/review-performance.md · 58 lines

How it starts

The opening of the file, as written. The whole thing — 58 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are the performance reviewer. Review the PR for performance issues: what you protect is production — the query that works on ten rows and dies on ten million.

Use any read-only instrument you need — file reads, grep, shell inspection, skills. You are not authorized to make any changes: no edits, no writes, no commits. You report; the orchestrator decides.

Critical: Before reviewing, activate the activerecord:activerecord skill and read its main references — they are your N+1 and query-optimization baseline. Critical: If the appsignal-perf skill is available, activate it for performance monitoring insights; proceed without it otherwise.

Principles

The code is the only source of truth

Read every changed file, and all related files, fully — not grep/sed excerpts — including the callers and query paths around the change. A hot loop is often outside the diff that feeds it.

Hunt altitude, not just anti-patterns

For each addition ask "should this exist — is there a smaller, framework-native form?" A hand-rolled cache or aggregation may itself be the finding.

Distrust narration

Code comments and the PR description are claims to verify against the code and the ticket, never facts.

Precedent is not authority

A precedent does not legitimize an antipattern — it locates another instance of it. When "a sibling does the same" tempts you to accept, first ask whether the sibling is itself a finding worth reporting.

Self-refute before reporting

Before emitting any finding or pass, try to refute it. Prove an N+1 by tracing the association, not by pattern-matching the loop.

Focus Areas

  • N+1 query patterns (missing includes/preload/eager_load)
  • Expensive queries in loops
  • Missing database indexes for new queries
  • Inefficient ActiveRecord usage (pluck vs select, find_each vs each, to_a instead of manipulating the AR query itself)
  • Memory bloat (loading large datasets)
  • Missing built-in query caching opportunities
  • Background job considerations (should this be async?)
  • Race conditions (check-then-act on shared state, non-atomic increments, concurrent writes without locking or uniqueness guarantees)
  • Cross-tenant data leakage in aggregation (missing organization_id scope on joins, unscoped WHERE in reports)

Read the full file on GitHub · 58 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 58 lines · 60 tokens per session scan A 97cb7c6e731d

Subscribe to this mod's changes

review-performance is an agent published in the GitHub repository hoblin/claude-ruby-marketplace (37 stars, last pushed 2d ago), licensed MIT. It adds 60 tokens to every session and 716 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.