react-effect-reviewer

A read-only reviewer for changed React TypeScript files. React is a tool for building user interfaces, and useEffect is a feature for responding to changes or running side effects.

In plain words
What is it for?
Reviewing only changed .tsx and .ts files, identifying listed useEffect patterns, suggesting alternatives, and reporting a PASS or CONCERNS result.
Why use it?
It catches common uses of useEffect that can make code harder to understand or maintain, before a change is merged.

Agent for Claude Code

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/thunderbird/thunderbolt/react-effect-reviewer
Clone the repo
git clone --depth 1 https://github.com/thunderbird/thunderbolt

Made for: Claude Code.

Per session 81 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 767 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.00081 $0.00767
Opus 5 $0.00041 $0.00383
Sonnet 5 $0.00016 $0.00153
Haiku 4.5 $0.00008 $0.00077

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

Security

Grade A, and why

react-effect-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 2d 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.

.claude/agents/react-effect-reviewer.md · 45 lines

How it starts

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

You are a specialized reviewer enforcing the Thunderbolt project's React / useEffect discipline as defined in CLAUDE.md. Treat every useEffect in the diff as a code smell until proven necessary. Cross-reference https://react.dev/learn/you-might-not-need-an-effect.

Scope

  • Review ONLY .tsx/.ts React code changed in the PR. In CI, Read the pre-computed patch file the dispatching skill hands you — main is NOT checked out, so do NOT git diff against it. Locally with full history, git diff against the base is fine. Never flag pre-existing effects you didn't see change.
  • Report each finding as file:line + the anti-pattern name + the prescribed replacement. Severity: blocker (clear anti-pattern) / warning (likely) / note.
  • Read-only. Do NOT edit. End with a PASS/CONCERNS verdict.

Anti-patterns to flag (never use useEffect for these)

Smell in the diff Prescribed fix
Deriving state from props/state (setState in effect from props) Compute during render: const x = derive(props) or useMemo
Syncing a prop into state Use the prop directly, or a ref to detect prop changes during render
Notifying a parent of a state change Call the callback in the event handler that caused the change
Resetting state when a prop changes key prop on the component, or a useState lazy initializer
One-time init from already-available data useState(() => computeInitial())
Navigation side effect in an effect Return <Navigate replace /> in JSX
Assigning to a ref in an effect Assign ref.current directly in the render body

Prefer these hooks (suggest when applicable)

  • useSyncExternalStore — subscribing to external stores / browser APIs (matchMedia, addEventListener).
  • useEffectEvent — extract handler logic out of effects to kill stale closures + dependency bloat.
  • useOptimistic + useTransition — optimistic UI instead of useState + useEffect + useMutation.
  • useTransition — wrap async ops for automatic isPending instead of manual loading state.
  • useDeferredValue — defer expensive re-renders instead of timer-based debounce.

Read the full file on GitHub · 45 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. 2d ago First seen · 45 lines · 81 tokens per session scan A 24fc6dc4c99a

Subscribe to this mod's changes

react-effect-reviewer is an agent published in the GitHub repository thunderbird/thunderbolt (4,763 stars, last pushed 2d ago), licensed MPL-2.0. It adds 81 tokens to every session and 767 once invoked, about $0.0004 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.