react-expert

react-expert is a skill for Claude Code, Codex from Miaoge-Ge/coding-agent-skills. It costs 90 tokens per session (1,184 once invoked), scanned A, original, MIT.

Guidance for building and debugging React interfaces. React is a JavaScript library for composing screens from reusable components, and this covers hooks, state, rendering, performance, Suspense, and Server Components.

In plain words
What is it for?
Use it when creating or refactoring React components and hooks, managing state, fixing rendering bugs, or working with effects, refs, memoization, Suspense, or Server Components.
Why use it?
It helps diagnose stale state, unnecessary re-renders, effect loops, lost focus, and confusing state-management choices. It also explains when to derive values during rendering instead of storing them separately.

Skill for Claude CodeCodex

Part of the react-expert plugin — 1 skill 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 skills/miaoge-ge/coding-agent-skills/react-expert
Any agent
npx skills add Miaoge-Ge/coding-agent-skills --skill react-expert
Clone the repo
git clone --depth 1 https://github.com/Miaoge-Ge/coding-agent-skills

Made for: Claude Code, Codex.

Or install react-expert, the plugin that ships this one along with the rest of its 1 skill.

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 react-expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/miaoge-ge/coding-agent-skills/react-expert.svg)](https://agentmods.dev/skills/miaoge-ge/coding-agent-skills/react-expert)
Your own site
<a href="https://agentmods.dev/skills/miaoge-ge/coding-agent-skills/react-expert"><img src="https://agentmods.dev/badge/skills/miaoge-ge/coding-agent-skills/react-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 90 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,184 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.00090 $0.01184
Opus 5 $0.00045 $0.00592
Sonnet 5 $0.00018 $0.00237
Haiku 4.5 $0.00009 $0.00118

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

Security

Grade A, and why

react-expert 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.

plugins/react-expert/skills/react-expert/SKILL.md · 91 lines

How it starts

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

React Expert

UI is a pure function of state. Derive during render; use effects only to sync with the outside world. Most "React performance" problems are really "I created an effect/state I didn't need."

When to Use

  • Building or refactoring React components and custom hooks.
  • Bugs: stale state, infinite render loops, effects firing too often, lost input focus, extra re-renders.
  • Choosing state management (local vs lifted vs context vs server cache vs store).
  • Effects, refs, memoization, Suspense, or Server Components.

When NOT to Use

  • Pure TypeScript typing → typescript-expert.
  • Next.js routing/server actions/caching specifics → nextjs-expert.
  • Styling only → tailwind-expert. Accessibility semantics → accessibility-expert.

Core Principles

1. Render is pure; derive don't sync

  • Compute values from props/state during render. Don't mirror props into state, then sync with useEffect — that adds a render and bugs.
  • Reset component state with a key, not an effect. Adjust state during render (the rare "store previous value" pattern) instead of in an effect when possible.

2. useEffect is an escape hatch

  • It's for synchronizing with external systems (network, subscriptions, DOM, timers) — not for transforming data or responding to events.
  • Event logic belongs in event handlers, not effects. If an effect only runs because a user did something, it's probably wrong.
  • Always clean up (abort fetches, clear timers, unsubscribe) in the returned function. Give complete dependency arrays; if a dep "shouldn't" re-run things, restructure (move it into a ref, a reducer, or out of the component).

3. State, placed correctly

  • Local useStateuseReducer when transitions are related/complex → lift to the closest common parent → Context for low-frequency global values (theme, auth) → external store (Zustand/Redux) for high-frequency or cross-cutting state.
  • Server data is not UI state — use TanStack Query or RSC fetching for caching, dedup, and revalidation. Don't hand-roll it in useEffect.

Read the full file on GitHub · 91 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. 4d ago First seen · 91 lines · 90 tokens per session scan A a4360cf8bebb

Subscribe to this mod's changes

react-expert is a skill published in the GitHub repository Miaoge-Ge/coding-agent-skills (5 stars, last pushed 3mo ago), licensed MIT. It adds 90 tokens to every session and 1,184 once invoked, about $0.0005 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-31.

Related

Other skills, from other repositories

ai-prompt-evaluator

Activate when designing, evaluating, red-teaming, and refining LLM system prompts, agent instructions, structured JSON schemas, and defense boundaries against prompt injections and hallucinations — trigger phrasings include "evaluate my system prompt", "red-team this AI prompt", "improve my prompt to prevent…

ieeecsopen/mcp-cs · 109 tokens

frontend-patterns

Frontend development patterns for React, Next.js, state management, performance optimization, and UI best practices.

deepelementlab/jupyter-studio · 24 tokens

humanizer

Rewrite AI-sounding text so it reads naturally without changing what it says. Use when editing or reviewing prose for inflated claims, sales language, vague sources, repetitive structure, stock AI words, passive voice, filler, or chatbot artifacts. Based on Wikipedia's "Signs of AI writing.".

blader/humanizer · 61 tokens

web-artifacts-builder

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

Prismer-AI/PrismerCloud · 64 tokens

audit

Audits recent work against its Definition of Done and project patterns. Runs the test suite, compares code against the spec, and reports PASS / PARTIAL / FAIL. Also runs the Critical Gate — a safety scan of the diff for destructive or dangerous operations. Generates an incremental prompt pack for any gaps found. With…

pe-menezes/vibeflow · 93 tokens

hotfix

Fixes an observed defect with reproducible evidence in one call: writes a short trace doc before touching code, implements the fix, and backs it with a regression test written before the fix. Production incidents are the motivating case, not a gate. When blocked, it halts by name and saves the doc for a later call to…

pe-menezes/vibeflow · 102 tokens