okf-studio: Skill for Claude Code

.agents/skills/react-compiler/SKILL.md

react-compiler is a skill for Claude Code, Codex from saschb2b/okf-studio. It costs 114 tokens per session (1,063 once invoked), scanned A, original, MIT.

A set of rules for writing and reviewing React code when the React Compiler is enabled. React is a user-interface library, and the compiler can handle memoization, meaning it avoids some unnecessary recalculation or rendering without manual wrappers.

In plain words
What is it for?
Use it in React 19 or newer projects with the compiler enabled, especially when writing, refactoring, or reviewing components. It guides ordinary component code and audits unnecessary manual memoization.
Why use it?
Older React advice often adds useMemo, useCallback, or React.memo everywhere, creating extra code and stale optimizations. These rules keep components simpler and check existing manual memoization for problems.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is saschb2b/okf-studio's own configuration. It tells Claude Code and Codex how to work on okf-studio 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 okf-studio configures →

Reuse

Borrowing it

Nothing to install: this file belongs to saschb2b/okf-studio. 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/saschb2b/okf-studio/main/.agents/skills/react-compiler/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/saschb2b/okf-studio

Made for: Claude Code, Codex.

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-compiler

README.md
[![agentmods](https://agentmods.dev/badge/skills/saschb2b/okf-studio/react-compiler/github.svg)](https://agentmods.dev/skills/saschb2b/okf-studio/react-compiler)
Your own site
<a href="https://agentmods.dev/skills/saschb2b/okf-studio/react-compiler"><img src="https://agentmods.dev/badge/skills/saschb2b/okf-studio/react-compiler/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-compiler

Your own site · 80×15
<a href="https://agentmods.dev/skills/saschb2b/okf-studio/react-compiler"><img src="https://agentmods.dev/badge/skills/saschb2b/okf-studio/react-compiler.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,063 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.00114 $0.01063
Opus 5.5 $0.00046 $0.00425
Sonnet 5.5 $0.00023 $0.00213
Haiku 4.5 $0.00011 $0.00106

Measured 3d ago against content hash 8fb8cad89b5a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

react-compiler 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 3d 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.

.agents/skills/react-compiler/SKILL.md · 83 lines

How it starts

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

React Compiler

Rule

The compiler memoizes. You do not.

In any React 19+ codebase with the compiler enabled, do not add useMemo, useCallback, or React.memo by default. The compiler handles memoization at finer granularity than a human writes, and adding manual versions is at best noise. This is the most common failure mode in LLM-generated React: the bulk of any agent's React training corpus is pre-compiler, so the default output skews toward manual memoization.

Default behavior when writing React

Write components plainly:

function DashboardRow({ entity, onSelect }) {
  const label = formatLabel(entity);
  const total = entity.items.reduce((sum, i) => sum + i.value, 0);
  return (
    <Row onClick={() => onSelect(entity.id)}>
      <Label>{label}</Label>
      <Total>{total}</Total>
    </Row>
  );
}

Not:

const DashboardRow = memo(({ entity, onSelect }) => {
  const formatted = useMemo(() => ({ /* ... */ }), [entity]);
  const handleClick = useCallback(() => onSelect(entity.id), [entity.id, onSelect]);
  return /* ... */;
});

The compiler produces the equivalent of the first from any input that follows the Rules of React. Adding the second by hand is noise and can interfere with the compiler's analysis.

Three exceptions where manual memoization is still required

Keep manual useMemo or useCallback only in these cases:

  1. Referential identity for non-React consumers. Values feeding into addEventListener, an IntersectionObserver, third-party libraries with their own === checks, anything outside React that retains the reference.
  2. Expensive non-render work the compiler cannot see through. Parsing a large blob, building a large index, calling a heavy library. Keep, and add a comment explaining why.
  3. Effect dependencies that must be stable for correctness. If a dependency would trip the effect every render without the wrap, keep it.

Anything outside these three cases gets deleted.

Audit workflow on an existing codebase

Read the full file on GitHub · 83 lines

Files

What ships with it

3 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.

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. 3d ago First seen · 83 lines · 114 tokens per session scan A 8fb8cad89b5a

Subscribe to this mod's changes

react-compiler is a skill published in the GitHub repository saschb2b/okf-studio (47 stars, last pushed yesterday), licensed MIT. It adds 114 tokens to every session and 1,063 once invoked, about $0.0005 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-10-23.

Related

Other skills, from other repositories