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.
npx skills add Cratis/AI --skill reactgit clone --depth 1 https://github.com/Cratis/AIWrote 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/cratis/ai/react)<a href="https://agentmods.dev/skills/cratis/ai/react"><img src="https://agentmods.dev/badge/skills/cratis/ai/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/cratis/ai/react"><img src="https://agentmods.dev/badge/skills/cratis/ai/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.00097 | $0.01979 |
| Opus 5.5 | $0.00039 | $0.00792 |
| Sonnet 5.5 | $0.00019 | $0.00396 |
| Haiku 4.5 | $0.00010 | $0.00198 |
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.
This is a copy
88% identical to react — 46 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 74 lines — stays where its author put it; the contents beside it link to each section on GitHub.
React 19 Best Practices
Comprehensive performance optimization guide for React 19 applications. Contains 40 rules across 8 categories, prioritized by impact from critical (concurrent rendering, server components) to incremental (component patterns).
Table of Contents
- Concurrent Rendering — CRITICAL
- 1.1 Avoid Suspense Fallback Thrashing — HIGH (prevents flickering, smoother UX)
- 1.2 Leverage Automatic Batching for Fewer Renders — HIGH (32% fewer renders in heavy updates)
- 1.3 Use useDeferredValue for Derived Expensive Values — CRITICAL (prevents jank in derived computations)
- 1.4 Use useTransition for Non-Blocking Updates — CRITICAL (keeps UI responsive during heavy updates)
- 1.5 Write Concurrent-Safe Components — MEDIUM-HIGH (prevents bugs in concurrent rendering)
- Server Components — CRITICAL
- 2.1 Avoid Client-Only Libraries in Server Components — MEDIUM-HIGH (prevents build errors, correct component placement)
- 2.2 Enable Streaming with Nested Suspense — MEDIUM-HIGH (progressive loading, faster TTFB)
- 2.3 Fetch Data in Server Components — CRITICAL (38% less client JS, no client waterfalls)
- 2.4 Minimize Server/Client Boundary Crossings — CRITICAL (reduces serialization overhead, smaller bundles)
- 2.5 Pass Only Serializable Props to Client Components — HIGH (prevents runtime errors, ensures correct hydration)
- 2.6 Use Composition to Mix Server and Client Components — HIGH (maintains server rendering for static content)
- Actions & Forms — HIGH
- 3.1 Use Form Actions Instead of onSubmit — HIGH (progressive enhancement, simpler code)
- 3.2 Use useActionState for Form State Management — HIGH (declarative form handling, automatic pending states)
- 3.3 Use useFormStatus for Submit Button State — MEDIUM-HIGH (proper loading indicators, prevents double submission)
- 3.4 Use useOptimistic for Instant UI Feedback — HIGH (instant perceived response, auto-rollback on failure)
- 3.5 Validate Forms on Server with Actions — MEDIUM (secure validation, consistent error handling)
- Data Fetching — HIGH
- 4.1 Fetch Data in Parallel with Promise.all — MEDIUM-HIGH (eliminates waterfalls, 2-5× faster)
- 4.2 Use cache() for Request Deduplication — HIGH (eliminates duplicate fetches per render)
- 4.3 Use Error Boundaries with Suspense — MEDIUM (graceful error recovery, isolated failures)
- 4.4 Use Suspense for Declarative Loading States — HIGH (cleaner code, coordinated loading UI)
- 4.5 Use the use() Hook for Promises in Render — HIGH (cleaner async component code, Suspense integration)
- State Management — MEDIUM-HIGH
- 5.1 Calculate Derived Values During Render — MEDIUM (eliminates sync bugs, simpler code)
- 5.2 Split Context to Prevent Unnecessary Re-renders — MEDIUM (reduces re-renders from context changes)
- 5.3 Use Functional State Updates for Derived Values — MEDIUM-HIGH (prevents stale closures, stable callbacks)
- 5.4 Use Lazy Initialization for Expensive Initial State — MEDIUM-HIGH (prevents expensive computation on every render)
- 5.5 Use useReducer for Complex State Logic — MEDIUM (clearer state transitions, easier testing)
- Memoization & Performance — MEDIUM
- 6.1 Avoid Premature Memoization — MEDIUM (memoization has overhead, measure first)
- 6.2 Leverage React Compiler for Automatic Memoization — MEDIUM (automatic optimization, less manual code)
- 6.3 Use React.memo for Expensive Pure Components — MEDIUM (skips re-render when props unchanged)
- 6.4 Use useCallback for Stable Function References — MEDIUM (prevents child re-renders from reference changes)
- 6.5 Use useMemo for Expensive Calculations — MEDIUM (skips expensive recalculation on re-renders)
- Effects & Events — MEDIUM
- 7.1 Always Clean Up Effect Side Effects — MEDIUM (prevents memory leaks, stale callbacks)
- 7.2 Avoid Effects for Derived State and User Events — MEDIUM (eliminates sync bugs, simpler code)
- 7.3 Avoid Object and Array Dependencies in Effects — MEDIUM (prevents infinite loops, unnecessary re-runs)
- 7.4 Use useEffectEvent for Non-Reactive Logic — MEDIUM (separates reactive from non-reactive code)
- 7.5 Use useSyncExternalStore for External Subscriptions — MEDIUM (correct subscription handling, SSR compatible)
- Component Patterns — LOW-MEDIUM
- 8.1 Choose Controlled vs Uncontrolled Appropriately — LOW-MEDIUM (correct data flow, proper form handling)
- 8.2 Prefer Composition Over Props Explosion — LOW-MEDIUM (more flexible, reusable components)
- 8.3 Use Key to Reset Component State — LOW-MEDIUM (correct state isolation, proper resets)
- 8.4 Use Render Props for Inversion of Control — LOW-MEDIUM (flexible rendering, shared logic)
What ships with it
43 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- assets/templates/_template.md 557 B
- metadata.json 862 B
- references/_sections.md 1.6 KB
- references/conc-automatic-batching.md 1.5 KB
- references/conc-concurrent-safe.md 1.5 KB
- references/conc-suspense-fallback.md 1.7 KB
- references/conc-use-deferred-value.md 1.7 KB
- references/conc-use-transition.md 1.8 KB
- references/data-cache-deduplication.md 1.6 KB
- references/data-error-boundaries.md 1.7 KB
- references/data-parallel-fetching.md 1.8 KB
- references/data-suspense-data-fetching.md 1.6 KB
- references/data-use-hook.md 1.8 KB
- references/effect-avoid-unnecessary.md 1.6 KB
- references/effect-cleanup.md 1.6 KB
- references/effect-object-dependencies.md 1.6 KB
- references/effect-use-effect-event.md 1.7 KB
- references/effect-use-sync-external-store.md 2.1 KB
- references/form-actions.md 1.8 KB
- references/form-use-action-state.md 2.0 KB
- references/form-use-form-status.md 1.6 KB
- references/form-use-optimistic.md 1.8 KB
- references/form-validation.md 2.0 KB
- references/memo-avoid-premature.md 1.7 KB
- references/memo-compiler.md 1.9 KB
- references/memo-react-memo.md 1.9 KB
- references/memo-use-callback.md 1.7 KB
- references/memo-use-memo.md 1.6 KB
- references/rcomp-composition.md 1.6 KB
- references/rcomp-controlled-components.md 1.6 KB
- references/rcomp-key-reset.md 1.7 KB
- references/rcomp-render-props.md 1.6 KB
- references/rsc-avoid-client-only-libs.md 1.5 KB
- references/rsc-composition-pattern.md 1.8 KB
- references/rsc-data-fetching-server.md 1.6 KB
- references/rsc-serializable-props.md 1.8 KB
- references/rsc-server-client-boundary.md 1.8 KB
- references/rsc-streaming.md 1.5 KB
- references/rstate-context-optimization.md 1.8 KB
- references/rstate-derived-values.md 1.8 KB
- references/rstate-functional-updates.md 1.5 KB
- references/rstate-lazy-initialization.md 1.6 KB
- references/rstate-use-reducer.md 1.8 KB
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 · 74 lines · 97 tokens per session scan A 516e1e1093bd
react is a skill published in the GitHub repository Cratis/AI (4 stars, last pushed today), licensed MIT. It adds 97 tokens to every session and 1,979 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 88% identical to react, differing in 46 lines, and is treated as a copy.
Other skills, from other repositories
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…
insight-error-page
Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…