react

react is a skill for Claude Code, Codex from ndisisnd/cook. It costs 41 tokens per session (1,682 once invoked), scanned A, original, MIT.

A set of standards for writing and reviewing React with TypeScript, React being a library for building user interfaces and TypeScript being JavaScript with type checking.

In plain words
What is it for?
Building or reviewing React components, JSX, TSX, hooks, and TypeScript props. It covers cleanup, cancellation, and safe component structure.
Why use it?
It helps prevent mistakes with hooks, effects, component boundaries, asynchronous work, and typed properties.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Building or reviewing React components, JSX, TSX, hooks, and TypeScript props. It covers cleanup, cancellation, and safe component structure.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ndisisnd/cook/react
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.

Any agent
npx skills add ndisisnd/cook --skill react
Clone the repo
git clone --depth 1 https://github.com/ndisisnd/cook

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/ndisisnd/cook/react/github.svg)](https://agentmods.dev/skills/ndisisnd/cook/react)
Your own site
<a href="https://agentmods.dev/skills/ndisisnd/cook/react"><img src="https://agentmods.dev/badge/skills/ndisisnd/cook/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.

agentmods 80×15 button for react

Your own site · 80×15
<a href="https://agentmods.dev/skills/ndisisnd/cook/react"><img src="https://agentmods.dev/badge/skills/ndisisnd/cook/react.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,682 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.00041 $0.01682
Opus 5.5 $0.00016 $0.00673
Sonnet 5.5 $0.00008 $0.00336
Haiku 4.5 $0.00004 $0.00168

Measured 1mo ago against content hash 50f921153486, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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 1mo 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.

standards/react/SKILL.md · 116 lines

How it starts

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

React

Load this file by default for any .tsx or .jsx task. Pull refs only when the task explicitly requires that depth — see the References section.

P0 — Hook Correctness

  • Dependency arrays must be exhaustive (exhaustive-deps). Never suppress the linter to silence a warning — fix the logic.
  • Objects, arrays, and functions in dependency arrays: first move creation inside the effect, hoist constants, or remove the effect. Use useMemo/useCallback only when identity stability is required or measured work is expensive.
  • useEffect is for syncing with external systems only. Derived data belongs in render; event-specific logic belongs in event handlers. Prefer framework data APIs, route loaders, TanStack Query, or SWR over raw fetch effects when available.
  • Effects must clean up subscriptions, timers, and event listeners. Use AbortController for cancellable fetches and stale-response guards for non-abortable async work.
  • Never call hooks inside conditions, loops, nested functions, event handlers, class components, callbacks passed to hooks, try/catch/finally, or after a conditional return.
  • Do not use useEffect to sync derived state — compute it during render instead.
  • Lazy-initialize expensive state: useState(() => compute()).
  • useMemo and useCallback: measure before adding. React Compiler may reduce manual memoization; keep manual memoization where identity is observable or profiling proves value.
  • useRef for mutable values that must not trigger re-renders (DOM nodes, timers, previous-value tracking).
  • useTransition / useDeferredValue for non-blocking UI updates that should not block input.
  • React 19+: use useEffectEvent for effect-local callbacks that need latest committed values without re-synchronizing the effect. Do not use it to hide real dependencies. For older React or non-effect callbacks, use the latest-ref pattern.

P0 — Component Basics

  • Function components only. No class components.
  • One exported component per file; keep small helper components module-local when they only serve that file. Prefer named exports. PascalCase names.
  • Treat ~250 lines as a review smell, not a hard rule. Split by responsibility before a component accumulates unrelated state, effects, or rendering branches.
  • No nested component definitions — define at module scope.
  • Use stable IDs as list keys; never use array index.
  • Use useId for generated accessibility IDs; never use it for list keys.
  • Prefer ternary (cond ? <A /> : <B />) over && for conditional rendering — && renders 0 when the left side is falsy.
  • Define event handlers before the return statement; avoid non-trivial inline arrow functions in JSX props.
  • Do not thread props through components that do not use them — use composition, Context API, or a state manager when state crosses several layers.
  • Custom accordions, dialogs, menus, tabs, and compound widgets must implement keyboard interaction, focus management, and ARIA semantics or use a proven accessible primitive.

Read the full file on GitHub · 116 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 116 lines · 41 tokens per session scan A 50f921153486

Subscribe to this mod's changes

react is a skill published in the GitHub repository ndisisnd/cook (2 stars, last pushed 2mo ago), licensed MIT. It adds 41 tokens to every session and 1,682 once invoked, about $0.0002 per session on Opus 5.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

frontend-architecture-planner

Plan architecture and ownership for standard or deep React/Next.js work across routing, state, data, styling, forms, builds, migrations, and implementation handoff. Skip micro-fixes and unrelated stacks.

ytvee-dev/webdev-agent-kit · 47 tokens

frontend-layout-implementer

Implement approved React/Next.js design specs using existing CSS Modules, Redux, TanStack, and Axios conventions. Route uninspected designs to intake and resolve product decisions before coding. Excludes unrelated stacks and styling systems.

ytvee-dev/webdev-agent-kit · 50 tokens

react-expert

Use when building React 18+ applications in .jsx or .tsx files, Next.js App Router projects, or create-react-app setups. Creates components, implements custom hooks, debugs rendering issues, migrates class components to functional, and implements state management. Invoke for Server Components, Suspense boundaries…

Jeffallan/claude-skills · 79 tokens

extract-source-sample

Given the path to a finished content-goose ad-run folder, extract everything that defines that ad — recipe shot list, VO script, characters, voices, world, atom-skills, master mp4 — and emit a source-sample.json in the exact shape the upload-ad-sample skill writes to the Goose Ads library. Also links every character…

gooseworks-ai/goose-skills · 160 tokens

moai-design-tools

Design tool integration specialist covering Figma MCP, Pencil renderer, and Pencil-to-code export. Use when fetching design context from Figma, rendering Pencil designs, or exporting to React/Tailwind code.

modu-ai/moai-adk · 45 tokens

design-loop

Autonomous multi-page site builder using a baton-passing loop. Each iteration reads a task from .design/next-prompt.md, generates a page in HTML/Tailwind, integrates it into the site, verifies visually, then writes the next task to keep the loop alive. Use whenever the user asks to build an entire site autonomously…

jezweb/claude-skills · 130 tokens