Borrowing it
Nothing to install: this file belongs to ctxpipe-ai/ctxpipe. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/ctxpipe-ai/ctxpipe/main/.cursor/skills/react/SKILL.mdgit clone --depth 1 https://github.com/ctxpipe-ai/ctxpipeWrote 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/skills/ctxpipe-ai/ctxpipe/react)<a href="https://agentmods.dev/skills/ctxpipe-ai/ctxpipe/react"><img src="https://agentmods.dev/badge/skills/ctxpipe-ai/ctxpipe/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/skills/ctxpipe-ai/ctxpipe/react"><img src="https://agentmods.dev/badge/skills/ctxpipe-ai/ctxpipe/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.00038 | $0.01296 |
| Opus 5.5 | $0.00015 | $0.00518 |
| Sonnet 5.5 | $0.00008 | $0.00259 |
| Haiku 4.5 | $0.00004 | $0.00130 |
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.
How it starts
The opening of the file, as written. The whole thing — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.
React (UI) — you might not need an Effect
Primary reference: You Might Not Need an Effect — treat this skill as a project-local digest; extend it as team conventions grow.
Mental model
Effects are for synchronizing with things outside React: third-party widgets, the network, the browser DOM, subscriptions, etc.
If there is no external system—for example, you only need to update local state when props or other state change—you usually should not use an useEffect for that. Unnecessary Effects make code harder to follow, can add extra render passes, and are easier to get wrong.
You usually don’t need an Effect for
- Transforming data for rendering — Compute from props/state in the component body. Don’t store derived values in state and “refresh” them in an Effect; that can cause a stale render, then a second render when the Effect runs.
- User-driven work — Handle user intent in event handlers (clicks, submit, etc.). By the time an Effect runs, you don’t know which user action caused the update.
You do use Effects to synchronize with external systems (non-React UI, the browser DOM, third-party widgets, etc.).
Data fetching in this repo: use TanStack Query (useQuery, useMutation, useInfiniteQuery, etc.) for all server/API data. Do not use useEffect to load, refetch, or keep server data in sync—Query handles caching, loading and error state, and invalidation.
Patterns (read the official page for full examples)
| Situation | Prefer |
|---|---|
| Server / API data (read, mutations, refetch) | TanStack Query only—never useEffect + manual fetch for data loading |
| Value derivable from props/state | Compute during render; avoid redundant state (Thinking in React) |
| Expensive pure calculation | useMemo with correct deps; measure before optimizing. React Compiler may reduce the need for manual useMemo (docs) |
Reset all inner state when a prop changes (e.g. userId) |
key={userId} on a child so React remounts a fresh subtree |
| Reset/adjust some state when props change | Often avoid Effect: e.g. adjust during render with a prevX pattern, or store IDs not objects and derive selection during render (see same article) |
| Shared logic for several buttons | Extract a function; call it from each event handler—not from an Effect that watches flags |
| POST / work that must run on a specific user action | Event handler (e.g. submit) |
| POST / work because the component appeared | Effect can be appropriate; watch for Strict Mode double-invocation in dev |
| Chains of Effects only updating state to trigger more state | Compute during render; compute next state in the event handler where the action happens |
| One-time app init that must be truly once per load | Module scope flag, root entry, or documented pattern—avoid “run once” Assumptions that break on remount |
| Child notifies parent of state | Update parent in the same event path as the child; consider controlled props from parent. Avoid useEffect that only mirrors child state to parent |
| Data needed by both parent and child | Data flows down—parent fetches/owns, passes props down |
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.
- 1mo ago First seen · 66 lines · 38 tokens per session scan A 3959353eb406
react is a skill published in the GitHub repository ctxpipe-ai/ctxpipe (26 stars, last pushed today), licensed MIT. It adds 38 tokens to every session and 1,296 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-30.
Other skills, from other repositories
react-hooks-composition
Advanced React hooks composition patterns - SWR integration, debounced search, memoized contexts, state machines, and performance optimization.
react-core
General React fundamentals - components and JSX, props and state, the core hooks (useState/useEffect/useRef/useMemo/useCallback/useContext), composition, conditional and list rendering, and controlled inputs. The canonical "depends on React" reference.
react-code-review-patterns
Review checklists and patterns for React/TypeScript frontend code reviews. Use when: (1) reviewing React components, (2) checking TypeScript type safety, (3) validating hooks usage, (4) checking accessibility compliance.
React Component Patterns
Use this skill when you’re building or refactoring React components in a production app and want consistent patterns for typing, composition, state, and performance without introducing premature abstraction.
no-useEffect
A React coding guideline that avoids direct use of useEffect, a feature for responding to changes in data or the page. It recommends other patterns instead.
react-docs
Comprehensive React 19 reference covering all built-in hooks, components, APIs, concurrent features, Server Components, React Compiler, and advanced patterns. Use whenever the user mentions React, JSX, hooks, components, state management, effects, Context, Suspense, transitions, forms, Server Components, or React…