react-modernization

react-modernization is a skill for Claude Code from HermeticOrmus/claude-code-game-development. It costs 43 tokens per session (2,877 once invoked), scanned A, a copy of react-modernization, MIT.

A guide for updating React applications and replacing older class components with function components that use hooks.

In plain words
What is it for?
Use it to plan React version upgrades, migrate components, adopt features such as Suspense and transitions, apply codemods, and update state management or TypeScript usage.
Why use it?
It helps teams move to newer React patterns while accounting for version changes, compatibility issues, and performance-related updates.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the framework-migration plugin — 4 skills, 3 commands shipped together

Good fit Use it to plan React version upgrades, migrate components, adopt features such as Suspense and transitions, apply codemods, and update state management or TypeScript usage.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hermeticormus/claude-code-game-development/react-modernization
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.

Any agent
npx skills add HermeticOrmus/claude-code-game-development --skill react-modernization
Clone the repo
git clone --depth 1 https://github.com/HermeticOrmus/claude-code-game-development

Made for: Claude Code.

Or install framework-migration, the plugin that ships this one along with the rest of its 4 skills, 3 commands.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/hermeticormus/claude-code-game-development/react-modernization/github.svg)](https://agentmods.dev/skills/hermeticormus/claude-code-game-development/react-modernization)
Your own site
<a href="https://agentmods.dev/skills/hermeticormus/claude-code-game-development/react-modernization"><img src="https://agentmods.dev/badge/skills/hermeticormus/claude-code-game-development/react-modernization/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-modernization

Your own site · 80×15
<a href="https://agentmods.dev/skills/hermeticormus/claude-code-game-development/react-modernization"><img src="https://agentmods.dev/badge/skills/hermeticormus/claude-code-game-development/react-modernization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,877 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 100% copy Near-identical to another mod 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.00043 $0.02877
Opus 5.5 $0.00017 $0.01151
Sonnet 5.5 $0.00009 $0.00575
Haiku 4.5 $0.00004 $0.00288

Measured 1mo ago against content hash d8be354a91a4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

react-modernization 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.

Origin

This is a copy

100% identical to react-modernization — 0 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.

plugins/framework-migration/skills/react-modernization/SKILL.md · 514 lines

How it starts

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

React Modernization

Master React version upgrades, class to hooks migration, concurrent features adoption, and codemods for automated transformation.

When to Use This Skill

  • Upgrading React applications to latest versions
  • Migrating class components to functional components with hooks
  • Adopting concurrent React features (Suspense, transitions)
  • Applying codemods for automated refactoring
  • Modernizing state management patterns
  • Updating to TypeScript
  • Improving performance with React 18+ features

Version Upgrade Path

React 16 → 17 → 18

Breaking Changes by Version:

React 17:

  • Event delegation changes
  • No event pooling
  • Effect cleanup timing
  • JSX transform (no React import needed)

React 18:

  • Automatic batching
  • Concurrent rendering
  • Strict Mode changes (double invocation)
  • New root API
  • Suspense on server

Class to Hooks Migration

State Management

// Before: Class component
class Counter extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      count: 0,
      name: ''
    };
  }

  increment = () => {
    this.setState({ count: this.state.count + 1 });
  }

  render() {
    return (
      <div>
        <p>Count: {this.state.count}</p>
        <button onClick={this.increment}>Increment</button>
      </div>
    );
  }
}

// After: Functional component with hooks
function Counter() {
  const [count, setCount] = useState(0);
  const [name, setName] = useState('');

  const increment = () => {
    setCount(count + 1);
  };

  return (
    <div>
      <p>Count: {count}</p>
      <button onClick={increment}>Increment</button>
    </div>
  );
}

Lifecycle Methods to Hooks

// Before: Lifecycle methods
class DataFetcher extends React.Component {
  state = { data: null, loading: true };

  componentDidMount() {
    this.fetchData();
  }

  componentDidUpdate(prevProps) {
    if (prevProps.id !== this.props.id) {
      this.fetchData();
    }
  }

  componentWillUnmount() {
    this.cancelRequest();
  }

  fetchData = async () => {
    const data = await fetch(`/api/${this.props.id}`);
    this.setState({ data, loading: false });
  };

  cancelRequest = () => {
    // Cleanup
  };

  render() {
    if (this.state.loading) return <div>Loading...</div>;
    return <div>{this.state.data}</div>;
  }
}

// After: useEffect hook
function DataFetcher({ id }) {
  const [data, setData] = useState(null);
  const [loading, setLoading] = useState(true);

  useEffect(() => {
    let cancelled = false;

    const fetchData = async () => {
      try {
        const response = await fetch(`/api/${id}`);
        const result = await response.json();

        if (!cancelled) {
          setData(result);
          setLoading(false);
        }
      } catch (error) {
        if (!cancelled) {
          console.error(error);
        }
      }
    };

    fetchData();

    // Cleanup function
    return () => {
      cancelled = true;
    };
  }, [id]); // Re-run when id changes

  if (loading) return <div>Loading...</div>;
  return <div>{data}</div>;
}

Read the full file on GitHub · 514 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. 1mo ago First seen · 514 lines · 43 tokens per session scan A d8be354a91a4

Subscribe to this mod's changes

react-modernization is a skill published in the GitHub repository HermeticOrmus/claude-code-game-development (72 stars, last pushed 19d ago), licensed MIT. It adds 43 tokens to every session and 2,877 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to react-modernization, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

pygame-core

Structure a pygame (pygame-ce) game in Python: the init/event/update/draw loop, delta-time movement, Surface/Rect blitting, keyboard/mouse input, and Sprite/Group management with collision. Use when building or debugging a pygame game — when the user mentions pygame, pygame-ce, the game loop, blit, Surface, Rect…

gamedev-skills/awesome-gamedev-agent-skills · 85 tokens

controller-ui

Use when building or reviewing Air Jam controller surfaces so touch controls stay simple, readable, and game-appropriate instead of drifting into dense web-app UI patterns.

vucinatim/air-jam · 34 tokens

host-surface

Use when building or reviewing the Air Jam host shell so the active game surface stays full-frame, overlays stay modular, and host UI does not interfere with gameplay layout.

vucinatim/air-jam · 37 tokens

prefab-authoring

Use when creating reusable gameplay objects or scene presets so prefabs stay declarative, configurable, and ready for future tooling such as previews and scanned catalogs.

vucinatim/air-jam · 35 tokens

r3f-3d-scene

Use when building or reviewing a 3D Air Jam game with React Three Fiber so scene structure, lighting, shadows, grounding, particles, and physics stay deliberate instead of becoming ad hoc Three.js chaos.

vucinatim/air-jam · 50 tokens

game-state-and-rendering

Use when changing stores, per-frame gameplay logic, React state, refs, or rendering integration in an Air Jam project so state ownership stays clear and rerenders stay controlled.

vucinatim/air-jam · 40 tokens