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.
git clone --depth 1 https://github.com/acaprino/daodanWrote 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.
[](https://agentmods.dev/commands/acaprino/daodan/review-react)<a href="https://agentmods.dev/commands/acaprino/daodan/review-react"><img src="https://agentmods.dev/badge/commands/acaprino/daodan/review-react/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/acaprino/daodan/review-react"><img src="https://agentmods.dev/badge/commands/acaprino/daodan/review-react.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00050 | $0.02707 |
| Opus 5 | $0.00025 | $0.01354 |
| Sonnet 5 | $0.00010 | $0.00541 |
| Haiku 4.5 | $0.00005 | $0.00271 |
Grade A, and why
review-react 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.
How it starts
The opening of the file, as written. The whole thing — 258 lines — stays where its author put it; the contents beside it link to each section on GitHub.
React Performance Review
You are a senior React performance auditor. Review React code for performance, state management, bundle optimization, and modern API adoption.
CRITICAL RULES
- React-only scope. Ignore CSS, layout, visual polish. Focus on components, state management, bundle, and React patterns.
- Run the agent. Fire the react-performance-optimizer agent with the full context.
- Write markdown report. Output is
.react-review/report.md-- an actionable checklist with scores, findings, and fix instructions. - Never enter plan mode. Execute immediately.
Step 1: Detect Scope
Check for React files
# Check for changed React files in git diff
git diff HEAD --name-only | grep -E '\.(tsx|jsx)$' || true
git diff --name-only | grep -E '\.(tsx|jsx)$' || true
git diff --cached --name-only | grep -E '\.(tsx|jsx)$' || true
Decision tree
Diff mode (changed React files exist AND --full is NOT set):
- Review only the changed React files
- Get the diff:
git diff HEAD -- <react files>
Full mode (no React changes in diff, OR --full flag set):
- Scan entire frontend:
src/,app/,components/,pages/-- or path from$ARGUMENTS
Discover React files (full mode only)
find src -type f \( -name "*.tsx" -o -name "*.jsx" \) | head -80
Or use the path from $ARGUMENTS if provided.
If no React files are found, stop and say so.
Step 1.5: Run Deterministic Linters (if available)
# React/JS linting (if eslint is configured)
npx eslint --format json "src/**/*.{tsx,jsx}" 2>/dev/null || true
Pass ESLint output to the agent for ground truth.
Step 2: Sample Key Files & Gather Context
Read a representative cross-section:
- Entry layout files (e.g.,
App.tsx,Layout.tsx,_app.tsx,root.tsx) - 3-5 core components
- State management files (stores, contexts, atoms)
- Config files (vite.config, next.config, tsconfig)
Step 3: Run Review Agent
Task:
subagent_type: "react-development:react-performance-optimizer"
description: "React performance and bundle optimization audit"
prompt: |
Audit the React performance, state management, and bundle optimization of this frontend codebase.
## Scope
[list of key files sampled]
## File Contents
[paste sampled components, state management files, and config -- NOT stylesheets]
## Product Brief (if available)
[paste brief content (especially performance budget and stack info) or "No product brief found"]
## Linter Output (if available)
[paste ESLint JSON report if captured in Step 1.5, or "No linter output available"]
## Vercel React Best Practices Checklist (70 rules -- flag violations)
**1. Eliminating Waterfalls (CRITICAL):** async-defer-await (move await into branches), async-parallel (Promise.all for independent ops), async-dependencies (better-all for partial deps), async-api-routes (start promises early, await late), async-suspense-boundaries (stream with Suspense)
**2. Bundle Size (CRITICAL):** bundle-barrel-imports (import directly, avoid barrels), bundle-dynamic-imports (next/dynamic for heavy components), bundle-defer-third-party (load analytics after hydration), bundle-conditional (load modules only when activated), bundle-preload (preload on hover/focus)
**3. Server-Side (HIGH):** server-auth-actions, server-cache-react (React.cache per-request), server-cache-lru (cross-request LRU), server-dedup-props, server-hoist-static-io, server-serialization (minimize client data), server-parallel-fetching, server-after-nonblocking
**4. Client-Side Data (MEDIUM-HIGH):** client-swr-dedup, client-event-listeners (deduplicate global), client-passive-event-listeners (passive for scroll), client-localstorage-schema (version and minimize)
**5. Re-render Optimization (MEDIUM):** rerender-defer-reads, rerender-memo (extract expensive work), rerender-memo-with-default-value, rerender-dependencies (primitive deps), rerender-derived-state (subscribe to derived booleans), rerender-derived-state-no-effect, rerender-functional-setstate, rerender-lazy-state-init, rerender-simple-expression-in-memo, rerender-move-effect-to-event, rerender-transitions (startTransition), rerender-use-ref-transient-values, rerender-no-inline-components
**6. Rendering (MEDIUM):** rendering-animate-svg-wrapper, rendering-content-visibility, rendering-hoist-jsx, rendering-svg-precision, rendering-hydration-no-flicker, rendering-hydration-suppress-warning, rendering-activity, rendering-conditional-render (ternary not &&), rendering-usetransition-loading, rendering-resource-hints, rendering-script-defer-async
**7. JS Performance (LOW-MEDIUM):** js-batch-dom-css, js-index-maps (Map for lookups), js-cache-property-access, js-cache-function-results, js-cache-storage, js-combine-iterations, js-length-check-first, js-early-exit, js-hoist-regexp, js-min-max-loop, js-set-map-lookups, js-tosorted-immutable, js-flatmap-filter
**8. Advanced (LOW):** advanced-event-handler-refs, advanced-init-once, advanced-use-latest
## Instructions
Use the checklist above as your primary audit framework. Flag any violations you find in the reviewed code, citing the specific rule ID (e.g. "Violates bundle-barrel-imports").
Evaluate (in addition to the rules above):
1. **React Compiler readiness**: Is `babel-plugin-react-compiler` configured? Identify patterns the compiler can auto-optimize vs patterns requiring manual intervention (external store reads, non-React state mutations, dynamic property access)
2. **External store selector audit (CRITICAL)**:
- Selectors returning objects/arrays without `useShallow` -- causes re-renders on every store update
- Selectors with `.filter()` / `.map()` / `.reduce()` creating new references every render
- `useStore()` with no selector -- subscribes to entire store
- Component receiving store-derived object as prop without memoization
3. **React 19 API adoption**: Are newer APIs used where beneficial?
- `use()` for conditional data fetching and context
- `useOptimistic()` for optimistic UI updates
- `useFormStatus()` for form submission state
- `useActionState()` for server action results
- `useDeferredValue()` for separating critical vs deferrable updates
4. **State management**: Zustand/Jotai/Redux selector patterns, prop drilling, state duplication, useEffect chains
5. **Bundle optimization**: Heavy imports, missing code splitting, lazy loading opportunities, tree-shaking blockers
6. **Virtualization check**: Large lists/tables not using TanStack Virtual or similar, index as key in virtualized lists
7. **Context-aware caching**: TanStack Query config appropriate for app type? CRUD apps need short stale times, real-time apps need WebSocket invalidation, static content can use long cache
8. **useEffect/useCallback infinite loop detection (CRITICAL)**:
- `useCallback` that updates state listed in its own dependency array, called from a `useEffect` that depends on the callback -- creates infinite re-trigger cycle
- `useEffect` with no ref guard calling state-updating functions on mount
- Unstable callback references (object/array deps) in `useEffect` dependency arrays causing continuous re-firing
- Symptom: repeated identical network requests, 429 rate limit errors, CPU spike on component mount
9. **useEffect cleanup audit**:
- Missing `AbortController` on fetch calls
- `Channel.onmessage` not nulled on unmount
- WebSocket connections not closed
- Missing `clearInterval` / `clearTimeout`
- Missing `removeEventListener`
10. **Stale closure detection (CRITICAL)**:
- Variables derived from state/props captured in `useEffect(..., [])` closures without ref indirection
- Event handlers registered at mount time reading state that changes after mount
- Interval/timeout callbacks reading stale captured values
- Symptom: handler uses outdated state value, decisions based on stale data, no crash or warning
11. **Performance budget** (if brief provided): Does the current state meet the stated Core Web Vitals or performance targets?
For each finding: severity (Critical/High/Medium/Low), file, issue, specific fix with code example.
Note what's done well.
Return structured JSON at the end:
```json
{
"findings": [
{ "severity": "Critical", "category": "Re-renders", "file": "...", "issue": "...", "fix": "..." }
],
"positives": ["..."],
"score": { "re_render_control": 6, "state_management": 7, "bundle": 8, "overall": 7 }
}
```
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.
- 4d ago First seen · 258 lines · 50 tokens per session scan A 10d9d6ca90fb
review-react is a command published in the GitHub repository acaprino/daodan (9 stars, last pushed yesterday), licensed MIT. It adds 50 tokens to every session and 2,707 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-09-05.
Other commands, from other repositories
react-patterns
Review React code for performance and composition patterns — 50+ rules ranked by impact.
review-arch
Review the current branch for code quality, TypeScript, and React/Next.js patterns. Supports whole-branch review or scoped review by path, feature, or base branch.
quality-commands
:::info This document covers the code quality commands for validating comment standards and i18n completeness in the eIsland frontend. ::.
react-crusade
Unleash parallel React Purist agents to audit component architecture, hook discipline, state management, and effect hygiene across the frontend codebase. No impure component survives.
react-review
Comprehensive React/JSX code review for hook correctness, render performance, server/client component boundaries, accessibility, and React-specific security. Invokes the react-reviewer agent (and typescript-reviewer alongside on TSX/JSX changes).
react-review
React/TypeScript code review with severity-based filtering.