review-perf

review-perf is a command for Claude Code from smicolon/ai-kit. It costs 43 tokens per session (1,929 once invoked), scanned A, original, MIT.

A review command for checking rendering performance in React or Next.js code. It examines memoization, data fetching, and the effect of changes on the browser bundle.

In plain words
What is it for?
It reviews a whole branch or a selected path, feature, or base branch, and identifies performance issues related to React rendering and data fetching.
Why use it?
It helps identify code changes that may cause slower rendering, unnecessary work, inefficient data requests, or larger downloads.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit It reviews a whole branch or a selected path, feature, or base branch, and identifies performance issues related to React rendering and data fetching.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/smicolon/ai-kit/review-perf
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.

Clone the repo
git clone --depth 1 https://github.com/smicolon/ai-kit

Made for: Claude Code.

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-perf

README.md
[![agentmods](https://agentmods.dev/badge/commands/smicolon/ai-kit/review-perf.svg)](https://agentmods.dev/commands/smicolon/ai-kit/review-perf)
Your own site
<a href="https://agentmods.dev/commands/smicolon/ai-kit/review-perf"><img src="https://agentmods.dev/badge/commands/smicolon/ai-kit/review-perf.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,929 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00043 $0.01929
Opus 5 $0.00022 $0.00964
Sonnet 5 $0.00009 $0.00386
Haiku 4.5 $0.00004 $0.00193

Measured 3d ago against content hash 588c04908d53, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

review-perf 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 3d 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.

packs/react-review/commands/review-perf.md · 133 lines

How it starts

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

You are reviewing the current branch for performance and rendering efficiency ONLY. Ignore visual polish and accessibility. Overlap with /review-arch is fine for issues with direct performance consequences, but don't re-raise pure architecture nits.

Step 0 — Interpret the scope and detect the data-fetching library

User argument: $ARGUMENTS

Classify into one of four modes. Check package.json for the data-fetching library (TanStack Query, SWR, Apollo, or native fetch). The first two lines of your output MUST be:

Mode: <whole-branch | path: <p> | feature: <name> | base: <branch>> | Data fetcher: <tanstack-query | swr | apollo | native-fetch | none>
Reviewed N files in scope. Found X P0, Y P1, Z P2 findings.
  • Mode A — Whole branch (empty): Review everything changed vs main.
  • Mode B — Path scope (contains / or a known extension, or matches git ls-files $ARGUMENTS): Review only changes inside that path.
  • Mode C — Feature scope (single bareword): Find files related via git ls-files | grep -i <feature>, intersect with branch diff.
  • Mode D — Base branch (matches a real branch): Review against that base instead of main.

Ambiguous → prefer branch if git branch -a confirms.

Step 1 — Scope the diff

Based on the mode:

  • A: git diff main...HEAD --stat
  • B: git diff main...HEAD --stat -- <path>
  • C: Compute the file list from the feature match, diff each relevant file.
  • D: git diff <base>...HEAD --stat

List modified components, hooks, and any package.json / lockfile / config changes (those affect bundle size).

Step 2 — Evaluate each changed file

Rendering efficiency

  • Unnecessary re-renders — inline object/array/function props passed to memoized children? New reference on every render?
  • Memoization correctnessReact.memo, useMemo, useCallback used where it actually helps (stable props to expensive children, expensive computation), or cargo-culted where it's dead weight?
  • Derived state — stored in useState + synced via useEffect instead of computed during render?
  • Effects — running too often? Missing dependencies? Doing work that should be event-driven?
  • Keys — stable and meaningful (not index for dynamic/reorderable lists)?
  • Context splits — one giant context causing unrelated consumers to re-render?
  • Expensive children — rendered unconditionally when they could be gated?

Read the full file on GitHub · 133 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. 3d ago Changed · +1 lines 588c04908d53
  2. 4d ago First seen · 132 lines · 43 tokens per session scan A f98fa85b9130

Subscribe to this mod's changes

review-perf is a command published in the GitHub repository smicolon/ai-kit (6 stars, last pushed 4d ago), licensed MIT. It adds 43 tokens to every session and 1,929 once invoked, about $0.0002 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-09-03.

Related

Other commands, from other repositories

artifact_fetch.rs

In the dmg the Tauri webview origin is https://tauri.localhost (HTTPS) while the local backend serves on http://localhost:8000 (HTTP). WKWebView classifies any HTTP subresource loaded from an HTTPS document as "active mixed content" and blocks it silently — both iframe loads and fetch() from JS. The artifact panel…

NetMindAI-Open/NarraNexus · 0 tokens

test-bar

Generate a floating QA test overlay for the current branch's UI changes. Use when user says /test-bar, needs visual QA scenarios, or wants to test conditional rendering paths.

axiomantic/spellbook · 34 tokens

integration-audit

Perform a comprehensive audit of all features, checking whether each feature is fully integrated across every layer of the stack (frontend UI, API routes, database/Supabase, state management, types). Output the results as an interactive HTML visualization using the Factory-inspired design system.

eddiebelaval/squire · 0 tokens

web-build-fix

Diagnose and resolve web build, bundling, or deployment issues.

MRCalderon3D/everything-game-dev-code · 14 tokens

react-build

Fix React build failures (Vite, webpack, Next.js, CRA, Parcel, esbuild, Bun) incrementally — JSX/TSX compile errors, hydration mismatches, server/client component boundary failures, missing types. Invokes the react-build-resolver agent for minimal, surgical fixes.

DekaPrayoga/AurixAgent · 59 tokens

svelte:storybook-troubleshoot

Diagnose and fix common Storybook issues in SvelteKit projects, including build errors, module problems, and configuration issues.

qdhenry/Claude-Command-Suite · 0 tokens