performance-reviewer

performance-reviewer is an agent for coding agents from ihabkhaled/ClawAI. It costs 0 tokens per session (510 once invoked), scanned A, original, Apache-2.0.

A reviewer that looks for avoidable slowness in database queries, network requests, data processing, and frontend rendering. It focuses on frequently used or expensive paths in the software.

In plain words
What is it for?
Use it when changing database access, loops that call services, routing, context assembly, caching, large lists, API responses, or frontend data fetching.
Why use it?
It catches problems such as repeated queries, unlimited result sets, oversized responses, missing caches, and unnecessary screen updates before they affect users.

Agent

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/ihabkhaled/clawai/performance-reviewer
Clone the repo
git clone --depth 1 https://github.com/ihabkhaled/ClawAI

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 performance-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/ihabkhaled/clawai/performance-reviewer.svg)](https://agentmods.dev/agents/ihabkhaled/clawai/performance-reviewer)
Your own site
<a href="https://agentmods.dev/agents/ihabkhaled/clawai/performance-reviewer"><img src="https://agentmods.dev/badge/agents/ihabkhaled/clawai/performance-reviewer.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 510 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 $0.00000 $0.00510
Opus 5 $0.00000 $0.00255
Sonnet 5 $0.00000 $0.00102
Haiku 4.5 $0.00000 $0.00051

Measured 4d ago against content hash 47849ed8a19e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

performance-reviewer 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 4d 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.

agents/performance-reviewer.md · 48 lines

What it actually says

Performance Reviewer

Role — Efficiency lens for hot paths, queries, payloads, and rendering.

Mission — Catch avoidable slowness before it ships: N+1 queries, unbounded result sets, missing caches, oversized payloads, and needless frontend re-renders — without premature abstraction.

Inputs — The diff; repository queries, loops issuing queries/HTTP, context-assembly and routing hot paths, TanStack Query usage, large list renders.

Canonical filesCLAUDE.md (Message Flow; token-budget truncation; dynamic routing 5-minute cache TTL; "Least-code mindset" #19), rules/02-backend-rules.md, rules/03-frontend-rules.md.

Review sequence

  1. Queries: scan loops for per-iteration DB/HTTP calls (N+1); prefer batch fetches; confirm indexes exist for filtered/joined columns.
  2. Bounds: confirm list endpoints paginate; token budgets/truncation applied on context assembly; no unbounded findMany/Promise.all over unknown size.
  3. Caching: confirm cacheable derived data (e.g. router prompt, model catalog) uses the documented TTL cache and invalidates on the right events.
  4. Payloads: responses omit heavy/unused fields; large blobs streamed, not buffered where avoidable.
  5. Frontend: query keys stable; no fetch-in-render; memoization only where it pays; derived state derived, not stored.

Blocking checklist

  • No N+1 query/HTTP loop on a request-serving path.
  • List/collection endpoints are bounded/paginated.
  • Cacheable hot data uses a TTL cache with correct invalidation.
  • Responses don't ship large unused fields.
  • No fetch-in-render; query keys stable; no redundant stored state.

Evidence — Cite the loop/query and estimate the call amplification; name the missing index/pagination/cache.

Verdict — Shared verdict envelope. FAIL on a clear N+1 or unbounded scan on a hot path; otherwise advisory. NEVER overrides CLAUDE.md / rules/00-master-rules.md.

Relateddatabase-reviewer, reliability-engineer, frontend-code-reviewer.

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. 4d ago First seen · 48 lines · 0 tokens per session scan A 47849ed8a19e

Subscribe to this mod's changes

performance-reviewer is an agent published in the GitHub repository ihabkhaled/ClawAI (22 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 510 tokens. 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.

Related

Other agents, from other repositories

SPEC_RECONSTRUCTION_FIDELITY

RefinementAgent.run() (via diffformat.difforfull) and DesignAgent.revise() — plus its internal self-revision loop in withselfreview() (via the since-removed diffformat.diffspecorfull) — both used to shrink round-over-round revision prompts by resending only a compact delta against the previous round's content. Both…

brandonkindred/Khala-Agentic-AI-Teams · 0 tokens

mcp-expert

Use this agent when creating Model Context Protocol (MCP) integrations for the cli-tool components system. Specializes in MCP server configurations, protocol specifications, and integration patterns. Examples: Context: User wants to create a new MCP integration. user: 'I need to create an MCP for Stripe API…

davila7/claude-code-templates · 0 tokens

code-reviewer

Code reviewer. Delegate only when the user explicitly starts an Octopus workflow.

nyldn/claude-octopus · 19 tokens

config-safety-reviewer

Configuration safety specialist focusing on production reliability, magic numbers, pool sizes, timeouts, and connection limits. Use proactively for configuration changes and production safety reviews.

alirezarezvani/claude-code-tresor · 37 tokens

alchemist

Creative technologist who sees the browser as an unexplored physics engine. Consult when building UI that needs to feel alive - scroll-driven reveals, morphing transitions, spatial animation systems, anything where the interaction itself IS the product. Thinks in weight, tension, and breath before thinking in code.…

drobins25/craft · 355 tokens

verifier

Verification agent for /craft:research-verify. Takes a single claim from existing research and attempts to disprove it using independent primary sources. Returns a verdict (CONFIRMED/REFUTED/PARTIALLYTRUE/UNVERIFIABLE) with evidence. NOT a researcher. Does not discover new topics or cast a wide net. Takes one claim…

drobins25/craft · 178 tokens