ctxpipe: Skill for Cursor

.cursor/skills/react/SKILL.md

react is a skill for Cursor from ctxpipe-ai/ctxpipe. It costs 38 tokens per session (1,296 once invoked), scanned A, original, MIT.

A guide to common React patterns for building and editing components, including how to separate rendering from side effects and how to handle server data with TanStack Query.

In plain words
What is it for?
Use it when creating or changing React components in apps/ui, especially when a component loads server data or manages interactive behavior.
Why use it?
It helps avoid common React mistakes involving effects, cached server data, memoization, list keys, and event handlers.

Skill for Cursor

Written for Cursor: installed under .cursor/.

This is ctxpipe-ai/ctxpipe's own configuration. It tells Cursor how to work on ctxpipe itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ctxpipe configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/ctxpipe-ai/ctxpipe/main/.cursor/skills/react/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/ctxpipe-ai/ctxpipe

Made for: Cursor.

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/ctxpipe-ai/ctxpipe/react/github.svg)](https://agentmods.dev/skills/ctxpipe-ai/ctxpipe/react)
Your own site
<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.

agentmods 80×15 button for react

Your own site · 80×15
<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>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,296 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.00038 $0.01296
Opus 5.5 $0.00015 $0.00518
Sonnet 5.5 $0.00008 $0.00259
Haiku 4.5 $0.00004 $0.00130

Measured 1mo ago against content hash 3959353eb406, 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.

.cursor/skills/react/SKILL.md · 66 lines

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

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

Read the full file on GitHub · 66 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. 1mo ago First seen · 66 lines · 38 tokens per session scan A 3959353eb406

Subscribe to this mod's changes

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.

Related

Other skills, from other repositories

react-hooks-composition

Advanced React hooks composition patterns - SWR integration, debounced search, memoized contexts, state machines, and performance optimization.

bobmatnyc/claude-mpm-skills · 29 tokens

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.

bobmatnyc/claude-mpm-skills · 52 tokens

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.

thapaliyabikendra/ai-artifacts · 53 tokens

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.

AmariahAK/atlarix-skills · 3 tokens

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.

canwhite/Krebs · 25 tokens

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…

pledgeandgrow/pledge-skills · 68 tokens