react

A set of rules for writing React components, the building blocks used to create web interfaces with React. It covers state, hooks, asynchronous work, performance, and list keys.

In plain words
What is it for?
Designing components, placing shared state, handling asynchronous effects and cleanup, improving rendering performance, and rendering lists with stable keys.
Why use it?
It helps avoid common interface bugs such as stale data, infinite update loops, unnecessary re-rendering, and unfinished background work.

Skill for Claude CodeCodex

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/sordi-ai/skill-everything/react
Any agent
npx skills add sordi-ai/skill-everything --skill react
Clone the repo
git clone --depth 1 https://github.com/sordi-ai/skill-everything

Made for: Claude Code, Codex.

Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,332 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.00023 $0.02332
Opus 5 $0.00012 $0.01166
Sonnet 5 $0.00005 $0.00466
Haiku 4.5 $0.00002 $0.00233

Measured 2d ago against content hash bf02aabba69e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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.

skills/react/SKILL.md · 255 lines

How it starts

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

Sub-Skill: React Best Practices

Purpose: Prevents the React-specific mistakes LLMs make repeatedly — wrong state placement, stale closures, unnecessary re-renders, and broken async patterns. Concrete rules with code examples.

Rule classification

  • MUST — load-bearing. Violating causes infinite loops, stale data, leaked subscriptions, or invisible UI bugs. Never break.
  • SHOULD — default behavior. Deviation needs a documented reason in the code or PR.
  • AVOID — usually wrong; documented exception inline where needed.

Where these rules don't strictly apply: test fixtures, Storybook stories, design-system primitives in isolation, and small in-tutorial demo components may legitimately differ. The rules below apply to production application code.


Component Design

  1. SHOULD: Co-locate state with the component that owns it. Lift state only when two siblings genuinely share it. Lifting to a grandparent "just in case" causes unnecessary re-renders across the tree.

    // Avoid: form state lifted to page-level parent
    function Page() {
      const [email, setEmail] = useState('');
      return <Form email={email} setEmail={setEmail} />;
    }
    
    // Prefer: state lives in the component that uses it
    function Form() {
      const [email, setEmail] = useState('');
      return <input value={email} onChange={e => setEmail(e.target.value)} />;
    }
    
  2. SHOULD: Split components at ~100 lines or when a section has its own data concern. One component = one responsibility. Extract <UserAvatar>, <OrderSummary> rather than one <ProfilePage> that does everything. Exception: pages that are mostly markup with little logic may exceed 100 lines.

  3. SHOULD: Replace prop drilling beyond two levels with composition or context. Passing userId through four components to reach a button is a design smell.

    // Avoid: drilling through intermediaries
    <Layout userId={userId}><Sidebar userId={userId}><Nav userId={userId} /></Sidebar></Layout>
    
    // Prefer: context or render-prop composition
    <UserContext.Provider value={userId}><Layout /></UserContext.Provider>
    

Read the full file on GitHub · 255 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. 2d ago First seen · 255 lines · 23 tokens per session scan A bf02aabba69e

Subscribe to this mod's changes

react is a skill published in the GitHub repository sordi-ai/skill-everything (19 stars, last pushed 3mo ago), licensed MIT. It adds 23 tokens to every session and 2,332 once invoked, about $0.0001 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-30.

Related

Other skills, from other repositories

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

frontend-ux-engineer

Use for frontend features, Next.js/React/Vue/Svelte UI, accessibility, responsive layout, design polish, state handling, forms, visual QA, or product workflow improvements.

DominikTobureto/awesome-grok-build · 42 tokens

nextjs-fullstack

Use for Next.js App Router, React Server Components, server actions, API routes, auth, database integration, caching, deployment, or full-stack product features.

DominikTobureto/awesome-grok-build · 37 tokens

validate-context-routes

Validate that literal project-relative paths referenced by a project's root AGENTS.md exist. Use when changing AGENTS.md routing, moving shared documentation or .agents resources, or checking a dotagents example.

bgreenwell/dotagents · 44 tokens

frontend-layering-specificity-debug

Diagnose and fix frontend controls whose typography or dimensions ignore component CSS, and React Three Fiber/Drei projected HTML labels that paint above opaque drawers, dialogs, or navigation. Use for inconsistent button sizes, element-type-dependent styling, unexpected wrapping, z-index escalation failures, or WebGL…

JinNing6/Noosphere · 69 tokens

ant-design

Use when ant Design React component library — enterprise UI, forms, tables, charts, theming, ProComponents. Use when working with ant design.

oyi77/1ai-skills · 33 tokens