Source profileQuality 92/100

nimadorostkar/Claude-Skills-collection/skills/frontend/react/SKILL.md

react

Use when writing or reviewing React. Covers component and state design, hook correctness, memoization that is actually needed, data fetching, and the render behavior behind most React performance problems.

Source repository stars
26
Declared platforms
0
Static risk flags
0
Last source update
2026-08-18
Source checked
2026-08-25

Decision brief

What it does: where it fits

Covers component and state design, hook correctness, memoization that is actually needed, data fetching, and the render behavior behind most React performance problems.

Best for

  • Building or reviewing React components.
  • Diagnosing unnecessary re-renders or stale state.
  • Deciding where state belongs: local, lifted, context, or server.

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/nimadorostkar/Claude-Skills-collection --skill "skills/frontend/react"
Safe inspection promptEditorial

Inspect the Agent Skill "react" from https://github.com/nimadorostkar/Claude-Skills-collection/blob/03f39b7041ec2679255f8d6bb5b18421561821ae/skills/frontend/react/SKILL.md at commit 03f39b7041ec2679255f8d6bb5b18421561821ae. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Workflow

    1. Locate the state — Put it as close to where it is used as possible. Lift only when two siblings need it. Reach for context only when prop drilling exceeds about three levels. 2. Separate server state from client state — Data from an API is cache, not state. It has staleness,…

    Locate the state — Put it as close to where it is used as possible. Lift only when two siblings need it. Reach for context only when prop drilling exceeds about three levels.Separate server state from client state — Data from an API is cache, not state. It has staleness, refetching, and error semantics that useState does not model. Use a query library.Delete unnecessary effects — An effect that computes a value from props belongs in render. An effect that resets state on a prop change belongs in a key. Most useEffect calls in a typical codebase should not exist.
  2. 02

    Purpose

    Write React where state lives in one place, effects are rare, and re-renders are understood rather than suppressed with memoization applied at random.

    Write React where state lives in one place, effects are rare, and re-renders are understood rather than suppressed with memoization applied at random.
  3. 03

    When to Use

    Building or reviewing React components.

    Building or reviewing React components.Diagnosing unnecessary re-renders or stale state.Deciding where state belongs: local, lifted, context, or server.
  4. 04

    Capabilities

    Component decomposition and state colocation.

    Component decomposition and state colocation.Hook correctness: dependencies, cleanup, and the rules that are not optional.State management selection: useState, useReducer, context, external store, server state.
  5. 05

    Inputs

    The component tree and where data enters it.

    The component tree and where data enters it.The interaction and its performance characteristics, if performance is the concern.React version — the correct answer changed with 18 and again with 19.

Permission review

Static risk signals and limitations

No configured static risk pattern was detected

This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score92/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars26SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
nimadorostkar/Claude-Skills-collection
Skill path
skills/frontend/react/SKILL.md
Commit
03f39b7041ec2679255f8d6bb5b18421561821ae
License
MIT
Collected
2026-08-25
Default branch
main
View the original SKILL.md

React

Purpose

Write React where state lives in one place, effects are rare, and re-renders are understood rather than suppressed with memoization applied at random.

When to Use

  • Building or reviewing React components.
  • Diagnosing unnecessary re-renders or stale state.
  • Deciding where state belongs: local, lifted, context, or server.
  • Removing useEffect calls that should not exist.

Capabilities

  • Component decomposition and state colocation.
  • Hook correctness: dependencies, cleanup, and the rules that are not optional.
  • State management selection: useState, useReducer, context, external store, server state.
  • Data fetching with TanStack Query or the framework's own loader.
  • Render profiling and targeted memoization.

Inputs

  • The component tree and where data enters it.
  • The interaction and its performance characteristics, if performance is the concern.
  • React version — the correct answer changed with 18 and again with 19.

Outputs

  • Components with a single source of truth for each piece of state.
  • Effects only where genuinely synchronizing with an external system.
  • Memoization applied where a profile shows it is needed.

Workflow

  1. Locate the state — Put it as close to where it is used as possible. Lift only when two siblings need it. Reach for context only when prop drilling exceeds about three levels.
  2. Separate server state from client state — Data from an API is cache, not state. It has staleness, refetching, and error semantics that useState does not model. Use a query library.
  3. Delete unnecessary effects — An effect that computes a value from props belongs in render. An effect that resets state on a prop change belongs in a key. Most useEffect calls in a typical codebase should not exist.
  4. Profile before memoizing — React DevTools Profiler shows what actually re-renders and why. useMemo on a cheap computation costs more than it saves.
  5. Make the dependencies honest — Never silence the exhaustive-deps lint rule. If the array is wrong, the bug is a stale closure, and it will be intermittent.

Best Practices

  • Derived state is a bug. If a value can be computed from props or other state, compute it during render.
  • useEffect is for synchronizing with something outside React: a subscription, a DOM API, a timer. It is not for reacting to state changes.
  • Every effect that subscribes must return a cleanup function. Missing cleanup is the standard cause of memory leaks and duplicate listeners.
  • Do not put a non-stable key on a list. Index keys break every time the list is reordered or filtered.
  • Context re-renders every consumer when its value changes. Split contexts by update frequency, or use an external store with selectors.
  • Lift state up only as far as needed. State in the root component re-renders the tree.

Examples

An effect that should not exist:

// Wrong: derived state, an extra render, and a chance to be out of sync.
function Cart({ items }) {
  const [total, setTotal] = useState(0);
  useEffect(() => {
    setTotal(items.reduce((sum, i) => sum + i.price * i.qty, 0));
  }, [items]);
  return <Total value={total} />;
}

// Right: compute it during render. It is always correct, by construction.
function Cart({ items }) {
  const total = items.reduce((sum, i) => sum + i.price * i.qty, 0);
  return <Total value={total} />;
}

Server state belongs in a query, not in useState plus useEffect:

function OrderList({ status }) {
  const { data, isPending, error } = useQuery({
    queryKey: ["orders", status],
    queryFn: ({ signal }) => fetchOrders(status, { signal }),
    staleTime: 30_000,
  });

  if (isPending) return <Skeleton />;
  if (error) return <ErrorState error={error} onRetry={() => refetch()} />;
  return <List items={data} />;
}

The manual version needs loading state, error state, cancellation on unmount, a race-condition guard when status changes mid-flight, and a cache. That is what the library is.

Notes

  • The React Compiler (React 19) auto-memoizes and removes most hand-written useMemo and useCallback. Do not spend effort on memoization you are about to delete.
  • Strict Mode in development intentionally double-invokes effects to surface missing cleanup. An effect that breaks under Strict Mode is broken in production too — it just fails less often.
  • key on a component is the idiomatic way to reset its state when an identity changes. It is far cleaner than an effect that resets fields.

Frequently asked questions

What to verify before installation and use

What does the react source document cover?

Covers component and state design, hook correctness, memoization that is actually needed, data fetching, and the render behavior behind most React performance problems.

How do I install react?

The source record exposes this install command: npx skills add https://github.com/nimadorostkar/Claude-Skills-collection --skill "skills/frontend/react". Inspect the command and pinned source before running it.

Alternatives

Compare before choosing

Computed 961,101

fcakyon/claude-codex-settings

vercel-react-view-transitions

Guide for implementing smooth, native-feeling animations using React's View Transition API (`<ViewTransition>` component, `addTransitionType`, and CSS view transition pseudo-elements). Use this skill whenever the user wants to add page transitions, animate route changes, create shared element animations, animate enter/exit of components, animate list reorder, implement directional (forward/back) navigation animations, or integrate view transitions in Next.js. Also use when the user mentions view

Computed 96204

theBGuy/GitDesktop

vercel-react-view-transitions

Guide for implementing smooth, native-feeling animations using React's View Transition API (`<ViewTransition>` component, `addTransitionType`, and CSS view transition pseudo-elements). Use this skill whenever the user wants to add page transitions, animate route changes, create shared element animations, animate enter/exit of components, animate list reorder, implement directional (forward/back) navigation animations, or integrate view transitions in Next.js. Also use when the user mentions view

Computed 95528

vibeeval/vibecosystem

frontend-dev

Full-stack frontend development combining premium UI design, cinematic animations, AI-generated media assets, persuasive copywriting, and visual art. Builds complete, visually striking web pages with real media, advanced motion, and compelling copy. Use when: building landing pages, marketing sites, product pages, dashboards, generating media assets (image/video/audio/music), writing conversion copy, creating generative art, or implementing cinematic scroll animations.

Computed 931,248

first-fluke/oh-my-agent

oma-frontend

Frontend specialist for React, Next.js, Angular, TypeScript with FSD-lite architecture, shadcn/ui, and design system alignment. Use for UI, component, page, layout, CSS, Tailwind, shadcn, Angular, and RxJS work.