react-best-practices

react-best-practices is a skill for Claude Code, Codex from itallstartedwithaidea/agent-skills. It costs 45 tokens per session (1,173 once invoked), scanned A, original, MIT.

A set of practical rules for writing and reviewing React code, ordered by their expected effect on application performance. React is a JavaScript library for building user interfaces.

In plain words
What is it for?
It helps write or review React applications, improve data-fetching and rendering choices, reduce bundle size, and assess component-level performance decisions.
Why use it?
It directs attention toward larger performance problems, such as slow network request sequences and oversized downloads, before smaller code-level optimizations.

Skill for Claude CodeCodex

Part of the all-skills plugin — 73 skills shipped together

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

Made for: Claude Code, Codex.

Or install all-skills, the plugin that ships this one along with the rest of its 73 skills.

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-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/itallstartedwithaidea/agent-skills/react-best-practices.svg)](https://agentmods.dev/skills/itallstartedwithaidea/agent-skills/react-best-practices)
Your own site
<a href="https://agentmods.dev/skills/itallstartedwithaidea/agent-skills/react-best-practices"><img src="https://agentmods.dev/badge/skills/itallstartedwithaidea/agent-skills/react-best-practices.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,173 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.1 $0.00045 $0.01173
Opus 5 $0.00023 $0.00587
Sonnet 5 $0.00009 $0.00235
Haiku 4.5 $0.00005 $0.00117

Measured 2d ago against content hash a6e4f4b843c3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

react-best-practices 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/web-frontend/react-best-practices/SKILL.md · 139 lines

How it starts

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

React Best Practices

Part of Agent Skills™ by googleadsagent.ai™

Description

React Best Practices codifies 40+ rules across 8 priority categories, from Critical (eliminating waterfalls, reducing bundle size) to Low-Medium (JavaScript micro-optimizations). Each rule is actionable, includes a severity rating, and provides before/after code examples. The agent applies these rules automatically when writing or reviewing React code.

The rules are ordered by impact, not by ease of implementation. Eliminating client-server waterfalls and reducing bundle size yield the largest performance gains and therefore receive Critical priority. Server-side rendering performance and client data fetching patterns follow. Re-render optimization—often the first thing developers reach for—is rated Medium because it rarely causes measurable user-facing performance problems compared to network and bundle issues.

This skill treats React performance as a system property, not a component property. The highest-impact optimizations happen at the architecture level: where data is fetched, how bundles are split, and which rendering strategy is chosen. Component-level optimizations (memoization, key stability) are included but correctly deprioritized.

Use When

  • Writing new React components or pages
  • Reviewing React code for performance issues
  • Debugging slow page loads or sluggish interactions
  • Optimizing Core Web Vitals (LCP, FID, CLS)
  • Migrating from client-side to server-side rendering
  • Reducing JavaScript bundle size

How It Works

graph TD
    A[React Code Change] --> B{Priority Scan}
    B --> C["🔴 Critical: Waterfalls"]
    B --> D["🔴 Critical: Bundle Size"]
    B --> E["🟠 High: Server Perf"]
    B --> F["🟡 Med-High: Client Fetch"]
    B --> G["🟡 Medium: Re-renders"]
    B --> H["🟡 Medium: Render Perf"]
    B --> I["🔵 Low-Med: Micro-opts"]
    C --> J[Apply Fixes by Priority]
    D --> J
    E --> J
    F --> J
    G --> J
    H --> J
    I --> J

Read the full file on GitHub · 139 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 · 139 lines · 45 tokens per session scan A a6e4f4b843c3

Subscribe to this mod's changes

react-best-practices is a skill published in the GitHub repository itallstartedwithaidea/agent-skills (36 stars, last pushed 4mo ago), licensed MIT. It adds 45 tokens to every session and 1,173 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories

widget-authoring

Author or edit ThinkEx widgets, which are self-contained interactive HTML blocks inside documents. Use when the user explicitly asks for a widget, asks for interaction or live computation, or wants a document visual that ordinary blocks cannot express.

ThinkEx-OSS/thinkex · 49 tokens

front-vitest

Depth for Vitest tests of front- React 19 SPAs when DOM, RTL, TanStack Query hooks, or TanStack Router route-tree tests are needed. USE WHEN: adding jsdom or testing-library, writing tsx render or renderHook tests, testing createMemoryHistory plus RouterProvider, Suspense UI, or React 19 act fixtures. DO NOT USE WHEN…

louisbrulenaudet/monorepo-template · 102 tokens

review-react

React 19 review (front-app patterns, compiler readiness, Suspense boundaries, hooks discipline) against current official React best practices. USE WHEN: user runs /review-react or explicitly asks for this review. DO NOT USE WHEN: reviewing app code, other dev dependencies, or implementing features.

louisbrulenaudet/monorepo-template · 61 tokens

review-tanstack-query

TanStack Query review (queryOptions patterns, cache hygiene, mutation flows, devtools) against current official TanStack Query best practices. USE WHEN: user runs /review-tanstack-query or explicitly asks for this review. DO NOT USE WHEN: reviewing app code, other dev dependencies, or implementing features.

louisbrulenaudet/monorepo-template · 68 tokens

review-tanstack-router

TanStack Router review (file-based routing, route tree generation, typed search params, preload/lazy behavior) against current official TanStack Router best practices. USE WHEN: user runs /review-tanstack-router or explicitly asks for this review. DO NOT USE WHEN: reviewing app code, other dev dependencies, or…

louisbrulenaudet/monorepo-template · 72 tokens

generate-component

Generate production-ready React code using UI Kit components. Use when the user asks to "build", "create", "make", "generate" a UI, page, form, dashboard, or component composition. Produces working TSX with correct imports, props, and Aurora Fluid styling.

annondeveloper/ui-kit · 60 tokens